# reBuy Recommended Product API Documentation

<p>Get a recommended comparable product for the numeric id from a search result. The requested id is echoed as source_id. Returns the buy price and the sell-to-us price per condition grade A0 to A4. Prices are numbers in EUR. One credit per successful request. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/rebuy-api/rebuy_compare](https://scrappa.co/docs/rebuy-api/rebuy_compare)
- **API group:** reBuy API
- **Endpoint:** `GET https://scrappa.co/api/rebuy/compare`

## 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 |
| --- | --- | --- | --- |
| `id` | integer | Yes | Product id from a reBuy search result |

## Example response

```json
{
    "data": {
        "id": 12684558,
        "source_id": 15331709,
        "conditions": [
            {
                "grade": "A0",
                "label": "A0",
                "buy_price": {
                    "amount": 4.95,
                    "currency": "EUR"
                },
                "sell_price": {
                    "amount": 2.5,
                    "currency": "EUR"
                }
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "compare"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | No product exists for this id. Failed requests are not billed. |
| 503 | Upstream Unavailable | The source is temporarily unreachable. Failed requests are not billed. |

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