# Takealot Sitemap API Documentation

Without a file parameter, lists the public gz sitemap file names. With a file parameter, returns the numeric PLIDs found in that sitemap. Use a PLID from here as input for the product and reviews endpoints. Failed requests (404, 422, 503) are never billed. A valid answer with zero rows is a successful, billable 200.

- **Documentation:** [https://scrappa.co/docs/takealot-api/takealot_sitemap](https://scrappa.co/docs/takealot-api/takealot_sitemap)
- **API group:** Takealot API
- **Endpoint:** `GET https://scrappa.co/api/takealot/sitemap`

## 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 |
| --- | --- | --- | --- |
| `file` | string | No | A gz sitemap file name from the index response. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/takealot/sitemap?file="
```

## Example response

```json
{
    "success": true,
    "data": {
        "files": [
            "sitemap_nonbook_1.xml.gz"
        ],
        "count": 1
    },
    "meta": {
        "endpoint_family": "sitemap",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The requested Takealot record was not found. This response is not billable. |
| 422 | Validation Error | A parameter is invalid: a bad PLID, an unknown sort, a malformed facet or a price band out of range. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result. 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)
