Search the web
/searchRun a web search through agntdata and optionally return the full page content of each result in one call. Supports web, news, and image sources. Ideal when an agent needs to find pages by query rather than by known URL.
Call it over REST
Authenticate with a bearer token against https://api.agntdata.dev. Swap the placeholders for your key and parameter values.
curl -s -X POST "https://api.agntdata.dev/search" \
-H "Authorization: Bearer <YOUR_AGNTDATA_API_KEY>" \
-H "Content-Type: application/json" \
-d '{ "query": "<string>" }'Copy-paste prompt
Paste this into a coding agent. It connects the superagnt MCP server, finds the tool data_web_search, and runs a first call — with the REST fallback if MCP is unavailable.
You are wiring up the agntdata "Web" API to use this endpoint: Search the web.
1. CONNECT over MCP (preferred). Add the superagnt MCP server, then let the client
run OAuth on first tool call — no token to paste:
claude mcp add --scope user --transport http superagnt https://mcp.superagnt.com/mcp
claude mcp login superagnt
MCP endpoint: https://mcp.superagnt.com/mcp
After connecting, the tool you want is named exactly:
data_web_search
Call agnt_tools_search or agnt_tools_list_enabled to confirm it is available.
2. REST fallback (if you are not using MCP):
POST https://api.agntdata.dev/search
Header: Authorization: Bearer <YOUR_AGNTDATA_API_KEY>
Required parameters:
- query (string, required) — The search query.
Optional parameters:
- limit (integer, optional) — Number of results per source. Default 10.
- sources (array, optional) — Which result sources to query. Defaults to ['web']. Each entry is a preset string or an object with a `type`.
- categories (array, optional) — Restrict results to these categories.
- tbs (string, optional) — Time-based search filter (e.g. 'qdr:d' for past day).
- location (string, optional) — Geo-target for the search (e.g. 'San Francisco, California, United States').
- country (string, optional) — ISO country code. Default 'US'.
- includeDomains (array, optional) — Only return results from these hostnames (mutually exclusive with excludeDomains).
- excludeDomains (array, optional) — Exclude results from these hostnames (mutually exclusive with includeDomains).
- timeout (integer, optional) — Request timeout in milliseconds. Default 60000.
- scrapeOptions (object, optional) — When provided, each result is also scraped and its content returned. Accepts the same content options as /scrape (e.g. `formats`, `onlyMainContent`). Increases cost because every result is fetched.
3. COST & KEY. This endpoint is priced per call in credits, and each successful response reports its own cost in its meta.costCents field. Only successful calls are charged.
Get an agntdata API key at https://app.agntdata.dev.
4. TEST. Connect the server (or set the key), discover the tool
(data_web_search), run one minimal call with just the required parameters,
and report back the shape of the JSON response (top-level fields).
Reference (machine-readable variant): https://superagnt.com/docs/apis/web/endpoints/search.md{
"name": "search",
"description": "Runs a web search and returns result URLs + snippets — cheap; use this first and read the snippets. Add `scrapeOptions` ONLY when you actually need the full text of the pages, because it then downloads and bills EVERY result — keep `limit` small when you do (a few results, not dozens). To read specific pages, prefer searching first and then scraping just the one or two URLs you chose. Supports web, news, and image sources.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"maxLength": 500,
"description": "The search query."
},
"limit": {
"type": "integer",
"description": "Number of results per source. Default 10.",
"minimum": 1,
"maximum": 100,
"default": 10
},
"sources": {
"type": "array",
"description": "Which result sources to query. Defaults to ['web']. Each entry is a preset string or an object with a `type`.",
"items": {
"oneOf": [
{
"type": "string",
"enum": [
"web",
"news",
"images"
]
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"web",
"news",
"images"
]
}
}
}
]
}
},
"categories": {
"type": "array",
"items": {
"type": "string",
"enum": [
"github",
"research",
"pdf"
]
},
"description": "Restrict results to these categories."
},
"tbs": {
"type": "string",
"description": "Time-based search filter (e.g. 'qdr:d' for past day)."
},
"location": {
"type": "string",
"description": "Geo-target for the search (e.g. 'San Francisco, California, United States')."
},
"country": {
"type": "string",
"description": "ISO country code. Default 'US'.",
"default": "US"
},
"includeDomains": {
"type": "array",
"items": {
"type": "string"
},
"description": "Only return results from these hostnames (mutually exclusive with excludeDomains)."
},
"excludeDomains": {
"type": "array",
"items": {
"type": "string"
},
"description": "Exclude results from these hostnames (mutually exclusive with includeDomains)."
},
"timeout": {
"type": "integer",
"description": "Request timeout in milliseconds. Default 60000.",
"minimum": 1000
},
"scrapeOptions": {
"type": "object",
"description": "When provided, each result is also scraped and its content returned. Accepts the same content options as /scrape (e.g. `formats`, `onlyMainContent`). Increases cost because every result is fetched.",
"properties": {
"formats": {
"type": "array",
"items": {},
"description": "Output formats for each scraped result (e.g. ['markdown'])."
},
"onlyMainContent": {
"type": "boolean",
"default": true
}
}
}
},
"required": [
"query"
]
}
}| Name | In | Type | Required | Description |
|---|---|---|---|---|
query | body | string | required | The search query. |
limit | body | integer | optional | Number of results per source. Default 10. |
sources | body | array | optional | Which result sources to query. Defaults to ['web']. Each entry is a preset string or an object with a `type`. |
categories | body | array | optional | Restrict results to these categories. |
tbs | body | string | optional | Time-based search filter (e.g. 'qdr:d' for past day). |
location | body | string | optional | Geo-target for the search (e.g. 'San Francisco, California, United States'). |
country | body | string | optional | ISO country code. Default 'US'. |
includeDomains | body | array | optional | Only return results from these hostnames (mutually exclusive with excludeDomains). |
excludeDomains | body | array | optional | Exclude results from these hostnames (mutually exclusive with includeDomains). |
timeout | body | integer | optional | Request timeout in milliseconds. Default 60000. |
scrapeOptions | body | object | optional | When provided, each result is also scraped and its content returned. Accepts the same content options as /scrape (e.g. `formats`, `onlyMainContent`). Increases cost because every result is fetched. |
Search results, optionally including scraped page content.
{
"type": "object"
}This endpoint is priced per call and deducted from your agntdata balance; only a successful call is billed. Every billable response reports its own cost in meta.costCents.
Get a key at app.agntdata.dev.
start calling
Point your client at https://mcp.superagnt.com/mcp and your agent has this endpoint, plus every other source on one balance.