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

# API Integration

> Integrate directly into your trading systems, bots, dashboards, or analytical workflows via REST API.

## Base URL

All endpoints use a single POST URL. The `agent_id` in the body determines which data you get.

```
https://narrative.agent.heisenberg.so/api/v2/semantic/retrieve/parameterized
```

```python Python theme={null}
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": 574,
    "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 theme={null}
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: 574,
      params: { closed: "False" },
      pagination: { limit: 10, offset: 0 },
      formatter_config: { format_type: "raw" }
    })
  }
);

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

```bash cURL theme={null}
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": 574,
    "params": {"closed": "False"},
    "pagination": {"limit": 10, "offset": 0},
    "formatter_config": {"format_type": "raw"}
  }'
```

## Next steps

* Learn and understand the [request and response formats](/docs/reference/api-structure) for all available options and pagination.
* Browse [Working with AI](/docs/introduction/working-with-ai) to integrate with Claude via MCP.


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