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

# Quickstart

> Send your first search request and read the answers.

## 1. Get your API key

Create a key in [Dashboard](https://dashboard.thred.ai) → Settings → API keys, then set it in your terminal:

```bash theme={null}
export THRED_API_KEY="YOUR_API_KEY"
```

## 2. Create a search

```bash theme={null}
curl https://api.thred.dev/v1/search \
  -H "Authorization: Bearer $THRED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Where can I buy a Nintendo Switch 2 in Austin today?",
    "results": 2
  }'
```

`results` accepts 1–10 and limits how many distinct sources Thred can call. The API returns HTTP `202` with a search `id` beginning with `sch_`. Copy that ID below.

## 3. Read the answers

```bash theme={null}
export THRED_SEARCH_ID="SEARCH_ID_FROM_CREATE_RESPONSE"

curl "https://api.thred.dev/v1/search/$THRED_SEARCH_ID" \
  -H "Authorization: Bearer $THRED_API_KEY"
```

Read answers from `records[].content`, alongside their sources and supporting evidence. For example:

> Example Electronics has the Nintendo Switch 2 in stock for pickup today until 6 p.m. Central Time.

Repeat the GET while `status` is `running`. Stop when it becomes `completed` or `failed`. Each response contains the full current set of records, so replace the previous snapshot instead of appending it.

See [Create a search](https://www.thred.dev/api-reference/create-search.md) for options and [Get a search](https://www.thred.dev/api-reference/get-search.md) for response fields. All examples use fictional sources.


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