# Search Suggestions

Get autocomplete suggestions for a search query. Useful for implementing search-as-you-type functionality.

- **Documentation:** [https://scrappa.co/docs/vinted-api/vinted_suggestions](https://scrappa.co/docs/vinted-api/vinted_suggestions)
- **API group:** Vinted API
- **Endpoint:** `GET https://scrappa.co/api/vinted/suggestions`

## 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 |
| --- | --- | --- | --- |
| `query` | string | Yes | Partial search query to get suggestions for |
| `country` | string | No | Country code for Vinted domain. Defaults to FR. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/vinted/suggestions?query=nik"
```

## Example response

```json
{
    "suggestions": []
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 401 | Unauthorized | API key is missing or invalid |
| 422 | Validation Failed | The query is missing, too long, or the country code is not one of the supported Vinted domains. |
| 400 | Unsupported Country | The requested country is blocked for this Vinted endpoint due to upstream security restrictions. |
| 502 | Upstream HTTP Error | The upstream service is temporarily unavailable. Please retry shortly. |
| 503 | The upstream service is temporarily unavailable. Please retry shortly. | The upstream service is temporarily unavailable. Please retry shortly. |
| 500 | Invalid Upstream Response | Vinted returned a response that could not be parsed as JSON. |

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