Documentation
API Reference
You can also build your own scripts or use LangChain / LlamaIndex by hitting the standard REST API.
Note: A fully interactive Swagger UI is available at http://localhost:8080/docs to test and explore the API.
Web Search
Endpoint: POST /api/v1/search
Request:
| |
Additional Optional Parameters:
limit: Optional upper bound for returned search results. Omit it or set0to use the provider or search engine default. Some providers cap this value or apply it after receiving results.engine: The search engine to query (e.g.,"auto","google","duckduckgo"). Defaults to"auto"(searches all engines and deduplicates). Note: Only applies if the server is configured to use theddgsorsearxngprovider.region: Region or locale hint (e.g.,"wt-wt","us-en"). Provider support differs. Brave maps supported country-language style values such as"us-en"to Bravecountry=USandsearch_lang=en; unsupported country or language parts are omitted.timelimit: Time limit for the search ("d"=day,"w"=week,"m"=month,"y"=year). Leave empty for no limit.safesearch: Safe search filtering ("on","moderate","off"). Defaults to"moderate".page: The page number of results to fetch. Defaults to1.
Response:
| |
Errors:
400: Invalid request payload or missingquery.502: Configured search provider request failed, returned a non-success status, or returned an invalid response. Provider errors are safe public messages that do not include search queries, request bodies, tokens, or raw upstream URLs.500: Unexpected gateway failure.
Fetch URL
Endpoint: POST /api/v1/fetch
Request:
| |
(Set js_render: true if you need the worker to execute JavaScript for Single Page Applications, though it is slower).
Response:
| |