# OfferUp Suggestions API Documentation

Scrappa's `GET /api/offerup/suggestions` endpoint returns the query completions OfferUp's own search bar shows for a partial term.

## Why call this separately

OfferUp exposes a rewritten `suggestedQuery` field inside the search resolver, but that is a corrected query, not a typeahead list. This endpoint returns the raw completion labels.

Use it to drive a search-as-you-type field, then send the chosen label to [Search](/docs/offerup-api/offerup_search) as `q`.

- **Documentation:** [https://scrappa.co/docs/offerup-api/offerup_suggestions](https://scrappa.co/docs/offerup-api/offerup_suggestions)
- **API group:** OfferUp API
- **Endpoint:** `GET https://scrappa.co/api/offerup/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 |
| --- | --- | --- | --- |
| `prefix` | string | Yes | Partial search term, at least 1 character. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/offerup/suggestions?prefix=iph"
```

## Example response

```json
{
    "success": true,
    "prefix": "iph",
    "suggestions": [
        "iphone 13",
        "iphone 12",
        "iphone se"
    ],
    "count": 3
}
```

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