# Mercado Libre Category Attributes API Documentation

Returns the attribute definitions of one category: id, name, value type, maximum length, relevance, tags and the list of allowed values with their ids. Use it as the filter vocabulary of a category, for example brands and screen sizes of notebooks. Leaf categories carry the most attributes. Failed requests (404, 422, 503) are never billed. A valid answer with zero rows is a successful, billable 200.

- **Documentation:** [https://scrappa.co/docs/mercadolibre-api/mercadolibre_category_attributes](https://scrappa.co/docs/mercadolibre-api/mercadolibre_category_attributes)
- **API group:** Mercado Libre API
- **Endpoint:** `GET https://scrappa.co/api/mercadolibre/category-attributes`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | string | Yes | Category id, for example MLA1652 (Notebooks). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/mercadolibre/category-attributes?category_id=MLA1652"
```

## Example response

```json
{
    "success": true,
    "data": {
        "category_id": "MLA1652",
        "attributes": [
            {
                "id": "BRAND",
                "name": "Marca",
                "value_type": "string",
                "value_max_length": 255,
                "hierarchy": "PARENT_PK",
                "relevance": 1,
                "tags": {
                    "catalog_required": true,
                    "required": true
                },
                "values": [
                    {
                        "id": "15903",
                        "name": "Acer"
                    },
                    {
                        "id": "9344",
                        "name": "Apple"
                    }
                ]
            }
        ],
        "total": 144
    },
    "meta": {
        "endpoint_family": "category_attributes",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The item, category or store does not exist on this site. This response is not billable. |
| 422 | Validation Error | A parameter is invalid: unknown site, an id that does not belong to the site, a limit out of range, rating other than 1 to 5, or a zip code of another country. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result from Mercado Libre. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
