Google Search API

google_search

Search the live public web and return ranked Google results in a clean, agent-friendly JSON response.

Use Google Search API when an agent or application needs current information, source discovery, or web research without maintaining a search scraper. APINEED handles the upstream integration, unified billing, and a stable response shape.

PRICE $0.00125 / requestINPUT JSONOUTPUT Ranked web results
cURLPOST /v1/tools/google_search/invoke
curl https://apineed.com/v1/tools/google_search/invoke \
  -H "Authorization: Bearer $API_NEED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "OpenAI Responses API",
  "max_results": 10,
  "country": "us",
  "language": "en",
  "page": 1,
  "autocorrect": true,
  "time_range": "week"
}'

What this API does

Search the live public web and return ranked Google results in a clean, agent-friendly JSON response.

Current web knowledge

Give agents fresh context for questions that cannot be answered from a static model snapshot.

Source discovery

Return titles, URLs, snippets, related searches, and answer modules in one predictable response.

Research workflows

Power monitoring, fact-finding, competitive research, and retrieval steps without maintaining a scraper.

Playground

Edit the request JSON, send it with your signed-in APINEED account, and inspect the raw JSON response.

Request JSONPOST /pg/tools/google_search/invoke
Editable
$0.00125 per requestSign in required. Failed requests are refunded.
Response JSONRaw API response
Ready
{}

Quick Start

Invoke Google Search API with one APINEED key and a JSON request body.

1

Use your APINEED API key

Reuse the same APINEED API key that your application already uses for LLM, image, and video APIs. Keep it server-side.

export API_NEED_API_KEY=sk-apineed-v1-...
2

Send the request

POST the same input shown in the Playground to /v1/tools/google_search/invoke.

curl https://apineed.com/v1/tools/google_search/invoke \
  -H "Authorization: Bearer $API_NEED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "OpenAI Responses API",
  "max_results": 10,
  "country": "us",
  "language": "en",
  "page": 1,
  "autocorrect": true,
  "time_range": "week"
}'
3

Read the response

Use output.results for ranked pages and usage.price_usd for the settled request price.

const results = response.output.results;

API Endpoint

This endpoint uses bearer-token authentication and returns a synchronous normalized JSON response.

POST/v1/tools/google_search/invoke
Authorization
Bearer $API_NEED_API_KEY
Content-Type
application/json
Billing
$0.00125 per successful request
Response
request_id, tool, output, usage

Parameters

Only query is required. Omitted optional parameters are not sent upstream, so they retain the provider default behavior.

NameTypeRequirementValuesDescription
querystringRequired1–500 charactersThe search query. This is the only required parameter.
max_resultsintegerOptional1–10Maximum number of organic results returned by APINEED. Defaults to 10.
countrystringOptionalTwo-letter codeLocalizes results to a country, for example us, gb, cn, or jp. Omit it to use the provider default.
languagestringOptionalLanguage codeLocalizes result language, for example en, zh-CN, or ja. Omit it to use the provider default.
pageintegerOptional1–100Requests a specific result page. Omit it for the provider default first page.
autocorrectbooleanOptionaltrue / falseExplicitly enables or disables spelling correction. Omit it to keep the provider default.
time_rangestringOptionalhour, day, week, month, yearLimits results by recency. Omit it to search without a recency filter.