Blog

How to give your AI agent live web search without a search API key

By Alan Lui · Published · Last updated

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.

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:

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

  1. Over MCP (apifare-mcp): call_api with slug dataforseo and params {"q": "…", "count": 5, "country": "us"}. Not sure of the slug? search_apis finds it.
  2. Over HTTP: POST https://apifare.com/v1/call/dataforseo with Authorization: Bearer $APIFARE_TOKEN and the JSON body {"q": "…", "count": 5, "country": "us"}.
  3. Zero results: rephrase before you search again; the same query returns the same nothing.
  4. On HTTP 402 the balance is empty: relay the body's human_readable line 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

  1. Connect your agent. Paste set up https://apifare.com/SKILL.md into 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.
  2. Ask. Search the web for the latest release notes of <project> and link your sources.

Which tool for which job

JobToolRuns on
Live Google results for a querydataforseoready to run
Read one of the result pages as markdownscrapeready to run
Search through your own Brave Search keyweb-searchyour key
Several pages of Google results, with add-ons such as AI OverviewsGoogle Search Results Scraperready to run
Search and read the top pages in one runRAG Web Browserready 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

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

How to pull Google Maps places and reviews into your AI agentGive your AI agent Google Maps places, ratings and reviews on one prepaid, capped apifare key, with no separate maps account.How to let your agent read any web page as clean markdownGive your AI agent a fetch-a-URL tool that returns clean markdown instead of raw HTML, with one prepaid key and no scraping account.How to pull SEC filings and UK company records into your AI agentGive your agent US SEC EDGAR filings and the UK Companies House register with one prepaid key: no provider account and no provider key.How to get YouTube transcripts into your AI agentLet Claude Code, Cursor or any MCP agent pull YouTube transcripts, videos and channel data on one prepaid, capped apifare key.

For agents: this post as Markdown.