API ReferenceIntroduction
Web Search Endpoints
Web Search
Search the web and get structured results. Perfect for research agents, RAG pipelines, and any application that needs real-time web data.
POST
/v1/searchExecute one or more search queries and get structured results.
Request Body
| Parameter | Type | Description |
|---|---|---|
queriesrequired | string[] | Array of search queries (1-3 queries) |
limit | number | Number of results per query (1-50). Defaults to 10 |
location | string | Search location code (e.g., "US", "IN"). See supported countries |
includeDomains | string[] | Only include results from these domains (adds site: filter) |
excludeDomains | string[] | Exclude results from these domains (adds -site: filter) |
engine | "google" | "bing" | "chatgpt" | "perplexity" | Search engine to use. Defaults to "google" |
Example Request
Example Response
Response Structure
Top-level Fields
| Field | Type | Description |
|---|---|---|
results | array | Array of search result objects for each query |
total | number | Total number of queries executed |
successful | number | Number of successful queries |
failed | number | Number of failed queries |
totalTimeMs | number | Total time taken in milliseconds |
timestamp | string | ISO timestamp of the response |
cost | number | Total cost of the request in USD |
Query Result Object
Each item in the
results array contains:| Field | Type | Description |
|---|---|---|
query | string | The search query |
success | boolean | Whether the search was successful |
results | array | Array of search result items |
loadTimeMs | number | Time taken to execute the search |
cost | number | Cost of this query in USD |
error | string | Error message if search failed |
Search Result Item
Each search result item contains:
| Field | Type | Description |
|---|---|---|
url | string | URL of the search result |
title | string | Title of the search result |
description | string | Snippet/description from the search result |
Domain Filtering
You can filter search results to include or exclude specific domains using the
includeDomains and excludeDomains parameters.Include Only Specific Domains
Exclude Specific Domains
Multiple Queries
You can execute up to 3 search queries in a single request for better efficiency:
The response will contain results for each query in the same order:
Pricing
Each search query costs
$$0.007 base + $$0.001 per page of 10 results. For the default limit of 10 results (1 page), each query costs $$0.008. Multi-query requests are charged per query.Supported Locations
Pass any ISO 3166-1 alpha-2 country code as the
location parameter to geo-target your search results. View all supported countries