# How to give your AI agent live web search without a search API key By Alan Lui. Published 2026-09-13; last updated 2026-09-14. Page: https://apifare.com/blog/give-your-agent-live-web-search Connect your agent to apifare and ask it to search: the [dataforseo capability](https://apifare.com/capabilities/dataforseo) 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 ```text 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](https://apifare.com/capabilities/web-search) 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](https://apifare.com/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](https://apifare.com/guides/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](https://apifare.com/errors). ## 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](https://apifare.com/start?origin=blog) and follow your client's [setup guide](https://apifare.com/integrations). 2. **Ask.** `Search the web for the latest release notes of and link your sources.` ## Which tool for which job | Job | Tool | Runs on | | --- | --- | --- | | Live Google results for a query | [dataforseo](https://apifare.com/capabilities/dataforseo) | ready to run | | Read one of the result pages as markdown | [scrape](https://apifare.com/capabilities/scrape) | ready to run | | Search through your own Brave Search key | [web-search](https://apifare.com/capabilities/web-search) | your key | | Several pages of Google results, with add-ons such as AI Overviews | [Google Search Results Scraper](https://apifare.com/tools/apify/google-search-scraper) | ready to run | | Search and read the top pages in one run | [RAG Web Browser](https://apifare.com/tools/apify/rag-web-browser) | ready to run | More: [every search tool in the catalog](https://apifare.com/tools/c/seo-tools) ## When this is the wrong tool - **You already have the URL.** Searching for it spends a call. Fetch it directly with [scrape](https://apifare.com/capabilities/scrape) (see [reading any web page](https://apifare.com/blog/let-your-agent-read-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](https://apifare.com/apis/google-news) are built for that. - **Your company wants searches to run on its own search account.** Use the [web-search capability](https://apifare.com/capabilities/web-search) 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](https://apifare.com/integrations). ## Give this to your agent `set up https://apifare.com/SKILL.md`: it takes it from there (key, config, first call). $5 of calls free. No agent open right now? Get a key at https://apifare.com/start?origin=blog-web-search, then give it to your agent (setup guides: https://apifare.com/integrations).