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

# Search answers

> Autocomplete answers for questions with a long answer list.

Use this endpoint when the current question has `autocomplete: true`. These questions (for example city or market area) have too many answers to send at once, so `answers` comes back empty. Call this endpoint as the user types, then submit the chosen answer's `id`.

## Headers

**Authorization** `string` *required*

`Bearer {uh}`.

## Path

**question** `string` *required*

Question hash (UUID): `questions.current.id`.

## Query

**s** `string` *required*

Survey hash (UUID). Answers are returned in the survey's country and language.

**q** `string`

Text the user has typed. Matches anywhere in the answer text. If empty, the first answers alphabetically are returned.

## Response

An array of at most 10 answers, sorted alphabetically.

**\[].id** `string`

Answer hash (UUID). Send it in `answer` to [Submit an answer](https://docs-saas.primeearn.com/partner-saas/qualification/submit-answer.md).

**\[].text** `string`

Answer text.

## Errors

| HTTP | When |
| - | - |
| `401` | Missing or unknown bearer token. |
| `404` | Unknown survey or question hash. |
| `422` | `s` missing or not a UUID, or `question` not a UUID. |
| `429` | Rate limit exceeded. |

```bash cURL theme={null}
curl --request GET \
  --url 'https://partners.{your-domain}/api/question/f9ad620e-305e-407e-9c37-ff2179870a3e/answers?s=2848cfc6-187c-44ec-b774-5dfef207e534&q=Ab' \
  --header 'Authorization: Bearer 0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f'
```

```json 200 theme={null}
[
  { "id": "1f0e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b", "text": "Abbott, Colfax, New Mexico" },
  { "id": "2a1b3c4d-5e6f-7081-92a3-b4c5d6e7f809", "text": "Aberdeen, Monmouth, New Jersey" }
]
```


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