Run the hosted Google Search SERP Scraper on Apify without writing code, or integrate it with Python, JavaScript or cURL to collect structured organic Google results.
Browse the technical examples and sample Dataset
This repository contains executable API examples, verified sample input, real Dataset output and a CSV export. It documents the public integration surface without exposing the Actor's private implementation, proxy configuration or credentials.
- Collect organic Google results with query, page, position, title, URL and description.
- Monitor keyword rankings with consistent country and language settings.
- Process one query or batch up to 10,000 queries in a run.
- Request pages 1–10 while keeping the total query/page workload within 10,000 pages.
- Export results to JSON, CSV, Excel or JSONL for reporting and data pipelines.
The complete verified sample is available in data/sample-output.json, with the same fields in data/sample-output.csv.
{
"query": "apify web scraping",
"page": 1,
"position": 1,
"title": "Portal Inmobiliario Property Search Scraper - Apify",
"url": "https://apify.com/ecomscrape/portalinmobiliario-property-search-scraper",
"description": "The ignore_url_failures parameter: If set to true , the scraper will continue running even if some URLs fail to be scraped after the maximum number of retries ..."
}The sample rows come from a successful published Actor run. Google rankings and snippets change over time, so the fixture proves the output contract rather than a current ranking.
- Open Google Search SERP Scraper on Apify.
- In the Input tab, add one or more values to Search Queries.
- Choose the start page, end page, language and country.
- Click Start.
- Open Dataset to inspect the organic results and export them.
Use data/sample-input.json for a small first request and docs/no-code-guide.md for the complete web-interface walkthrough.
Apify's Free plan currently includes $5 in monthly prepaid usage and does not require a credit card. This can cover a small first test while credit is available, but it is not unlimited free usage.
Unused credit expires at the end of the billing cycle. Check the current Apify pricing before running a larger batch.
pip install -r examples/python/requirements.txtLinux/macOS:
export APIFY_API_TOKEN="your-token"Windows PowerShell:
$env:APIFY_API_TOKEN = "your-token"python examples/python/google_search_scraper.pyThe script reads data/sample-input.json, runs the hosted Actor and prints each returned Dataset item as JSON.
{
"queries": [
"apify web scraping"
],
"startPage": 1,
"endPage": 1,
"language": "es",
"country": "es"
}See docs/input-reference.md for defaults, validation rules and workload limits.
examples/curl-request.md uses the synchronous Dataset endpoint and the checked-in sample input.
examples/python/google_search_scraper.py runs the sample input. examples/python/batch_google_search.py demonstrates multiple queries, and examples/python/export_google_serp_csv.py exports Dataset JSON to CSV.
examples/javascript/request.mjs uses the official Apify JavaScript client.
All request examples call the hosted Actor. They do not contain a token, proxy URL, private endpoint or scraping implementation.
| Field | Meaning |
|---|---|
query |
Original search query associated with the result. |
page |
Google result page number from 1 to 10. |
position |
Organic position across the requested page range. |
title |
Organic result title, or null when unavailable. |
url |
Organic destination URL, or null when unavailable. |
description |
Visible Google snippet, or null when unavailable. |
The default Key-Value Store also contains a SUMMARY record for run-level status and counts. See docs/output-reference.md.
Read docs/use-cases.md for complete workflows covering:
- Google keyword rank tracking by market.
- Competitor and domain visibility analysis.
- Batch keyword research and CSV export.
- Recurring SERP monitoring.
Use examples/python/google_search_scraper.py for a complete hosted integration. The example loads JSON input, calls the Actor and iterates through the default Dataset without reproducing the scraping infrastructure locally.
For multiple keywords, use examples/python/batch_google_search.py. Keep one country, language and page range per run so the rows are comparable.
Each organic result is an independent JSON object with six stable fields: query, page, position, title, url and description. Inspect data/sample-output.json for complete real rows from a successful run.
Run python examples/python/export_google_serp_csv.py. It reads the sample JSON by default and writes data/exported-google-results.csv, or accepts custom input and output paths.
See docs/faq.md for answers about no-code usage, Python integration, localization, pagination, billing, JSON output and CSV export.
- Up to 10,000 queries per run.
- Pages 1–10.
- At most 10,000 query/page combinations per run.
- Up to 10 organic rows per requested page, with a theoretical maximum of 100,000 delivered rows.
- Current public price: $0.60 per 1,000 organic results delivered.
One successfully delivered Dataset item triggers one serp-result event at $0.0006. Failed pages, undelivered results and the SUMMARY record do not trigger that event. Verify the current contract on the Actor page before production use.
Use the hosted Actor for batching, localization, pagination, schedules, API access, webhooks and managed Dataset storage:
Run Google Search SERP Scraper on Apify
Google controls result availability and layout, so rankings, titles and snippets can vary by time and market. The Actor returns organic results only; it does not include ads, shopping modules, maps, local packs or knowledge panels.
Use returned data lawfully and respect the terms, access rules and privacy obligations that apply to your use case. Never commit an Apify token or other credentials to this repository.
For a problem with these examples, open a GitHub issue with sanitized input and the error message. For an Actor execution problem, include the Apify run ID but never include your token.
This repository is released under the MIT License.