Scraping API
Help center

Search Google

Run a Google search with type serp and get organic results, the local pack, people also ask and related searches as JSON, Markdown or HTML.

type: serp runs one Google search and returns its first result pages, parsed: one page by default, up to ten with page. Use POST /task for one query and wait for the answer, or POST /job for a batch.

Minimal request

Shell
curl https://scraping-api.datafuel.ai/api/v1/task \
  --request POST \
  --header "Content-Type: application/json" \
  --header "X-API-Key: df_key_your_key_here" \
  --header "Idempotency-Key: serp-crm-us-2026-09-28" \
  --data '{
    "type": "serp",
    "attributes": {
      "query": "best crm for startups",
      "country": "us",
      "language": "en"
    }
  }'

The call blocks until the search is done. Set your client timeout to at least 120 seconds.

Target the results

AttributeGoogle parameterExample
queryqbest crm for startups, operators like site: work
countryglus, gb, fr
languagehlen, en-gb, es-419
pageHow many result pages to fetch, 1 (default) to 10. 3 returns pages 1 to 3 as one list.
google_domainhostgoogle.co.uk
devicedesktop (default) or mobile
location, uule, lat + lonuulePick one. radius (meters, max 1000) needs one of them.

page is a count, not an offset. The pages are merged into one organic list with running positions, so page: 3 gives you positions 1 to 30. The other sections (places, questions, related searches and so on) come from page 1. With result_format: html you get the pages one after the other. Values above 10 are capped to 10; a negative page answers 400 INVALID_ATTRIBUTES.

device: mobile returns the results Google shows on a phone, parsed into the same sections. The mobile page has no total_results, and sections a phone does not show stay empty. Any other value than desktop or mobile answers 400 INVALID_ATTRIBUTES.

A location only works inside the country you search: location, uule and lat + lon must lie in country, or Google ignores them. A named location alone does not change the country of the results, so set country with it. For a precise origin, use lat + lon.

Filters pass through as Google names them: tbs (dates, news), safe (active or off), cr and lr (limit to countries or languages), nfpr, filter, and uds (take it from filters[].uds of an earlier result). Knowledge Graph and place views take kgmid, si, ludocid, lsig and ibp.

proxy_type, proxy_country and the other proxy fields are ignored. Searches exit through DataFuel’s own pool, so country and language are how you pick the market.

Add the AI Overview

Set ai_overview: true to get Google’s AI Overview when the query has one. When Google loads the overview after the page, fetching it adds a few seconds. With result_format: html that answer is inserted into the page where Google renders it.

The JSON result then carries an ai_overview object:

FieldContent
textThe answer. Headings and list items are on their own lines. [n] marks a citation of references[n-1].
productsProduct cards shown in the answer: title, price, source (the merchant), rating, reviews, link (Google Shopping page).
referencesEvery source the answer cites, in citation order: title, source, snippet, url, and redirect (the Google link the source card points to).

ai_overview is left out when Google shows no overview for the query.

Choose the output

result_formatresult.data is
json (default)An object: query, url (the Google URL fetched), page (pages returned), total_pages, organic, places (local pack), local_map, knowledge_graph (business panel: address, phone, hours, rating, review sources), inline_videos, inline_images (image pack: title, source, page link, image URL), questions (people also ask), related_searches, filters, ai_overview when you asked for it, plus total_results, showing_results_for (the corrected query Google searched) and search_instead_for when Google shows them. Sections missing from the page are left out.
markdownThe same results as Markdown, ready for an LLM.
htmlThe pages Google served, one after the other.
JSON
{
  "status": "completed",
  "credits_used": 10,
  "result": {
    "data": {
      "query": "best crm for startups",
      "page": 1,
      "organic": [
        {
          "position": 1,
          "title": "The 10 best CRM tools for startups",
          "url": "https://example.com/best-crm",
          "snippet": "We tested 25 CRMs…"
        }
      ],
      "related_searches": [{ "query": "free crm for startups" }]
    }
  }
}

Many queries

A job takes queries instead of query, at least two. Every other attribute applies to each query, and each query is its own task.

JSON
{
  "type": "serp",
  "multithreaded": true,
  "attributes": {
    "queries": ["best crm for startups", "project management software"],
    "country": "us",
    "language": "en"
  }
}

Poll and fetch it like any job: see Scrape a list of URLs.

Cost

10 credits per result page, whatever the format: page: 3 costs 30 credits. The pages are charged when the search is queued. Pages Google did not serve, because its results ended earlier, are refunded, and the page field of the result says how many came back. A search that fails is refunded in full. See Pricing and credits.