{"openapi":"3.1.0","info":{"title":"Yandex Metrika (BYOK) API","version":"0.1.0","description":"Yandex Metrika (BYOK) lets an AI assistant read your own Yandex Metrika data through the Yandex Metrika API with a key you supply (Yandex OAuth token with the metrika:read scope). Read-only: 6 tools (list_counters, get_counter, list_goals, list_labels, list_chart_annotations, get_report). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached;...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-yandex-metrika.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-yandex-metrika/docs"},"termsOfService":"https://connectorbay.com/byok-yandex-metrika/terms"},"servers":[{"url":"https://byok-yandex-metrika.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-yandex-metrika/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_counters":{"post":{"operationId":"list_counters","summary":"List the Metrika tags (counters) you own or can see with site, status, type, time zone and creation time. Use for \"Which","description":"List the Metrika tags (counters) you own or can see with site, status, type, time zone and creation time. Use for \"Which Yandex Metrika counters do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search_string":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only tags whose name, site or id contains this text.","title":"Search String"},"per_page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many tags to return (1 to 1000, default 100).","title":"Per Page"},"offset":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Number of the first tag to return (the first is 1).","title":"Offset"}},"title":"list_countersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_counter":{"post":{"operationId":"get_counter","summary":"Get one Metrika tag by id with its site, status, type, time zone and creation time. Use for \"Show details of Metrika cou","description":"Get one Metrika tag by id with its site, status, type, time zone and creation time. Use for \"Show details of Metrika counter 44147844\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"counter_id":{"description":"Numeric id of the Metrika tag (counter), taken from list_counters.","title":"Counter Id","type":"integer"}},"required":["counter_id"],"title":"get_counterArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_goals":{"post":{"operationId":"list_goals","summary":"List the goals of a Metrika tag with name, type, URL conditions and default price. Use for \"What goals are set up on Met","description":"List the goals of a Metrika tag with name, type, URL conditions and default price. Use for \"What goals are set up on Metrika counter 44147844\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"counter_id":{"description":"Numeric id of the Metrika tag (counter), taken from list_counters.","title":"Counter Id","type":"integer"}},"required":["counter_id"],"title":"list_goalsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_labels":{"post":{"operationId":"list_labels","summary":"List your labels used to group Metrika tags. Use for \"Which Metrika labels do I have\".","description":"List your labels used to group Metrika tags. Use for \"Which Metrika labels do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_labelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_chart_annotations":{"post":{"operationId":"list_chart_annotations","summary":"List the notes added to the charts of a Metrika tag with date, time, title, message and group. Use for \"What chart notes","description":"List the notes added to the charts of a Metrika tag with date, time, title, message and group. Use for \"What chart notes exist on Metrika counter 44147844\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"counter_id":{"description":"Numeric id of the Metrika tag (counter), taken from list_counters.","title":"Counter Id","type":"integer"}},"required":["counter_id"],"title":"list_chart_annotationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_report":{"post":{"operationId":"get_report","summary":"Get a table report from Metrika statistics for one or more tags: choose metrics (such as ym:s:visits, ym:s:users, ym:s:p","description":"Get a table report from Metrika statistics for one or more tags: choose metrics (such as ym:s:visits, ym:s:users, ym:s:pageviews), optional dimensions (such as ym:s:trafficSourceName or ym:s:date), a period, filters and sorting. Session metrics start with ym:s:, hit metrics with ym:pv:; do not mix them. Use for \"How many visits did Metrika counter 44147844 get per traffic source in the last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"ids":{"description":"Comma-separated tag ids, for example '44147844'.","maxLength":100,"title":"Ids","type":"string"},"metrics":{"description":"Comma-separated metrics, at most 20, for example 'ym:s:visits,ym:s:users'.","maxLength":500,"title":"Metrics","type":"string"},"dimensions":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated grouping dimensions, at most 10, for example 'ym:s:trafficSourceName'.","title":"Dimensions"},"date1":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":"6daysAgo","description":"Period start: YYYY-MM-DD or a word such as today, yesterday or 6daysAgo (default 6daysAgo).","title":"Date1"},"date2":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":"today","description":"Period end: YYYY-MM-DD or today/yesterday (default today).","title":"Date2"},"filters":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"description":"Segmentation filter, for example \"ym:s:trafficSourceName=='Search engine traffic'\".","title":"Filters"},"sort":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated dimensions or metrics to sort by; '-' before a name means descending.","title":"Sort"},"limit":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many rows to return (1 to 100000, default 100).","title":"Limit"},"lang":{"anyOf":[{"maxLength":8,"type":"string"},{"type":"null"}],"default":null,"description":"Language code for dimension names, for example ru or en.","title":"Lang"}},"required":["ids","metrics"],"title":"get_reportArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}