# Trovaprezzi Discovery API Documentation

`GET /api/trovaprezzi/discovery` lists public product and category URLs from the site text index or a public XML sitemap. Use these URLs as ids for search, product and price-history.

- **Documentation:** [https://scrappa.co/docs/trovaprezzi-api/trovaprezzi_discovery](https://scrappa.co/docs/trovaprezzi-api/trovaprezzi_discovery)
- **API group:** Trovaprezzi API
- **Endpoint:** `GET https://scrappa.co/api/trovaprezzi/discovery`

## 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 |
| --- | --- | --- | --- |
| `type` | string | Yes | Source: llms or sitemap. |
| `sitemap` | string | No | Optional child sitemap path from the index. Defaults to /sitemap-index.xml. |

## Example request

```bash
#!/bin/bash

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

## Example response

```json
{
    "success": true,
    "type": "sitemap",
    "urls": [
        "https://www.trovaprezzi.it/sitemap-products.xml"
    ],
    "meta": {
        "duration_ms": 330,
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | One or more query parameters failed validation. |
| 503 | Upstream Unavailable | Trovaprezzi returned a challenged, empty or malformed response through the approved pool. |

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