Search1API
Compatible APIs

SearXNG

Point a SearXNG instance URL at Search1API to keep using SearXNG's JSON search API, engine selection and categories without running an instance.

Search1API answers SearXNG's JSON search API. Replace the address of your SearXNG instance with:

https://api.search1api.com/compat/searxng/YOUR_API_KEY

Clients append /search to this address, or call it directly; both work. GET with query parameters and POST with a form body are accepted.

The URL contains your API key

SearXNG clients cannot send an authentication header, so the key is part of the URL. Treat the whole URL as a secret. Search1API masks the key in its own logs. Create a separate key in the dashboard for this URL so you can revoke it on its own.

Configure your client

In Admin Settings → Web Search, choose searxng and set Searxng Query URL, or set the environment variable:

SEARXNG_QUERY_URL="https://api.search1api.com/compat/searxng/YOUR_API_KEY/search?q=<query>"
SEARXNG_API_URL="https://api.search1api.com/compat/searxng/YOUR_API_KEY"
RETRIEVER=searx
SEARX_URL="https://api.search1api.com/compat/searxng/YOUR_API_KEY"
from langchain_community.utilities import SearxSearchWrapper

search = SearxSearchWrapper(
    searx_host="https://api.search1api.com/compat/searxng/YOUR_API_KEY"
)
results = search.results("hono cloudflare workers", num_results=5)

Or call it directly:

curl "https://api.search1api.com/compat/searxng/YOUR_API_KEY/search?q=hono+workers&format=json"

Parameters

ParameterBehavior
qThe query. Leading !go-style engine bangs, !news-style category bangs and :de-style language prefixes are applied, as in SearXNG.
formatjson or omitted. Other formats return 400.
enginesComma-separated SearXNG engine names; see the table below.
categoriesUsed when engines is not given: general, news, images, videos (YouTube), science (arXiv) and it (GitHub). Other categories search the web.
languageen, en-US and similar codes use the primary language. all and auto mean no filter.
time_rangeday, week, month or year.
pagenoResult page, 10 results per engine. See Result pages.

Other parameters, such as safesearch, theme and image_proxy, are ignored.

Engines

SearXNG engineBangSearches
google, bing, duckduckgo, yahoo, yandex, baidu, 360search, quark!go, !bi, !ddg, !yh, !yd, !bd, !360so, !qkThe same engine
wikipedia, grokipedia!wp, !gpThe same source
youtube, bilibili, imdb!yt, !bil, !imdbThe same source
github, arxiv, reddit!gh, !arxThe same source
sogou wechat!sogouwWeChat articles
google news, bing news, yahoo news, duckduckgo news, hackernews, reuters!gon, !bin, !yhn, !ddn, !hn, !reuNews from the same source
google images, bing images, duckduckgo images!goi, !bii, !ddiImages from the same engine

When engines lists names that are not in this table, they appear in unresponsive_engines with the reason engine not supported. If none of the listed engines is supported, the request falls back to categories, or to a web search.

Credits

Each engine searched costs 1 credit, the price of a native search. A request without engines searches one default engine for each category and costs 1 credit per category. Engines that cannot serve the requested page are skipped and not charged.

Response

The response has SearXNG's JSON shape: query, number_of_results, results, answers, corrections, infoboxes, suggestions and unresponsive_engines.

  • Results from several engines are merged. A URL found by more than one engine appears once, with every engine in engines and its ranks in positions.
  • score is calculated with SearXNG's formula from those ranks, so clients that sort by score keep working.
  • Each result has url, title, content, engine, engines, positions, score, category, template, parsed_url and publishedDate.
  • Image results also have img_src and thumbnail_src. Their url is the image URL, not the page it appears on.
  • number_of_results is always 0, and answers, corrections, infoboxes and suggestions are always empty.

Errors

Errors return { "error": "message" } with the status code. When every selected engine fails, the request returns the most relevant error, such as 401 for an invalid key or 429 for the rate limit. When only some engines fail, the request succeeds and lists them in unresponsive_engines.

On this page