# LDLC Suggest API Documentation

`GET /api/ldlc/suggest` returns public search suggestions and a few recommended products. This support endpoint is free.

## What you get

`suggestions` holds public category labels and links. `products` holds `id` (a PB product id), `offer_id` (an AR offer id), `name`, numeric `price`, `currency` (EUR), `rating` and full-size images. Use the product `id` unchanged with product and reviews.

## Credits

This support endpoint costs **0 credits**. Errors cost nothing.

- **Documentation:** [https://scrappa.co/docs/ldlc-api/ldlc_suggest](https://scrappa.co/docs/ldlc-api/ldlc_suggest)
- **API group:** LDLC API
- **Endpoint:** `GET https://scrappa.co/api/ldlc/suggest`

## 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 |
| --- | --- | --- | --- |
| `q` | string | Yes | Search words. |
| `locale` | string | No | Storefront. Currently fr. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/ldlc/suggest?q=rtx"
```

## Example response

```json
{
    "success": true,
    "data": {
        "suggestions": [
            {
                "label": "RTX 5080",
                "url": "https://www.ldlc.com/recherche/rtx/"
            }
        ],
        "products": [
            {
                "id": "PB00671172",
                "offer_id": "AR202503030098",
                "name": "Gigabyte RTX 5070",
                "price": 999.95,
                "currency": "EUR",
                "rating": 9
            }
        ],
        "query_id": "q-1",
        "query": "rtx",
        "locale": "fr"
    },
    "meta": {
        "endpoint_family": "ldlc-suggest",
        "billable": false,
        "attempts": 1,
        "credits_charged": 0,
        "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)
