> For the complete documentation index, see [llms.txt](https://falcon-bot.gitbook.io/falcon-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://falcon-bot.gitbook.io/falcon-api/getting-started/quickstart.md).

# Quickstart

## 1. Get Your API Key

Create an account and generate your API key from the Falcon dashboard.

1. Go to <https://api.polymarketanalytics.com>
2. Sign in using your email address.
3. Once logged in, navigate to the API Keys page.
4. Your API key will be automatically generated and ready to use.

You will use this key as a Bearer token to authenticate all Falcon API requests.

## 2. Authentication Setup

Falcon uses **Bearer token authentication**.

#### Base URL

```
https://narrative.agent.heisenberg.so/api
```

#### Authorization Header

Include your API token in the request header.

```
Authorization: Bearer YOUR_API_TOKEN
```

## 3. Make Your First Request

Send a POST request to retrieve data from the Falcon API.

```
POST /v2/semantic/retrieve/parameterized
```

Example request body:

```json
{
  "agent_id": 555,
  "params": {
    "closed": "False"
  },
  "pagination": {
    "limit": 10,
    "offset": 0
  },
  "formatter_config": {
    "format_type": "raw"
  }
}
```

***

## Code Examples

Below are example requests using common programming languages.

### Python

```python
import requests

url = "https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized"

headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
}

payload = {
    "agent_id": 555,
    "params": {"closed": "False"},
    "pagination": {"limit": 10, "offset": 0},
    "formatter_config": {"format_type": "raw"}
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

### JavaScript

```javascript
const response = await fetch(
  "https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized",
  {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_TOKEN",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      agent_id: 555,
      params: { closed: "False" },
      pagination: { limit: 10, offset: 0 },
      formatter_config: { format_type: "raw" }
    })
  }
);

const data = await response.json();
console.log(data);
```

### cURL

```bash
curl -X POST https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": 555,
    "params": {"closed": "False"},
    "pagination": {"limit": 10, "offset": 0},
    "formatter_config": {"format_type": "raw"}
  }'
```
