<!-- https://pricto.dev/docs/api/list-categories · Spanish version: https://pricto.dev/docs/api/list-categories.md -->

# Category taxonomy

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

Flat list of categories; rebuild the tree with `parent_id`. Includes mappings to Google Product Taxonomy.

| Credits | MCP |
|---|---|
| 0 | — |

## Parameters

| Parameter | In | Type | Description |
|---|---|---|---|
| `parent_id` | query | `string` |  |
| `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`. |

## Response

`200` Categories.

| Field | Type | Description |
|---|---|---|
| `data` **required** | `Category[]` |  |
| `data[].id` **required** | `string` |  |
| `data[].label` **required** | `string` |  |
| `data[].parent_id` **required** | `string \| null` |  |
| `data[].level` **required** | `integer` |  |
| `data[].products_count` | `integer` |  |
| `data[].mappings` | `object` |  |
| `data[].mappings.google_product_taxonomy` | `integer \| null` |  |
| `data[].mappings.coicop_2018` | `string \| null` |  |
| `data[].mappings.shopify_category_id` | `string \| null` | Shopify Standard Product Taxonomy (MIT). GS1 GPC is not exposed without written permission from GS1. |
| `meta` **required** | `Meta` |  |

`meta` carries the cost, the source line to quote, the language, the currency and notices (see [Conventions](/docs/convenciones)).

## Errors

## Example

```bash
curl "https://pricto.dev/v1/categories?parent_id=food.dairy" \
  -H "Authorization: Bearer sk_test_sandbox"
```
```python
import requests

API_KEY = "sk_test_sandbox"

r = requests.get(
    "https://pricto.dev/v1/categories",
    params={"parent_id": "food.dairy"},
    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/categories?${new URLSearchParams({"parent_id":"food.dairy"})}`, {
  headers: { Authorization: `Bearer ${API_KEY}` },
});
console.log(res.status, await res.json());
```

```json
{
  "data": [
    {
      "id": "food.dairy.milk",
      "label": "Leche",
      "parent_id": "food.dairy",
      "level": 2,
      "products_count": 4,
      "mappings": {
        "google_product_taxonomy": null,
        "coicop_2018": null,
        "shopify_category_id": null
      }
    },
    {
      "id": "food.dairy.yogurt",
      "label": "Yoghurt",
      "parent_id": "food.dairy",
      "level": 2,
      "products_count": 2,
      "mappings": {
        "google_product_taxonomy": null,
        "coicop_2018": null,
        "shopify_category_id": null
      }
    },
    "… 1 más / more"
  ],
  "meta": {
    "request_id": "req_e33f62be60244838a42b",
    "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"
    ]
  }
}
```
