<!-- https://pricto.dev/docs/api/get-coverage · versión en inglés: https://pricto.dev/docs/api/get-coverage.en.md -->

# Qué datos hay disponibles

`GET https://pricto.dev/v1/coverage`

Counts, freshness and history depth by country, retailer and category. Agents should call this when a search returns nothing, to tell the user whether the data does not exist or the query was wrong.

| Créditos | MCP |
|---|---|
| 0 | [`get_coverage`](/docs/mcp#get_coverage) |

## Parámetros

| Parámetro | En | Tipo | Descripción |
|---|---|---|---|
| `country` | query | `string` | ISO 3166-1 alpha-2 country code. Defaults to all covered countries. |
| `retailer` | query | `string` | One or more retailer IDs, comma separated (e.g. `cl-jumbo,cl-unimarc`). |
| `category` | query | `string` | Category ID; includes subcategories (e.g. `food.dairy`). |
| `lang` | query | `string` | Response language as a BCP 47 tag (`es`, `es-CL`, `en`, `en-US`...). Supported today: es, en. An unsupported language falls back to English with a warning, never an error. Falls back to `Accept-Language`, then to the account default. The resolved value is in `meta.lang`. |

## Respuesta

`200` Coverage.

| Campo | Tipo | Descripción |
|---|---|---|
| `data` **requerido** | `object` |  |
| `data.totals` **requerido** | `object` |  |
| `data.totals.countries` | `integer` |  |
| `data.totals.retailers` | `integer` |  |
| `data.totals.products` | `integer` |  |
| `data.totals.offers` | `integer` |  |
| `data.totals.observations` | `integer` |  |
| `data.totals.history_since` | `string (date) \| null` |  |
| `data.retailers` **requerido** | `object[]` |  |
| `data.retailers[].retailer` | `RetailerRef` |  |
| `data.retailers[].retailer.id` **requerido** | `string` |  |
| `data.retailers[].retailer.name` **requerido** | `string` |  |
| `data.retailers[].country` | `string` |  |
| `data.retailers[].offers` | `integer` |  |
| `data.retailers[].matched_pct` | `number` |  |
| `data.retailers[].last_observed` | `string (date-time) \| null` |  |
| `data.retailers[].history_since` | `string (date) \| null` |  |
| `data.categories` **requerido** | `object[]` |  |
| `data.categories[].category` | `CategoryRef` |  |
| `data.categories[].category.id` **requerido** | `string` |  |
| `data.categories[].category.label` **requerido** | `string` |  |
| `data.categories[].category.path` | `string[]` |  |
| `data.categories[].products` | `integer` |  |
| `data.categories[].retailers` | `integer` |  |
| `data.planned` | `string[]` | Retailers or countries announced but not yet available. |
| `meta` **requerido** | `Meta` |  |

`meta` trae el costo, la fuente para citar, el idioma, la moneda y los avisos (ver [Convenciones](/docs/convenciones)).

## Errores

## Ejemplo

```bash
curl "https://pricto.dev/v1/coverage?category=health" \
  -H "Authorization: Bearer sk_test_sandbox"
```
```python
import requests

API_KEY = "sk_test_sandbox"

r = requests.get(
    "https://pricto.dev/v1/coverage",
    params={"category": "health"},
    headers={"Authorization": f"Bearer {API_KEY}"},
)
print(r.status_code, r.json())
```
```js
const API_KEY = "sk_test_sandbox";

const res = await fetch(`https://pricto.dev/v1/coverage?${new URLSearchParams({"category":"health"})}`, {
  headers: { Authorization: `Bearer ${API_KEY}` },
});
console.log(res.status, await res.json());
```

```json
{
  "data": {
    "totals": {
      "countries": 1,
      "retailers": 7,
      "products": 5,
      "offers": 20,
      "observations": 2341,
      "history_since": "2026-06-26"
    },
    "retailers": [
      {
        "retailer": {
          "id": "cl-jumbo",
          "name": "Jumbo"
        },
        "country": "CL",
        "offers": 29,
        "matched_pct": 100,
        "last_observed": "2026-10-23T11:00:00Z",
        "history_since": "2026-06-26"
      },
      {
        "retailer": {
          "id": "cl-santaisabel",
          "name": "Santa Isabel"
        },
        "country": "CL",
        "offers": 31,
        "matched_pct": 100,
        "last_observed": "2026-10-23T11:00:00Z",
        "history_since": "2026-06-26"
      },
      "… 5 más / more"
    ],
    "categories": [
      {
        "category": {
          "id": "health",
          "label": "Salud y farmacia",
          "path": [
            "Salud y farmacia"
          ]
        },
        "products": 5,
        "retailers": 4
      },
      {
        "category": {
          "id": "health.analgesics",
          "label": "Analgésicos",
          "path": [
            "Salud y farmacia",
            "Analgésicos"
          ]
        },
        "products": 3,
        "retailers": 4
      },
      "… 1 más / more"
    ],
    "planned": [
      "PE: Perú",
      "CO: Colombia",
      "… 1 más / more"
    ]
  },
  "meta": {
    "request_id": "req_4af75335e79b4783af09",
    "attribution": {
      "text": "Fuente: Pricto · 23-10-2026 08:00 CLST",
      "source": "Pricto",
      "as_of": "2026-10-23T11:00:00Z",
      "resource_id": null,
      "url": null,
      "capture_method": null,
      "source_url": null
    },
    "credits_charged": 0,
    "credits_deduplicated": 0,
    "credits_remaining": 14988,
    "period_resets_at": "2026-11-01T00:00:00.000Z",
    "usage": {
      "credits_charged": 0,
      "credits_deduplicated": 0,
      "truncated": false,
      "truncated_reason": null,
      "dry_run": false,
      "units": {}
    },
    "lang": "es",
    "currency": "local",
    "data_as_of": "2026-10-23T11:00:00Z",
    "warnings": [
      "synthetic_data: datos sintéticos de ejemplo / synthetic sample data"
    ]
  }
}
```
