# LDLC Sitemap Ids API Documentation

`GET /api/ldlc/sitemap` returns public product ids from one LDLC XML child sitemap.

## What you get

`product_ids` holds PB product ids. `review_ids` holds PC ids when the selected child map carries them, otherwise an empty list. The default `map` is `products-reviews`. `child_maps` lists the public child-map addresses. Pass a PB id unchanged to product and reviews. One child map is fetched per request.

## Credits

A successful request costs **1 credit**. Errors cost nothing. The response shows the charge in `meta.credits_charged`.

- **Documentation:** [https://scrappa.co/docs/ldlc-api/ldlc_sitemap](https://scrappa.co/docs/ldlc-api/ldlc_sitemap)
- **API group:** LDLC API
- **Endpoint:** `GET https://scrappa.co/api/ldlc/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 |
| --- | --- | --- | --- |
| `locale` | string | No | Storefront. Currently fr. |
| `map` | string | No | Public child map. Default products-reviews. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/ldlc/sitemap"
```

## Example response

```json
{
    "success": true,
    "data": {
        "product_ids": [
            "PB00227140",
            "PB00587633"
        ],
        "review_ids": [],
        "child_maps": [
            "https://www.ldlc.com/products_sitemap.xml",
            "https://www.ldlc.com/products-reviews-sitemap.xml"
        ],
        "locations": [
            "https://www.ldlc.com/avis/PB00227140.html",
            "https://www.ldlc.com/avis/PB00587633.html"
        ],
        "product_count": 2,
        "review_count": 0,
        "locale": "fr",
        "map": "products-reviews"
    },
    "meta": {
        "endpoint_family": "ldlc-sitemap",
        "billable": true,
        "attempts": 1,
        "credits_charged": 1,
        "unavailable_reason": []
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing, unknown or unsupported. A bare category id without a public slug and an unsupported storefront are rejected instead of returning a different page. Non-billable. |
| 503 | Upstream Unavailable | The storefront could not be reached or changed its page shape (`upstream_blocked`, `upstream_unavailable`, `parser_drift`). Retryable and never billed. Clients are never rate limited. |

## 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)
