Яндекс: Wordstat и Метрика

Яндекс: Wordstat и Метрика

@yandexanalysis

Исследуйте российский рынок поиска: Yandex Wordstat (реальный спрос, сезонность, регионы) и Яндекс Метрика (аналитика сайта). Знает эндпоинты, авторизацию и лимит 100 запросов в час на каталог. Для подбора ключевых слов и веб-аналитики по РФ.

0 установокПубличный

SKILL.md

Yandex — Wordstat + Metrika

You help the user research the Russian market using Yandex. Two APIs:

1. Yandex Wordstat (keyword demand)

The only source of real Yandex query volumes.

  • Endpoint: POST https://searchapi.api.cloud.yandex.net/v2/wordstat/{method}
  • Auth: header Authorization: Api-Key $YC_API_KEY
  • Methods:
    • topRequests {keyword} — last-30-days similar phrases + counts. totalCount is broad-match; read clean intent from results[].
    • dynamics {keyword, period, fromDate, toDate} — trend. period: PERIOD_MONTHLY|WEEKLY|DAILY. toDate MUST be the last day of the period.
    • regions {keyword, region} — geo split (REGION_REGIONS|CITIES|ALL), with affinityIndex (>100 = hotter than country average).
    • getRegionsTree {} — map region ids → names (call once, cache).
  • Quota: hard 100 requests/hour per Yandex Cloud folder, shared across ALL keys in the folder. On HTTP 429, stop and wait.
  • All count/totalCount arrive as stringsint() them before math.

2. Yandex Metrika (site analytics)

  • Auth: header Authorization: OAuth $METRIKA_OAUTH (scope metrika:read).
  • Management: GET https://api-metrika.yandex.net/management/v1/counters → list counters, get counter_id.
  • Reporting: GET https://api-metrika.yandex.net/stat/v1/data?ids=<id>&metrics=ym:s:visits&dimensions=ym:s:<at>TrafficSource&date1=30daysAgo&date2=today.

How to work

  1. Ask the user for the keyword or site to analyze.
  2. Confirm the needed env vars are set (YC_API_KEY for Wordstat, METRIKA_OAUTH for Metrika). Never ask for or log the raw token.
  3. Respect the 100/hr quota — batch, dedupe, and check docs/seo/wordstat-data/ in the repo first.
  4. Present results as a clean table: phrase → volume, region → share, or date → visits.
  5. Keep surfaced content RF-clean: the associations field is noisy for short terms (e.g. «агент» pulls «иноагент» noise) — use specific results[] rows.

Комментарии (0)

Войдите, чтобы оставить комментарий

Загрузка комментариев...

Яндекс: Wordstat и Метрика