Getting started
Getting started
Create a key and make your first web search and Lineage requests in a few minutes.
1 min read · Updated 14 Sept 2026
Models answer from stale training data, and a whole web page in the prompt costs thousands of tokens while hiding who said what. Flux returns live results and only the passages that matter, with the people, organisations and dates they mention named inline.
SearchGet ranked live web results, with the key passages from each page.LineagePull the passages that answer your question from any page or document.
Quickstart
Create a key
Search the web
Send a query. Flux reads the top
enrichresults for you and returns the passages that answer it.curl https://fluxsearch.io/api/v1/search \ -H "Authorization: Bearer $FLUX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "total solar eclipse August 2027 path", "max_results": 5, "enrich": 2}'import osimport requestsresponse = requests.post( "https://fluxsearch.io/api/v1/search", headers={"Authorization": f"Bearer {os.environ['FLUX_API_KEY']}"}, json={"query": "total solar eclipse August 2027 path", "max_results": 5, "enrich": 2},)for result in response.json()["results"]: print(result["rank"], result["title"], result["url"])const response = await fetch("https://fluxsearch.io/api/v1/search", { method: "POST", headers: { Authorization: `Bearer ${process.env.FLUX_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ query: "total solar eclipse August 2027 path", max_results: 5, enrich: 2, }),});const { results } = await response.json();for (const result of results) console.log(result.rank, result.title, result.url);Response, trimmed{ "request_id": "req_1e15f9c87c2249868460228c", "query": "total solar eclipse August 2027 path", "results": [ { "rank": 1, "title": "August 2, 2027 Solar Eclipse Map - NSO", "url": "https://nso.edu/eclipse-map-2027-aug2/", "snippet": "The August 2, 2027 total solar eclipse will cross Spain, Gibralter, Morocco, Algeria, Tunisia, Libya, Egypt, Saudi Arabia, Yemem and Somali…", "lineage": null }, { "rank": 2, "title": "2027 Total Solar Eclipse Maps", "url": "https://nationaleclipse.com/maps/map_08022027.html", "snippet": "On August 2, 2027, a total solar eclipse will occur in Europe, Africa, and the Middle East. In Europe, the path of totality will cross over…", "lineage": null } ]}Read one page
Send a URL and your question. Flux fetches the page and keeps only the passages that answer it.
curl https://fluxsearch.io/api/v1/lineage \ -H "Authorization: Bearer $FLUX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://science.nasa.gov/mission/webb/", "query": "When did Webb launch?"}'import osimport requestsresponse = requests.post( "https://fluxsearch.io/api/v1/lineage", headers={"Authorization": f"Bearer {os.environ['FLUX_API_KEY']}"}, json={"url": "https://science.nasa.gov/mission/webb/", "query": "When did Webb launch?"},)for passage in response.json()["results"]: print(passage["enriched_text"])const response = await fetch("https://fluxsearch.io/api/v1/lineage", { method: "POST", headers: { Authorization: `Bearer ${process.env.FLUX_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://science.nasa.gov/mission/webb/", query: "When did Webb launch?", }),});const { results } = await response.json();for (const passage of results) console.log(passage.enriched_text);Response, trimmed{ "request_id": "req_900f9a70689d4828a839dd43", "query": "When did Webb launch?", "selection": { "examined_tokens": 4811, "returned": 4, "reduction_ratio": 0.84993 }, "results": [ { "text": "Webb launched on Dec. 25th 2021.", "enriched_text": "Webb launched on Dec. 25th 2021. [when: Dec 25, 2021]", "score": 0.967724621295929, "annotations": [ { "type": "time", "text": "Dec. 25th 2021", "canonical": "Dec 25, 2021" } ] }, { "text": "Mission Type Astrophysics Partners NASA/ESA/CSA Launch Dec 25, 2021 Arrival at L2 Jan 24, 2022 Key Facts Fact Sheet Premiere Telescope of Next Decade extending the tantalizing dis…", "enriched_text": "Mission Type Astrophysics Partners NASA/ESA/CSA Launch Dec 25, 2021 Arrival at L2 Jan 24, 2022 Key Facts Fact Sheet Premiere Telescope of Next Decade extending the tantalizing discoveries of the Hubble Space Telescope. [when: Jan 2021]", "score": 0.7764766216278076, "annotations": [ { "type": "organisation", "text": "NASA", "canonical": null }, { "type": "organisation", "text": "ESA", "canonical": null }, { "type": "time", "text": "Jan", "canonical": "Jan 2021" } ] } ]}
Request fields
Search
- query (required)string
- What to search for. Must not be empty.
- max_resultsinteger
- The most results to return, from 1 to 20. A value outside that range is moved inside it. You may get fewer.Default
10 - filtersSearchFilters
- enrichinteger
- How many of the results to read for passages, up to
max_results. Defaults to all of them.0returns results without reading any pages, which is fastest.
Lineage
- textstring
- The document to read. Up to 60,000 characters.
- urlstring
- A page for Flux to fetch instead of sending
text. If the site refuses, the response is abad_requestwith the site's reason, and nothing is charged. - querystring
- The question the passages should answer. Without it,
queryin the response is null. - documentsobject[]
- Several documents in one request, each with its own
textorurl. Up to 100.
Next steps
OpenAI SDKGet web search results from Flux using the OpenAI SDK.Vercel AI SDKGive your AI SDK agent a tool to search the web and a tool to read pages, so it can answer questions about things it was never trained on.LangChainAdd live web search to a LangChain agent, and cut the documents your chain loads down to the parts that answer the question.LlamaIndexAnswer questions from your own PDFs using only the passages that matter, and give your LlamaIndex agent live web search.API referenceBrowse every endpoint and see exactly what each one returns.PricingCompare plans and see what each request costs.