All endpoints
Web Search

Web Search API

Real-time Google organic search results. Returns title, URL, snippet, source and domain for each result, with country/language targeting, time filters, city-level geo, and an optional Google AI Overview.

Price: $0.004 per page
Free tier: 50 requests/month
Endpoint
GET /v1/web/search

Parameters

query *
Search keyword (max 500 characters). Supports Google operators (site:, inurl:, intitle:, etc.)
pages
Number of result pages, 1-10 (default: 1). 10 results per page
country
2-letter ISO country code (default: us)
language
2-letter ISO language code (default: en)
time
Time filter: any, hour, day, week, month, year (default: any)
location
City-level geo (e.g. London,England,United Kingdom)
device
desktop or mobile (default: desktop)
include_ai_overview
Set to true to include Google AI Overview when available (+$0.002 flat per request)

Response fields

results
Array of organic search results
position
Position on the result page
rank
Overall rank across merged result set
title
Result title
url
Result URL
snippet
Result snippet
source
Result source name
domain
Result domain
displayed_link
Breadcrumb-style URL as displayed in the SERP
pages
Number of pages requested
count
Total results returned
ai_overview
AI Overview object when include_ai_overview=true (null when not generated)

Example Request

curl "https://apidirect.io/v1/web/search?query=how%20to%20build%20a%20website&pages=2&country=us&language=en" \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "results": [
    {
      "position": 1,
      "rank": 1,
      "title": "Website Builder - Create a Free Website",
      "url": "https://www.canva.com/website-builder/",
      "snippet": "Design and launch a professional, one-of-a-kind website in minutes...",
      "source": "Canva",
      "domain": "canva.com",
      "displayed_link": "https://www.canva.com › website-builder"
    }
  ],
  "pages": 2,
  "count": 20,
  "ai_overview": {
    "text_parts": [
      {"type": "paragraph", "text": "Building a website involves choosing a platform, designing pages, and publishing..."}
    ],
    "reference_links": [
      {"title": "How to Create a Website From Scratch", "link": "https://www.wix.com/blog/how-to-build-website-from-scratch-guide", "source": "Wix"}
    ]
  }
}

Frequently asked questions

How is pricing calculated?

You pay $0.004 per page of results. A page is 10 results, so pages=3 returns 30 results and is billed as 3 requests. If you set include_ai_overview=true, there's an extra $0.002 added once per request, regardless of how many pages you request.

Does include_ai_overview always return an AI Overview?

No. AI Overviews are only generated by Google for certain queries. When the flag is on but no overview was generated for your query, ai_overview will be null. The $0.002 surcharge applies whenever the flag is on.

How fresh are the results?

Results are pulled in real time from Google. The data you see is the same as what a user would see if they searched Google directly from the targeted country, language, location and device.

Can I use Google search operators?

Yes. All Google advanced operators work in the query parameter — site:, inurl:, intitle:, filetype:, OR, exact-match quotes, exclusion with -, and so on.

What's the maximum number of results I can get?

The upstream caps web search at 100 results, which is why pages is limited to 10. To get more results, refine the query or paginate with different keywords.

How does pricing work?

You only pay for successful requests. The Web Search API costs $0.004 per page. There are no monthly fees or commitments. You get 50 free requests per endpoint every month.

Do I need a credit card to start?

No. You can sign up and use the free tier (50 requests/endpoint/month) without adding a payment method. You only need to add a card when you want to exceed the free tier.

Are there rate limits?

Yes, there's a concurrency limit of 3 simultaneous requests per endpoint per user. If you need more, just get in touch.

Start using the Web Search API

Get your API key and start making requests in minutes. 50 requests/month free every month.

Get API Key