Answer with current sources
Search when your agent needs information beyond its training data. Keep the source URLs alongside its answer.
Search API reference →Search engine for agents
Give your agent a way to look up current information. Search the web, request content from specific pages, or connect through MCP.
Get a free API key See an example
$0.00613 a credit 1,000 free credits a month, no card No SDK to install
Results
Industry-leading web retrieval. Search APIs are easy to compare on price and speed; what decides whether your agent answers well is the quality of what comes back to it.
| Search API | Results returned of 20 |
|---|---|
| Trawlia | 20 |
| Engine A | 19.31 |
| Engine B | 18.13 |
| Engine C | 9.13 |
From a question to a source
Basic search looks for links and snippets. Advanced search also attempts to fetch the matching pages and extract their content. Searches can return no matches, and some pages cannot be retrieved.
curl https://api.trawlia.co/v1/search \
-H "authorization: Bearer twl_..." \
-H "content-type: application/json" \
-d '{
"query": "latest Python release notes",
"search_depth": "advanced"
}' Replace twl_... with your API key. This advanced request costs 2 credits.
Inspect any returned results before using them. Check fetched and fetch_error to see whether page retrieval succeeded; an empty result list means no matches were returned.
{
"results": [
{
"title": "Page title",
"url": "https://example.com/release-notes",
"content": "Readable text extracted from the page…",
"fetched": true,
"fetch_error": null
}
]
} Illustrative response excerpt; live results depend on your query. See the full response format →
Search when your agent needs information beyond its training data. Keep the source URLs alongside its answer.
Search API reference →Request content from a list of URLs for research or your retrieval pipeline. Check which pages were successfully extracted.
Extract page content →Connect the MCP server to give your agent search and extraction tools without writing an HTTP integration.
Connect with MCP →Speed
18ms
cached
275ms
first ask
94%
of results carried a citable publisher URL
Median of 16 fixed queries at basic depth, measured
against the production API by npm run bench on
2026-08-14. A call that errored is
counted, never dropped.
Pricing
$0.00613a credit
On the Scale plan: $49 a month for 8,000 credits.
One balance and a published price for every operation, so you can work out what a call costs before you make it. A basic search is one credit, advanced is two, and extraction is one credit per five URLs. The free plan includes 1,000 credits each month: enough for 1,000 basic searches or 500 advanced searches. Paid plans renew monthly; see pricing for billing details.
Getting started
Plain HTTP and a bearer token, so there is no SDK to install and no version of ours to keep up with. Drop it into an agent loop or a RAG pipeline: start with a request below, then use the same endpoint in your application.
curl https://api.trawlia.co/v1/search \
-H "authorization: Bearer twl_..." \
-H "content-type: application/json" \
-d '{
"query": "latest Python release notes",
"search_depth": "advanced"
}' import os, requests
def web_search(query: str, depth: str = "basic") -> str:
"""Search the live web. Returns ranked pages as Markdown, each with its source URL."""
res = requests.post(
"https://api.trawlia.co/v1/search",
headers={"authorization": f"Bearer {os.environ['TRAWLIA_API_KEY']}"},
json={"query": query, "search_depth": depth},
timeout=60, # advanced depth fetches every result
)
res.raise_for_status()
data = res.json()
# raise_for_status already separated the cases: 502 means the search could
# not be served, 429 means it is being paced, and reaching here with an
# empty list means the search genuinely found nothing.
if not data["results"]:
return "No results for that query."
return "\n\n".join(
f"## {r['title']}\n{r['url']}\n\n{r['content']}" for r in data["results"]
) /** Search the live web. Returns ranked pages as Markdown, each with its source URL. */
export async function webSearch(
query: string,
depth: "basic" | "advanced" = "basic",
): Promise<string> {
const res = await fetch("https://api.trawlia.co/v1/search", {
method: "POST",
headers: {
authorization: `Bearer ${process.env.TRAWLIA_API_KEY}`,
"content-type": "application/json",
},
body: JSON.stringify({ query, search_depth: depth }),
});
if (!res.ok) throw new Error(`trawlia ${res.status}: ${await res.text()}`);
const data = await res.json();
if (data.results.length === 0) return "No results for that query.";
return data.results
.map((r: any) => `## ${r.title}\n${r.url}\n\n${r.content}`)
.join("\n\n");
} Point a coding agent at agents.md and it has the setup without reading this page. Generated from the code that serves the requests, so it cannot describe an endpoint that no longer exists.
openapi.json covers both endpoints and every parameter, also generated. llms.txt is the short index for a model landing on the domain.
trawlia-mcp exposes search and extract as two tools, returning readable text rather than raw JSON. One line to add it to Claude Code, Claude Desktop or Cursor.
1,000 credits a month, no card, and the same API the paid plan gets. Run your own evaluation set through it and check the sources and content yourself.