scraping-google-search-results — скилл для Claude Code: выгрузка
Собирает результаты поиска Google по любому запросу: URL, заголовки, сниппеты, позиции и типы SERP-блоков. Пригодится, когда нужна сырая выдача для SEO или анализа конкурентов.
npx skills add apidojo-io/apidojo-skills --skill scraping-google-search-results -a claude-codeЧто делает scraping-google-search-results
Скилл запускает актор apidojo/google-search-scraper на Apify и отдаёт таблицу органических результатов вместе с featured snippets, блоком People Also Ask и другими элементами выдачи. На каждый результат есть поля query, position, url, title, description, type, а также sitelinks, rating и reviewsCount, если они есть.
На входе список поисковых запросов или готовые URL выдачи. Можно задать countryCode (по умолчанию US), languageCode, maxItems, maxPagesPerQuery (по умолчанию 1) и mobileResults. Для запуска нужен APIFY_TOKEN в переменной окружения или в .env — без него ничего не поедет. Есть скрипт scripts/run_actor.js, который сам дожидается завершения и сохраняет результат в CSV или JSON; если стоит Apify MCP-сервер, тот же актор вызывается через apify:run-actor.
Позиции в выдаче зависят от геолокации и персонализации, поэтому для сравнимых данных countryCode лучше указывать явно. Если по запросу вернулись только объявления или панель знаний, органики не будет — это повод переформулировать запрос. При устойчивых блокировках со стороны Google автор советует уменьшить размер пакета запросов.
Какие задачи решает
- собрать выдачу Google по списку ключевых слов в одну таблицу
- выгрузить сниппеты и позиции конкурентов для SEO-отчёта
- зафиксировать, какие SERP-блоки занимает запрос: PAA, featured snippet, local pack
- получить URL и описания страниц по теме для дальнейшего разбора
- сравнить выдачу для разных стран через
countryCode
Примеры запросов агенту
- собери выдачу Google по запросу «купить кофемашину» и покажи таблицу с позициями
- выгрузи SERP по этим десяти ключам для
GBв CSV - какие блоки People Also Ask есть по запросу «best running shoes»?
Как установить scraping-google-search-results
1Через Skills CLI (Vercel)
npx skills add apidojo-io/apidojo-skills --skill scraping-google-search-results -a claude-code2Вручную: положить файлы
~/.claude/skills/scraping-google-search-results/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/scraping-google-search-results/
1Через Skills CLI (Vercel)
npx skills add apidojo-io/apidojo-skills --skill scraping-google-search-results -a codex2Вручную: положить файлы
.agents/skills/scraping-google-search-results/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add apidojo-io/apidojo-skills --skill scraping-google-search-results -a cursor2Вручную: положить файлы
.cursor/skills/scraping-google-search-results/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install apidojo-io/apidojo-skills scraping-google-search-results2Вручную: положить файлы
.github/skills/scraping-google-search-results/SKILL.md1Через Skills CLI (Vercel)
npx skills add apidojo-io/apidojo-skills --skill scraping-google-search-results -a gemini-cli2Командой платформы
gemini skills install https://github.com/apidojo-io/apidojo-skills --path skills/primitives/scraping-google-search-resultsВручную: положить файлы
.devin/skills/scraping-google-search-results/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add apidojo-io/apidojo-skills --skill scraping-google-search-results -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о scraping-google-search-results
Как установить scraping-google-search-results в Claude?
Выполните npx skills add apidojo-io/apidojo-skills --skill scraping-google-search-results -a claude-code. После этого файл скилла окажется в ~/.claude/skills/scraping-google-search-results/SKILL.md.
Что делает scraping-google-search-results?
Запускает Google Search scraper на Apify и возвращает по каждому результату URL, заголовок, сниппет, позицию и тип SERP-элемента. Работает и с одиночным запросом, и со списком ключевых слов.
Что нужно для работы скилла?
Переменная окружения APIFY_TOKEN. Опционально можно поставить Apify MCP-сервер, тогда актор вызывается через apify:run-actor.
Исходный текст
SKILL.md · Apache-2.0
---
name: scraping-google-search-results
description: >
Scrapes Google search results for any query using apidojo's Google Search scraper on Apify.
Triggers when the user asks to: get Google search results for a keyword, scrape SERP data
for a query, export Google results to a dataset, fetch URLs and snippets from Google for
a search term, get all results from a Google search, or collect Google SERP data for
multiple keywords. Returns URL, title, snippet, position, and SERP feature type per result.
Ideal for SEO analysts, researchers, journalists, and competitive intelligence teams.
license: Apache-2.0
metadata:
author: apidojo
version: "1.0"
apify-actor: apidojo/google-search-scraper
---
# Scraping Google Search Results
Raw SERP dataset for any search query. Returns organic results, featured snippets, People Also Ask boxes, and other SERP features.
## Prerequisites
- `APIFY_TOKEN` environment variable set
- Optional: Apify MCP server installed
## Inputs
| Parameter | Type | Required | Default | Notes |
|-----------|------|----------|---------|-------|
| `startUrls` | array | Optional | `[]` | Google search URLs |
| `searchTerms` | array | Optional | `[]` | Keywords to search on Google |
| `countryCode` | string | Optional | `US` | Country for Google search (e.g. `US`, `GB`, `TR`) |
| `languageCode` | string | Optional | — | Language for results (e.g. `en`) |
| `maxItems` | number | Optional | Unlimited | Maximum results to return across all queries |
| `maxPagesPerQuery` | integer | Optional | `1` | Maximum result pages per query |
| `mobileResults` | boolean | Optional | `false` | Fetch mobile SERP layout |
| `customMapFunction` | string | Optional | — | JavaScript function to transform each output object |
## Workflow
```
Progress:
- [ ] Step 1: Normalize query list
- [ ] Step 2: Run google-search-scraper
- [ ] Step 3: Poll for SUCCEEDED
- [ ] Step 4: Deliver SERP dataset
```
### Step 2: Run the Actor
**Recommended — run_actor.js (handles waiting, output, and file saving automatically):**
```bash
# Quick answer (prints table to chat)
node scripts/run_actor.js \
--actor "apidojo~google-search-scraper" \
--input '{"param": "value"}'
# Save as CSV
node scripts/run_actor.js \
--actor "apidojo~google-search-scraper" \
--input '{"param": "value"}' \
--output YYYY-MM-DD_results.csv --format csv
# Save as JSON
node scripts/run_actor.js \
--actor "apidojo~google-search-scraper" \
--input '{"param": "value"}' \
--output YYYY-MM-DD_results.json --format json
```
> `APIFY_TOKEN` must be set in environment or `.env` file.
**If Apify MCP is available:**
```
Tool: apify:run-actor
Actor: "apidojo~google-search-scraper"
Input:
{
"queries": ["query1", "query2"],
"maxPagesPerQuery": 1,
"countryCode": "us",
"languageCode": "en"
}
```
**REST API fallback:**
```bash
curl -X POST \
"https://api.apify.com/v2/acts/apidojo~google-search-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"queries": ["query1", "query2"], "maxPagesPerQuery": 1}'
```
Save `id` as `RUN_ID`. Poll until `status = SUCCEEDED`:
```bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | grep '"status"'
```
Fetch results:
```bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN&format=json"
```
### Step 3: Handle Edge Cases
- **0 organic results**: Query may trigger only ads or knowledge panels — note to user.
- **SERP features present (PAA, snippets)**: These are returned as separate result types — include them in output with `type` field.
- **Different results per country**: Specify `countryCode` explicitly when geo-specific results are needed.
## Output Format
```
# Google SERP Dataset: "<query>"
Query: <query> | Country: <cc> | Pages: N | Results: N
| Position | URL | Title | Snippet (truncated) | Type |
|----------|-----|-------|---------------------|------|
| 1 | ... | ... | ... | organic |
| — | ... | ... | ... | featured_snippet |
| — | ... | ... | ... | paa |
Available fields: query, position, url, title, description, type (organic/
featured_snippet/paa/local_pack/image/video), sitelinks, rating, reviewsCount
```
## Troubleshooting
**Google CAPTCHA / blocks:** Actor handles this automatically; if persistent, reduce query batch size.
**Inconsistent positions:** SERP positions vary by location and personalization — use `countryCode` for consistency.
© apidojo · Apache-2.0 · apidojo-io/apidojo-skills