Flux
Guides

Web search

Search the live web and get ranked results, with or without the passages that answer your query.

1 min read · Updated 14 Sept 2026
On this page

Search APIs return links and snippets, and your model still has to read the pages. Flux returns results fast, or reads the top pages for you and returns only the passages that answer the query.

Get results fast

Set enrich to 0 for titles, links and snippets. No pages are read.

curl https://fluxsearch.io/api/v1/search \  -H "Authorization: Bearer $FLUX_API_KEY" \  -H "Content-Type: application/json" \  -d '{"query": "Tour de France 2026 winner", "max_results": 5, "enrich": 0}'
import osimport requestsresponse = requests.post(    "https://fluxsearch.io/api/v1/search",    headers={"Authorization": f"Bearer {os.environ['FLUX_API_KEY']}"},    json={"query": "Tour de France 2026 winner", "max_results": 5, "enrich": 0},)print(response.json())
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: "Tour de France 2026 winner", max_results: 5, enrich: 0 }),});console.log(await response.json());
Response, trimmed
{  "request_id": "req_b45690ff710d41528e9e0680",  "query": "Tour de France 2026 winner",  "results": [    {      "rank": 1,      "title": "2026 Tour de France",      "url": "https://en.wikipedia.org/wiki/2026_Tour_de_France",      "snippet": "Winner, Tadej Pogačar ( SLO ) · UAE Team Emirates XRG ; Second, Remco Evenepoel ( BEL ) · Red Bull-Bora-Hansgrohe ; Third, Isaac del Toro (…",      "lineage": null    },    {      "rank": 2,      "title": "Official website of Tour de France 2026",      "url": "http://www.letour.com/",      "snippet": "Tadej POGACAR · T. POGACAR. 73h 56' 26'' ; Mads PEDERSEN · M. PEDERSEN. 559 pts ; Richard CARAPAZ · R. CARAPAZ. 156 pts ; Isaac DEL TORO RO…",      "lineage": null    }  ]}

Get passages too

Set enrich to how many results to read. Each one that was read carries lineage with the passages that answer the query.

curl https://fluxsearch.io/api/v1/search \  -H "Authorization: Bearer $FLUX_API_KEY" \  -H "Content-Type: application/json" \  -d '{"query": "Tour de France 2026 winner", "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": "Tour de France 2026 winner", "max_results": 5, "enrich": 2},)print(response.json())
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: "Tour de France 2026 winner", max_results: 5, enrich: 2 }),});console.log(await response.json());
Response, trimmed
{  "request_id": "req_c2e36bcf320342a5919bcee5",  "query": "Tour de France 2026 winner",  "results": [    {      "rank": 1,      "title": "2026 Tour de France",      "url": "https://en.wikipedia.org/wiki/2026_Tour_de_France",      "snippet": "Winner, Tadej Pogačar ( SLO ) · UAE Team Emirates XRG ; Second, Remco Evenepoel ( BEL ) · Red Bull-Bora-Hansgrohe ; Third, Isaac del Toro (…",      "lineage": {        "results": [          {            "enriched_text": "Pogačar finished in the chasing bunch of sprinters, sealing his fifth Tour victory.",            "score": 0.6518877148628235          }        ]      }    },    {      "rank": 2,      "title": "Official website of Tour de France 2026",      "url": "http://www.letour.com/",      "snippet": "Tadej POGACAR · T. POGACAR. 73h 56' 26'' ; Mads PEDERSEN · M. PEDERSEN. 559 pts ; Richard CARAPAZ · R. CARAPAZ. 156 pts ; Isaac DEL TORO RO…",      "lineage": null    }  ]}

Only search sites you trust

List hosts in filters.allowed_domains, or exclude them with blocked_domains.

curl https://fluxsearch.io/api/v1/search \  -H "Authorization: Bearer $FLUX_API_KEY" \  -H "Content-Type: application/json" \  -d '{"query": "US Open 2026 results", "max_results": 5, "enrich": 0, "filters": {"allowed_domains": ["bbc.co.uk"]}}'
import osimport requestsresponse = requests.post(    "https://fluxsearch.io/api/v1/search",    headers={"Authorization": f"Bearer {os.environ['FLUX_API_KEY']}"},    json={"query": "US Open 2026 results", "max_results": 5, "enrich": 0, "filters": {"allowed_domains": ["bbc.co.uk"]}},)print(response.json())
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: "US Open 2026 results", max_results: 5, enrich: 0, filters: { allowed_domains: ["bbc.co.uk"] } }),});console.log(await response.json());
Response, trimmed
{  "request_id": "req_89f87887c9b44306bb820a9c",  "query": "US Open 2026 results site:bbc.co.uk",  "results": [    {      "rank": 1,      "title": "Zverev caps transformational year with US Open triumph - BBC",      "url": "https://www.bbc.co.uk/sport/tennis/articles/c1wx9qpxjg3o",      "snippet": "Alexander Zverev has finally landed his first US Open title, a 6-3 7-6 (7-2) 5-7 6-2 victory over Shelton in New York. -high fourth in the…",      "lineage": null    },    {      "rank": 2,      "title": "Zverev turns US Open tears into triumph - BBC",      "url": "https://www.bbc.co.uk/sport/tennis/articles/clyrkeyn5pgo",      "snippet": "Alexander Zverev stayed 'zen-like' to beat Ben Shelton and win the US Open, Getty Published 14 September 2026, won two in three months, ...",      "lineage": null    }  ]}

Request

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. 0 returns results without reading any pages, which is fastest.

Each result

rank (required)integer
Position in the results, starting at 1.
url (required)string
The page address. Always present.
title (required)string
The page title. Empty if the index has none.
snippet (required)string
The search index's summary of the page. Flux does not change it.
published_at (required)string | null
When the page was published, if the search index knows. Otherwise null.
lineage (required)SearchLineage | null
The passages Flux read from this page. Null when the page was not read.

Next steps