Docs / API reference

POST/v1/search

Search

Search the web, then optionally scrape each result page and return structured content. Async job with polling.

Execution model

Live request

Runtime depends on endpoint, target, pagination, rendering mode, and active plan limits.

Credit weight

Live catalog

Current weights are managed from the Data API Weights admin table and shown on pricing before use.

Parameters

NameTypeRequirementDescription
querystringRequiredThe search query.
num_resultsnumberOptionalNumber of search results to scrape.
enginestringOptionalSearch engine: "google" (SearXNG), "duckduckgo", or "brave".
formatsArray<string | object>OptionalOutput formats for scraped results. Supports string formats and object configs for markdown mode and screenshot capture, same as /scrape.
only_main_contentbooleanOptionalExtract only the main content from each result.
mobilebooleanOptionalEmulate a mobile device viewport for scraping.
mobile_devicestringOptionalMobile device preset name.
headersobjectOptionalCustom HTTP headers for scraping.
cookiesobjectOptionalCustom cookies for scraping.
extractobjectOptionalLLM extraction config applied to each result: { prompt, schema, provider, model }.
google_api_keystringOptionalGoogle Custom Search API key (alternative to SearXNG).
google_cxstringOptionalGoogle Custom Search Engine ID.
brave_api_keystringOptionalBrave Search API key.
webhook_urlstringOptionalWebhook URL for search completion notification.
webhook_secretstringOptionalHMAC secret for webhook signature verification.

Response fields

FieldTypeDescription
job_idstringPoll GET /search/{job_id} (or SSE) for results.
statusstringCurrent job status: started, running, completed, failed, or cancelled.
time_takennumberElapsed processing time in seconds once timing is available.
data[]objectSearch results with rank, title, url, snippet, and optional scraped content fields.

Code example

curl -X POST "https://api.datablue.dev/v1/search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "best python web scraping libraries 2026",
  "num_results": 5,
  "engine": "google",
  "formats": [
    "markdown"
  ]
}'

System responses

200 OK

Request processed successfully.

401 UNAUTHORIZED

Missing or invalid API key.

429 RATE LIMIT

System capacity exceeded.

500 SYSTEM FAILURE

Internal core exception.

Example response
{
  "success": true,
  "job_id": "550e8400-e29b-41d4-a716-446655440001",
  "status": "started",
  "message": "Search job started"
}