Build powerful AI applications with our search API
Two endpoints give your agent the live web: Search finds the pages, Fetch reads one of them.
One call to our web index gathers the pages for a query, and the results come back scored, sorted and rendered as Markdown. Reading a page is a separate action, done on our own servers, so it carries no per-page fee.
Base URL
https://agentsearch.tech/v1
Every endpoint is also mounted under /api/v1
- /v1/search and
/api/v1/search are the same endpoint.
The search we run does not support image search yet, so neither do we. Text search, and fetching a page that happens to contain images, are unaffected.
All API requests require authentication using an API key. You can generate API keys in your dashboard.
Example Request
curl -X POST "https://agentsearch.tech/v1/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "hello"}'
One call to our web index gathers the pages for a query, and the results come back scored, sorted and rendered as Markdown.
Endpoint
POST /v1/search
| Parameter | Type | Description |
|---|---|---|
| query | string | Search query (required, 1-128 characters). Accepts the search syntax. |
| limit | integer | Max results to return (1-50, default: 10). The older name max_results is still accepted as an alias. It does not change the price. |
| need_content | boolean | Return the full page text instead of its summary (default: false) |
| ori_question | string | The question the user actually asked, when it is longer than the query (max 128 characters). It helps the search grasp the intent. |
| localization | string | IP address whose region the results should be localised for. |
| sources | array | Deprecated and ignored - we decide which pages to gather |
curl -X POST "https://agentsearch.tech/v1/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "AGI 2026", "limit": 5}'
content
With need_content: false (the default) each result carries the search
engine's summary - a long, dense read of the page. With
need_content: true it carries the page body itself, and the summary is
not returned. The summary is what an agent usually wants; ask for the body when you
need to quote the page verbatim.
The query is passed to the search service as it is, so the search syntax works inside it. Operators can be combined in one query.
| Operator | Example | What it does |
|---|---|---|
site: | search api site:github.com | Restrict the results to a site. Several sites are joined with OR: site:github.com OR site:huggingface.co. |
-site: | search api -site:example.com | Exclude a site. |
- | search api -ads | Exclude pages containing the word. |
-"..." | search api -"release notes" | Exclude pages containing the phrase. |
"..." | search api "exact phrase" | Match the phrase exactly. |
lang: | search api lang:zh,en | Restrict the results to a language. |
after: | search api after:2025-01-01 | Only pages published after the date. |
before: | search api before:2026-06-01 | Only pages published before the date. |
curl -X POST "https://agentsearch.tech/v1/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "search api site:github.com OR site:huggingface.co lang:en after:2025", "limit": 10}'
Read one page and get its text. The page is fetched by us - not by the search - and the call is counted against the fetch allowance, which is separate from the search allowance.
Endpoint
POST /v1/fetch
| Parameter | Type | Description |
|---|---|---|
| url | string | The page to read (required) |
| max_chars | integer | How much text to return (200-100000, default: 20000) |
Only public addresses are fetched: a URL that resolves to a private or loopback address is refused.
curl -X POST "https://agentsearch.tech/v1/fetch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/article"}'
truncated says so.text - not content, which is the search endpoint's field.The page is read on our own servers, so reading a page carries no per-page fee and is not billed per page. It is only counted against your fetch allowance.
Every response is a flat JSON object. There is no data envelope and no
code field: a successful call is HTTP 200 with the body below, and a failed
one is an HTTP error with a detail string.
Search response
{
"query_id": "search_e6bb86e4b7ed",
"intent": "tech",
"results": [
{
"title": "Page title",
"url": "https://example.com/page",
"content": "The summary of the page, or its full body when need_content is true.",
"snippet": "The first 300 characters of the content.",
"source": "web",
"quality_score": 0.89,
"published_date": "2026-06-01T00:00:00+00:00",
"author": null,
"authority": 3,
"rerank_score": 2.4,
"site_name": "Example News"
}
],
"total_results": 5,
"structured_markdown": "# Search Results for: ...\n\n...",
"total_tokens": 2117,
"latency_ms": 443,
"cached": false,
"sources_used": ["web"],
"unavailable_sources": []
}
| Field | What it is |
|---|---|
| query_id | Identifier of this search, for your own logging. |
| intent | How the query was classified: news, tech, finance, academic or general. |
| results | The pages that were found, best first. |
| total_results | How many results were found. |
| structured_markdown | The same results rendered as Markdown, ready to drop into a prompt. |
| total_tokens | The size of the text you received, estimated in tokens. It is what the results cost you to read - the search calls no language model. |
| latency_ms | How long the call took, in milliseconds. |
| cached | True when the answer came from our cache. |
| sources_used | Which source served the search. Always "web". |
| unavailable_sources | Sources that could not be used. Empty for a web search. |
| Field | What it is |
|---|---|
| quality_score | Our own score, 0 to 1. It combines the search engine's authority rating and ranking with the relevance, recency and completeness of the page. |
| authority | The search engine's own authority rating, 0 to 4 (-1 when unknown). 3 or more is a highly authoritative page. |
| rerank_score | The search engine's own ranking, 0 to 3. 1.5 or more marks a strong result. |
| published_date | The publication date in UTC (RFC 3339), or null when the source does not know it. It is a field of its own - nothing has to be parsed out of the text. |
| site_name | The name of the site the page came from, when the engine knows it. |
The date is the published_date field, in UTC. It is null when
the engine has no date for the page - not a string with a date glued onto the content.
Fetch response
{
"url": "https://example.com/article",
"requested_url": "https://example.com/article",
"status": 200,
"content_type": "text/html",
"title": "Example article",
"text": "The readable text of the page.",
"bytes": 17089,
"truncated": false,
"latency_ms": 876,
"fetches_used": 1,
"fetch_limit": 20
}
A search may take up to 30 seconds before it is given up on, and the call then answers 504. Retry a 504, a 429 or a 502 after a short pause. Do not retry a 400 or a 422 unchanged - the request itself is wrong and will fail the same way.
An error answers with a JSON body carrying a detail
string that says what went wrong: {"detail": "..."}
| HTTP Code | Meaning |
|---|---|
| 400 | The request was rejected - a field is invalid. The detail names the field. |
| 401 | The API key is missing, invalid or expired. |
| 402 | Your plan does not include this action at all - there is no search or fetch allowance on it. Going over the allowance is not this error: an overage is served and priced. |
| 422 | The body does not validate - a missing query, a limit outside 1-50, a query longer than 128 characters. |
| 429 | Rate limit exceeded. Back off and retry. |
| 502 | The search backend failed or answered something unusable. Retry. |
| 503 | The search backend is not available or not configured. This one is ours to fix, not yours. |
| 504 | The search did not answer in time. Retry. |
Search and Fetch are two separate meters. The allowance below is what each plan includes per period, and the request rate is the maximum number of requests per second:
Calls beyond the allowance are counted and priced at $2.5 per 1000 - Search and Fetch are priced separately - and the request is still served: an overage never interrupts a call.
A search is billed per successful call - not per token, and not per result. The number of results you ask for does not change what a call costs.
limit: 1 and limit: 50 cost the same.The plans and what they include are on the pricing page.
Add AgentSearch to your AI agent system prompt for web search capabilities.
Skill URL
https://agentsearch.tech/v1/search/mcp-skill
## AgentSearch API Access
Base URL: https://agentsearch.tech/v1
Authentication: Bearer Token
Token: YOUR_API_KEY
Example curl command:
curl -X POST "https://agentsearch.tech/v1/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "your search query here", "limit": 10}'
API Endpoints:
• POST /v1/search - Search the web. Body: {"query": "...", "limit": 10, "need_content": false}
• POST /v1/search/stream - The same search, as an SSE stream
• POST /v1/fetch - Read one page and return its text. Body: {"url": "https://..."}
• GET /v1/search/sources - The source the search gathers from ("web")
• GET /v1/usage/ - How much of your allowance is left
• POST /v1/mcp - MCP (JSON-RPC): agentsearch_search, agentsearch_fetch,
agentsearch_classify_intent, agentsearch_list_sources
Notes:
• Search and Fetch are two separate allowances: reading a page does not
use up the search allowance, and a search does not use up the fetch one.
• The query accepts the search syntax: site:, -site:, -, -"...", "...",
lang:, after:, before:.
The same two tools are served over MCP (JSON-RPC) on the same key:
POST https://agentsearch.tech/v1/mcp
Tools: agentsearch_search, agentsearch_fetch,
agentsearch_classify_intent, agentsearch_list_sources.
For Claude Code agents, the Claude Code setup page generates the skill file and the commands to install it.
~/.claude/skills/agentsearch/skill.json