Skip to Content
APIEndpointsMarket coverage

Market coverage

The Market Coverage grid as data, computed by the same rules the app uses: one row per prompt family, one cell per market and language, covered or missing. By default only rows with something missing are returned; pass only_missing=false for the whole grid. The prompt_id on each row is what Localize prompts takes.

A prompt row is one wording in one regional locale (en-GB, de-DE), tracked in one or more countries. A family is the set of versions of one question across languages. A market is a country the brand has opened, listing the languages it tracks there. Coverage is the grid Market Coverage draws from those three: one row per family, one cell per market and language, covered or missing.

Requires the read:prompts scope.

GET /v1/brands/{brand_id}/localization/coverage

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Query parameters

ParameterTypeRequiredDescription
limitintegeroptionalRows per page, 1 to 100. Defaults to 20
cursorstringoptionalOpaque cursor from the previous response. Treat it as a token, never construct one
topic_iduuidoptionalRestrict to a topic and its subtopics. Includes the topic and its subtopics; a root topic returns everything beneath it
country_codestringoptionalRestrict the columns to one market, e.g. DE
locale_codestringoptionalRestrict the columns to one language, e.g. de-DE
only_missingbooleanoptionalDefault true. false returns every family
searchstringoptionalCase-insensitive substring of the wording

Request

curl --request GET \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/localization/coverage' \ --header 'Authorization: Bearer <api-key>'

Response

{ "data": { "rows": [ { "prompt_id": "7c2f5a91-3b8e-4d06-9a44-1e7b30c9f852", "prompt_text": "What are the best GEO tools in the US?", "locale_code": "en-US", "country_codes": [ "US", "DE" ], "family_id": "3f1d2c9b-6a4e-4b8f-9c2d-1e5a7b3c9d0e", "family_size": 2, "topic_id": null, "markets": [ { "country_code": "DE", "country_name": "Germany", "cells": [ { "locale_code": "de-DE", "status": "missing", "version_prompt_id": null }, { "locale_code": "en-US", "status": "covered", "version_prompt_id": "7c2f5a91-3b8e-4d06-9a44-1e7b30c9f852" } ] } ], "missing": [ { "country_code": "DE", "locale_code": "de-DE" } ], "missing_count": 1 } ], "total": 1, "columns": [ { "country_code": "DE", "locale_code": "de-DE" }, { "country_code": "DE", "locale_code": "en-US" } ], "totals": { "families": 120, "families_missing": 1, "cells_missing": 1 } }, "pagination": { "limit": 20, "has_more": false, "next_cursor": null }, "request_id": "req_2f7b90c14ae8471da3cd" }

Response fields

FieldTypeDescription
data.rows[].prompt_iduuidrequired. The family’s source prompt; use it for Localize prompts
data.rows[].prompt_textstringrequired
data.rows[].locale_code`string \null`
data.rows[].country_codesstring[]required
data.rows[].family_id`uuid \null`
data.rows[].family_sizeintegerrequired. Versions in the family
data.rows[].markets[]object[]required. One entry per market with cells[] of { locale_code, status, version_prompt_id }
data.rows[].missingobject[]required. Every missing { country_code, locale_code }
data.rows[].missing_countintegerrequired
data.totalintegerrequired. Rows matching before paging
data.columnsobject[]required. The market and language columns after filters
data.totalsobjectrequired. families, families_missing, cells_missing

Errors

StatusCodeWhen
401invalid_tokenThe key is missing, malformed, or does not exist
403insufficient_scopeThe key does not carry read:prompts
404not_foundThe brand does not exist, or this key is not allowed to reach it
429rate_limitedOver the per-minute limit for this endpoint
Last updated on