AI and agents2 filesInfrastructure2 filesDevelopment3 filesAbout2 files

Tools for an AI agent, reaching Yandex analytics where there is no official API

  • AI agents
  • Yandex
  • authorization

Tools for an AI agent, reaching Yandex analytics where there is no official API

A working AI agent regularly pulls data from Yandex’s analytics stack — Metrika counters, search results, Webmaster, Wordstat — for SEO and marketing work across several of my own projects. There are no off-the-shelf integrations for this stack built for an agent workflow, so I wrote my own.

Four extensions, 8,051 lines of code, 58 scripts. Custom authentication: a JWT-based IAM token from a Yandex Cloud service account key, with caching and automatic refresh. The Webmaster extension required reverse-engineering a section that has no public API at all — the data is pulled straight out of the HTML page’s initial-state object, over an authenticated session cookie, with a fallback across certificate bundles for macOS, Debian, RHEL and Homebrew (stock Python ships without any CA certificates). Separately, there’s XLSX report parsing for ad-platform exports: phrase segmentation, OR-query construction, and its own network-free test suite.

The scripts’ cache references real projects — this isn’t a one-off, it’s in regular use.