How to give your AI agent live web search without a search API key
Connect your agent to apifare and ask it to search: the dataforseo capability returns live Google results (title, URL, snippet and position for each) on your apifare key. You don't need a search provider account or a search key of your own.
Copy this line to your agent once apifare is connected:
Use apifare's dataforseo capability with {"q": "latest Node.js LTS release", "count": 5} and give me the top results with their links.Why does my agent need live search?
A model's training data stops at a cutoff date. Release versions, prices, docs and news keep changing after it, so without search an agent either guesses or says it doesn't know. With search it can answer from today's results and cite a link you can check.
What does a search return?
Google's organic results for your query, as a compact list: each result's title, url, description (the snippet) and position. It is shaped for an agent to read, not the provider's raw response.
It takes one required field and three optional ones:
q: the search query.count: how many results, from 1 to 100 (10 by default).country: a country code such as"us","gb"or"hk"("us"by default).language: a language code such as"en"or"zh"("en"by default).
Do I need a Google or DataForSEO account?
No. dataforseo is resold: apifare holds the provider account, and your balance pays the capability's listed price per call. You only need your apifare key.
If you'd rather search through your own Brave Search key, vault it once and use the web-search capability instead. apifare meters those calls at a flat fee, and your Brave account pays Brave.
What does a search cost, and what if nothing matches?
The per-call price is listed on /capabilities, and that listed number is exactly what your balance is debited.
A search that comes back with zero results still ran, so it bills as listed. Nothing matching is an answer too. The fix is a better query (broader terms, fewer qualifiers), not the same query again. A call the provider fails to deliver is refunded automatically, and the error body says so (refunded: true).
How do I stop a research loop from running up a bill?
Research agents loop: search, read, search again. Every call is debited from one prepaid balance with a hard stop at zero. Per-agent daily and monthly caps, allowlists and a kill switch are checked before a call is dispatched, failed provider calls are refunded, and every call lands on a signed audit chain you can export. More: give your agent a budget.
For agents: the exact calls
- Over MCP (
apifare-mcp):call_apiwith slugdataforseoand params{"q": "…", "count": 5, "country": "us"}. Not sure of the slug?search_apisfinds it. - Over HTTP:
POST https://apifare.com/v1/call/dataforseowithAuthorization: Bearer $APIFARE_TOKENand the JSON body{"q": "…", "count": 5, "country": "us"}. - Zero results: rephrase before you search again; the same query returns the same nothing.
- On HTTP 402 the balance is empty: relay the body's
human_readableline to your human, wait for the top-up, then retry the same call. Every other error and its fix: the error catalog.
For humans: set it up
- Connect your agent. Paste
set up https://apifare.com/SKILL.mdinto it: it gets a key ($5 of calls free), writes its own config and makes a first call. Or get a key at /start and follow your client's setup guide. - Ask.
Search the web for the latest release notes of <project> and link your sources.
Which tool for which job
| Job | Tool | Runs on |
|---|---|---|
| Live Google results for a query | dataforseo | ready to run |
| Read one of the result pages as markdown | scrape | ready to run |
| Search through your own Brave Search key | web-search | your key |
| Several pages of Google results, with add-ons such as AI Overviews | Google Search Results Scraper | ready to run |
| Search and read the top pages in one run | RAG Web Browser | ready to run |
"Ready to run" means your apifare key is all it needs; "your key" means you vault your own provider key once. Catalog tools come from the apifare tool index. More: every search tool in the catalog.
When this is the wrong tool
- You already have the URL. Searching for it spends a call. Fetch it directly with scrape (see reading any web page).
- You need the page's full text. Search returns titles and short snippets. Pair it with scrape to read the pages it finds.
- You want headlines from news sites. The Google News tools are built for that.
- Your company wants searches to run on its own search account. Use the web-search capability with your own Brave key.
FAQ
Does my agent need a search API key?
No. The dataforseo capability runs on apifare’s provider account, and your balance pays per call. Your apifare key is all it needs.
Which countries and languages can it search?
Pass a country code (for example "us", "gb" or "hk") and a language code (for example "en" or "zh"). Without them it searches "us" in "en".
How many results come back?
Ten by default. Set count anywhere from 1 to 100.
Is a search with no results charged?
Yes: the search ran, so it bills as listed. Refine the query rather than retrying it unchanged. A call the provider fails to deliver is refunded.
Which agents can use it?
Any agent that speaks MCP or plain HTTP, including Claude Code, Cursor, Codex and Gemini CLI. Every client has a setup guide.
Give this to your agent
set up https://apifare.com/SKILL.md — and it takes it from there: key, config, first call. $5 of calls free.
No agent open right now? ① Get a key — $5 of calls free, then ② give it to your agent (setup guides).
Related posts
For agents: this post as Markdown.