| Парсинг выдачи Яндекса через Yandex Cloud Search API v2. Синхронный и асинхронный режимы. Кэширование результатов. serp яндекс, парсинг выдачи.
npx skills add https://github.com/artwist-polyakov/polyakov-claude-skills --skill yandex-search-api
Parse Yandex SERP via Yandex Cloud Search API v2 (sync + async).
Для работы нужен сервисный аккаунт Яндекс.Облака.
Пошаговая инструкция (6 шагов, ~10 минут): config/README.md.
Краткий чеклист:
config.jsonconfig/service_account_key.jsonbash scripts/iam_token_get.sh> macOS: может потребоваться brew install openssl — подробности в config/README.md.
bash scripts/search_region.sh --name "Казань"
"Для какого региона искать?
- Вся Россия (по умолчанию)
- Москва
- Конкретный город (какой?)"
НЕ ПРОДОЛЖАЙ пока пользователь не ответит!
search_region.sh --name "..." → получаешь IDconfig.json → search.mode (по умолчанию sync).Не спрашивай — используй то, что в конфиге.
bash scripts/iam_token_get.shGenerate or validate IAM token from Service Account key.
bash scripts/iam_token_get.sh
Token is cached in cache/iam_token.json and auto-refreshed when expired.
Synchronous search — one query at a time, immediate results.
# Single query
bash scripts/web_search_sync.sh \
--query "купить дымоход" \
--region-id 213
# Batch from file
bash scripts/web_search_sync.sh \
--file queries.txt \
--region-id 225 \
--results 20
| Param | Required | Default | Values |
|-------|----------|---------|--------|
| --query, -q | yes* | - | Search text |
| --file, -f | yes* | - | File with queries (one per line) |
| --region-id, -r | no | from config (225) | Region ID |
| --results, -n | no | 10 | Results per page (1-100) |
| --page, -p | no | 0 | Page number |
| --search-type | no | SEARCH_TYPE_RU | SEARCH_TYPE_RU / SEARCH_TYPE_TR / SEARCH_TYPE_COM / SEARCH_TYPE_KK / SEARCH_TYPE_BE / SEARCH_TYPE_UZ |
| --family-mode | no | FAMILY_MODE_MODERATE | FAMILY_MODE_NONE / FAMILY_MODE_MODERATE / FAMILY_MODE_STRICT |
\* Either --query or --file is required.
Results saved to cache/results/<hash>.json (parsed) and cache/results/<hash>.raw (XML).
Asynchronous batch search — submit many queries, poll for results.
# Submit batch and wait
bash scripts/web_search_async.sh \
--file queries.txt \
--region-id 213
# Resume after timeout/interrupt
bash scripts/web_search_async.sh --resume
| Param | Required | Default | Values |
|-------|----------|---------|--------|
| --file, -f | yes | - | File with queries |
| --region-id, -r | no | from config (225) | Region ID |
| --poll-interval | no | 10 | Poll interval (minutes) |
| --max-wait | no | 120 | Max wait before timeout (minutes) |
| --resume | no | - | Continue polling pending ops |
Async workflow:
poll_interval minutes for completionmax_wait exceeded: prints summary + resume command--resume: continues from cache/ops/, no duplicatesNOTE for agent: Async execution can take minutes to hours.
The script handles polling automatically. If it times out,
re-run with --resume to continue.
Show common region IDs.
bash scripts/regions_tree.sh
Find region ID by name.
bash scripts/search_region.sh --name "Казань"
Each search result contains:
position — rank in SERPtitle — page titleurl — page URLsnippet — text snippet (up to 300 chars)domain — site domainResults cached in cache/results/:
<hash>.raw — raw XML from API<hash>.json — parsed JSON array| Region | ID |
|--------|-----|
| Россия | 225 |
| Москва | 213 |
| Москва и область | 1 |
| Санкт-Петербург | 2 |
| Екатеринбург | 54 |
| Новосибирск | 65 |
| Казань | 43 |
Run bash scripts/regions_tree.sh for full list.
Yandex Search API v2 pricing (as of 2025):
User: Найди топ выдачи яндекса по запросу "купить сэндвич дымоход" в Москве
Claude: Уточню: Москва-город или Москва и область?
User: Москва город
Claude: [Находит ID региона]
bash scripts/search_region.sh --name "Москва"
→ Москва = 213
[Проверяет токен]
bash scripts/iam_token_get.sh
[Выполняет поиск — 1 запрос, автоматически sync]
bash scripts/web_search_sync.sh --query "купить сэндвич дымоход" --region-id 213
Результаты поиска (топ-10):
1. Сэндвич-дымоходы купить в Москве — Леруа Мерлен
https://leroymerlin.ru/...
Широкий ассортимент сэндвич-дымоходов...
2. Дымоходы сэндвич — купить в интернет-магазине
https://...
...
User: Проверь выдачу по запросам из файла queries.txt в Казани
Claude: [Находит ID региона]
bash scripts/search_region.sh --name "Казань"
→ Казань = 43
[Проверяет токен]
bash scripts/iam_token_get.sh
[Режим sync из конфига — запускает батч по одному]
bash scripts/web_search_sync.sh --file queries.txt --region-id 43
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take artwist-polyakov/yandex-search-api from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference brew.
Without those the skill loads but fails at the first command.