> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapebadger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Autocomplete

> Wallapop's search-box suggestions for a partial query, in Spain, Italy, or Portugal.

The suggestions Wallapop shows under its search box as you type.

**Credits:** 1. Empty results are not charged.

## Authorization

**X-API-Key** `string` *required*

Your ScrapeBadger API key.

## Query Parameters

**query** `string` *required*

Partial search text, at least 1 character, e.g. `bici`.

**market** `string` (default: es)

`es`, `it`, or `pt`. Suggestions come from that market's capital and language. See [`/v1/wallapop/markets`](https://docs.scrapebadger.com/api-reference/endpoint/wallapop/list-markets).

## Response

**query** `string`

Echo of the requested query.

**suggestions** `Suggestion[]`

Suggested searches, in Wallapop's order.

**Suggestion**

**text** `string`

The suggested search text.

**subtitle** `string | null`

Extra context Wallapop shows under the suggestion, when present.

**type** `string | null`

Wallapop's suggestion kind, e.g. `regular`.

**market** `string`

The market used for the request.

## Example

```bash cURL theme={null}
curl "https://scrapebadger.com/v1/wallapop/autocomplete?query=bici&market=es" \
  -H "X-API-Key: YOUR_API_KEY"
```

```python Python theme={null}
import requests

res = requests.get(
    "https://scrapebadger.com/v1/wallapop/autocomplete",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"query": "bici", "market": "es"},
)
data = res.json()
```

```javascript Node.js theme={null}
const res = await fetch(
  "https://scrapebadger.com/v1/wallapop/autocomplete?" +
    new URLSearchParams({ query: "bici", market: "es" }),
  { headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const data = await res.json();
```

```bash CLI theme={null}
scrapebadger wallapop autocomplete "bici" --market es
```

```json Response theme={null}
{
  "query": "bici",
  "suggestions": [
    { "text": "bicicleta look", "subtitle": null, "type": "regular" },
    { "text": "bicis", "subtitle": null, "type": "regular" },
    { "text": "bicicleta niños", "subtitle": null, "type": "regular" },
    { "text": "bicicletas montaña", "subtitle": null, "type": "regular" },
    { "text": "bici montaña", "subtitle": null, "type": "regular" }
  ],
  "market": "es"
}
```

> [!NOTE]
>
> Each autocomplete request costs **2 credits**. Empty results and failed requests are not charged.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.