Docs/Search
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
| Name | Type | Requirement | Description |
|---|---|---|---|
| query | string | Required | The search query. |
| num_results | number | Optional | Number of search results to scrape. |
| engine | string | Optional | Search engine: "google" (SearXNG), "duckduckgo", or "brave". |
| formats | Array<string | object> | Optional | Output formats for scraped results. Supports string formats and object configs for markdown mode and screenshot capture, same as /scrape. |
| only_main_content | boolean | Optional | Extract only the main content from each result. |
| mobile | boolean | Optional | Emulate a mobile device viewport for scraping. |
| mobile_device | string | Optional | Mobile device preset name. |
| headers | object | Optional | Custom HTTP headers for scraping. |
| cookies | object | Optional | Custom cookies for scraping. |
| extract | object | Optional | LLM extraction config applied to each result: { prompt, schema, provider, model }. |
| google_api_key | string | Optional | Google Custom Search API key (alternative to SearXNG). |
| google_cx | string | Optional | Google Custom Search Engine ID. |
| brave_api_key | string | Optional | Brave Search API key. |
| webhook_url | string | Optional | Webhook URL for search completion notification. |
| webhook_secret | string | Optional | HMAC secret for webhook signature verification. |
Response fields
| Field | Type | Description |
|---|---|---|
| job_id | string | Poll GET /search/{job_id} (or SSE) for results. |
| status | string | Current job status: started, running, completed, failed, or cancelled. |
| time_taken | number | Elapsed processing time in seconds once timing is available. |
| data[] | object | Search 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"
}