JSON API

Query the web, images, news, videos, and maps over a simple public POST endpoint. No API key required — requests are rate-limited per IP.

Making a request

Send a POST to /api with a JSON body.

POST /api
Content-Type: application/json

{
  "query": "searchia",
  "type": "web",
  "page": 0
}

Request fields

Field Type Description
query string Required. The search query.
type string Optional, defaults to web. One of web, images, news, videos, maps.
page integer Optional, defaults to 0. The result offset. 0 is the first page; increment to paginate. Capped at 100. On the website, scrolling also updates ?p= in the URL so pages are shareable.
safesearch string Optional, defaults to moderate. One of off, moderate, strict. Applies to Brave results.
country string Optional, defaults to all. Use all or a 2-letter ISO country code (e.g. us, de). Applies to Brave results.

Examples

curl

curl -X POST https://www.searchia.uk/api \
  -H "Content-Type: application/json" \
  -d '{"query":"searchia","type":"web","page":0}'

JavaScript

const res = await fetch("https://www.searchia.uk/api", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ query: "searchia", type: "web", page: 0 }),
});

const data = await res.json();
console.log(data.results);

CLI

The searchia CLI wraps this API for terminals and agents. No API key. Install from npm (npm i -g searchia) or run with npx:

npx searchia "cloudflare workers"
npx searchia images "teto" -n 5
npx searchia news elections --json
npx searchia videos "lofi beats" -n 5
npx searchia "rust async" --urls
npx searchia suggest sear

Useful flags: --type, --page, --limit, --engine, --safesearch, --country, --json, --urls, --base-url. Exit code 2 means rate limited.

Responses

Every successful response returns an object with query, type, page, along with more_results_available and the main results object.

Web (type: "web")

results is an object grouping the different result kinds. Fields are null when absent for a given query.

{
  "query": "searchia",
  "type": "web",
  "page": 0,
  "badResults": false,
  "more_results_available": true,
  "results": {
    "web": {
      "results": [
        {
          "title": "…",
          "url": "https://…",
          "description": "…",
          "age": "…",
          "meta_url": { "hostname": "…", "favicon": "…" },
          "profile": { "name": "…", "img": "…" },
          "thumbnail": { "src": "…" },
          "deep_results": { "buttons": [{ "title": "…", "url": "…" }] },
          "cluster": [{ "title": "…", "label": "…", "url": "…", "description": "…" }]
        }
      ]
    },
    "news": { "results": [ … ] },
    "videos": { "results": [ … ] },
    "discussions": { "results": [ … ] },
    "faq": { "results": [ … ] },
    "infobox": { "results": [ … ] },
    "rich": [ … ],
    "qanda": …,
    "locations": …,
    "images": …,
    "mixed": [ … ]
  }
}

rich carries instant answers (calculator, weather, currency, crypto, timezones, unit conversions, and more), each tagged with a subtype. mixed mirrors the upstream ordering of the main column.

Images (type: "images")

{
  "query": "teto",
  "type": "images",
  "page": 0,
  "more_results_available": true,
  "results": [
    {
      "title": "…",
      "url": "https://…",
      "source": "…",
      "thumbnail": "https://…",
      "properties": { "url": "https://…", "width": 1200, "height": 800 },
      "meta_url": { "hostname": "…", "favicon": "…" }
    }
  ]
}

News (type: "news")

{
  "query": "elections",
  "type": "news",
  "page": 0,
  "more_results_available": true,
  "results": [
    {
      "title": "…",
      "url": "https://…",
      "description": "…",
      "age": "…",
      "meta_url": { "hostname": "…", "favicon": "…" },
      "profile": { "name": "…", "img": "…" },
      "thumbnail": { "src": "…" },
      "is_live": false
    }
  ]
}

Videos (type: "videos")

{
  "query": "lofi beats",
  "type": "videos",
  "page": 0,
  "more_results_available": true,
  "results": [
    {
      "title": "…",
      "url": "https://…",
      "description": "…",
      "age": "…",
      "meta_url": { "hostname": "…", "favicon": "…" },
      "profile": { "name": "…", "img": "…" },
      "thumbnail": { "src": "…" },
      "video": { "duration": "10:01", "creator": "…" }
    }
  ]
}

Maps (type: "maps")

Returns Mapbox place suggestions. page and engine are ignored.

{
  "query": "eiffel tower",
  "type": "maps",
  "page": 0,
  "engine": "mapbox",
  "more_results_available": false,
  "results": [
    {
      "id": "…",
      "name": "…",
      "place": "…",
      "full": "…",
      "type": "poi",
      "coords": [2.2945, 48.8584]
    }
  ]
}

Pagination

Start at page: 0. If the response has more_results_available: true, request page: 1, then 2, and so on. When it is false there is nothing more to fetch.

Errors

Errors are returned as JSON with an error string and a matching status code.

Status Meaning
400 Bad body, missing query, unknown type, or invalid page.
429 Rate limit exceeded for your IP. Retry after the Retry-After header.
502 The upstream search failed.
503 A required secret or rate limiter is unavailable (e.g. translation not configured).
{ "error": "missing required field: query" }

Autocomplete (/suggest)

Send a GET to /suggest with a partial query.

GET /suggest?q=weath

Query parameters

Param Type Description
q string Required. The partial query to complete, up to 100 characters.

Response

The suggestions field is an ordered array. Plain completions carry just a query; rich entities (people, places, and more) set entity and add the best-effort fields below.

{
  "suggestions": [
    { "query": "weather" },
    { "query": "weather radar" },
    {
      "query": "elon musk",
      "entity": true,
      "name": "Elon Musk",
      "desc": "businessman and entrepreneur (born 1971)",
      "category": "person",
      "img": "https://imgs.search.brave.com/…"
    }
  ]
}
Field Type Description
query string The suggested query. Always present.
entity boolean true on entity suggestions; absent otherwise.
name string The entity's display name.
desc string A short description.
category string E.g. person, place.
img string Thumbnail URL, when one is available.

curl

curl "https://www.searchia.uk/suggest?q=weath"