Docs
Dashboard
API reference / WebBeta

Search the web

Results from a web search provider (Brave Search API): title, URL, snippet, and the page's date and site name when known. With fetch, the top pages also come back as Markdown, opened like /v1/fetch in a real browser inside a sandbox; one page failing never fails the search. The same search by the same project within an hour is answered from the cache (cached: true) and not counted. Each other search counts against the plan's searchesPerMonth; beyond it the plan's extraSearchesPer1000Usd applies, and a plan without one (Free) answers 402 plan_limit until the 1st (UTC). The query text and options are sent to Brave with the platform's own key, nothing about the caller; the query text is kept 30 days. 60 per minute per project; every page fetch opens also counts against the fetch/screenshot/pdf limit.

POST/v1/search

Request

Method and pathPOST/v1/search
Base URLhttps://api.boxline.dev
AuthenticationYour API key in the x-api-key header (or Authorization: Bearer). The examples read it from BOXLINE_API_KEY.
Rate limitYes. See Rate limits for the numbers and headers.

Body

JSON with content-type: application/json. Required.

NameTypeDefaultAllowed valuesDescription
queryrequiredstring––What to search for (at most 75 words). Search operators work: quotes, -word, site:example.com, filetype:pdf. 1 to 400 characters.
limitinteger10–From 1 to 20.
countrystring––Where the results come from (case-insensitive): AR AU AT BE BR CA CL DK FI FR DE GR HK IN ID IT JP KR MY MX NL NZ NO CN PL PT PH RU SA ZA ES SE CH TW TR GB US, or ALL. UK means GB. Default US.
languagestring––The language of the results (case-insensitive): ar eu bn bg ca zh-hans zh-hant hr cs da nl en en-gb et fi fr gl de el gu he hi hu is it ja jp kn ko lv lt ms ml mr nb pl pt-br pt-pt pa ro ru sr sk sl es sv ta te th tr uk vi. A region is dropped when the language alone is listed (de-AT is de); zh-CN is zh-hans, zh-TW zh-hant, no nb. Default en.
recencystring–day, week, month, yearOnly pages published or changed in the last day
safeSearchstringmoderateoff, moderate, strict
fetchboolean | integerfalse–Also open the top pages and return them as Markdown: true = the top 3, or a number from 0 to 5. Needs the plan's quick APIs.
proxyobject––For the pages fetch opens only (the search itself never goes through it); needs fetch.

More examples:

Results, and the text of the top two pages
{"query":"playwright connect over cdp","limit":5,"fetch":2}
curl -X POST "https://api.boxline.dev/v1/search" \  -H "x-api-key: $BOXLINE_API_KEY" \  -H "content-type: application/json" \  -d '{"query": "best trail running shoes"}'

Responses

200 OK

The results.

Headers

  • RateLimit-Limit: Requests allowed in the current window of this route's limit. (Rate limits)
  • RateLimit-Remaining: Requests left in the current window. (Rate limits)
  • RateLimit-Reset: Seconds until the window starts again. (Rate limits)

Fields

NameTypeDefaultAllowed valuesDescription
querystring––The query as searched (white space collapsed).
resultsobject[]––
results[].titlestring––
results[].urlstring––An http(s) URL.
results[].snippetstring––Plain text.
results[].publishedAtstring––When the page was published or last changed. Format: date-time.
results[].siteNamestring––The site's name, e.g. "GitHub", when known.
results[].contentstring | null––Fetched results only: the page as Markdown, or null when it could not be loaded.
results[].pageobject | null––Fetched results only; null when the page could not be loaded.
results[].page.finalUrlstring––
results[].page.statusinteger | null––
results[].page.titlestring––
results[].page.captchastring | null–recaptcha, hcaptcha, turnstile, cloudflare, datadome, arkose, human
results[].page.msinteger––
results[].errorobject | null––Fetched results only; null when the page loaded.
results[].error.codestring––
results[].error.messagestring––
msinteger––The whole request
cachedboolean––Answered from this project's cache (the same search within the last hour); not counted.
Response 200
{  "query": "playwright connect over cdp",  "cached": false,  "ms": 412,  "results": [    {      "title": "BrowserType | Playwright",      "url": "https://playwright.dev/docs/api/class-browsertype",      "snippet": "A CDP websocket endpoint or http url to connect to.",      "siteName": "Playwright"    },    {      "title": "Connecting Playwright to an Existing Browser | BrowserStack",      "url": "https://www.browserstack.com/guide/playwright-connect-to-existing-browser",      "snippet": "Playwright can connect directly to an existing Chromium instance via CDP.",      "publishedAt": "2025-12-23T09:55:22.000Z",      "siteName": "BrowserStack"    }  ]}

Errors

Errors have a matching HTTP status and the same body. code is stable, so check it in your code; message is for people. See Errors and request ids.

StatusCodesWhen
400 Bad Requestinvalid_request, invalid_json, invalid_cursor, invalid_idempotency_key, invalid_extension, variables_with_extensions, terms_not_accepted, invalid_reset_token, invalid_confirmation_code, wrong_password, no_password, invalid_next, invalid_oauth_tokenThe request is not valid.
401 UnauthorizedunauthorizedMissing or invalid API key.
402 Payment Requiredfeature_not_in_plan, spend_limit, out_of_credit, plan_limit, spend_limit, out_of_credit, organization, project, plan, creditThe plan does not include this, a monthly allowance or spending limit is used up, the organization has no credit left, or the plan allows no more of this. spend_limit and out_of_credit carry error.details.limit: organization, project, plan or credit.
429 Too Many Requestsrate_limited, concurrency_limitToo many requests, or the organization's concurrent sessions (its plan's) or the project's concurrencyCap are in use.
503 Service Unavailableno_capacity, proxy_unavailable, provider_unavailable, search_unavailable, webhooks_unavailable, mail_unavailable, browser_unreachableNo machine free in time, proxies not set up, the model provider is not configured or has no key, or web search is not set up or its provider is not answering, or webhook delivery is not set up, or an email cannot be sent, or the session's browser did not answer in time.
Error body
{  "error": {    "code": "not_found",    "message": "session not found",    "requestId": "req_4fJx0aQm2Lk9Pz7N"  }}

Learn more

These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.