apicheats.dev elevenlabs/llms.txt Raw .md
GET

/v1/convai/conversations/messages/smart-search

ElevenLabs API

Smart Search Conversation Messages

Base URL
https://api.elevenlabs.io
Auth
xi-api-key: <ELEVENLABS_API_KEY>
Last verified
2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 207 tokens · Vary: Accept

Critical gotchas

Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.

Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.

cURL

curl -X GET 'https://api.elevenlabs.io/v1/convai/conversations/messages/smart-search?text_query=example-text-query&agent_id=agent-id&page_size=20&cursor=example-cursor' \  -H "xi-api-key: $ELEVENLABS_API_KEY"
Get a free ElevenLabs API key → sponsored

Parameters

Name In Type Required Description
text_query query string Yes The search query text for semantic similarity matching
agent_id query string No Agent id (agent_…) or speech engine external id (seng_), resolved to the same underlying resource.
page_size query integer No Number of results per page. Max 50.
cursor query string No Used for fetching next page. Cursor is returned in the response.

Response 200 OK

{
  "meta": {
    "total": 0,
    "page": 0,
    "page_size": 0
  },
  "results": [
    {
      "conversation_id": "string",
      "agent_id": "string",
      "agent_name": "string",
      "transcript_index": 0,
      "chunk_text": "string",
      "chunk_highlights": [
        {
          "value": "string",
          "is_hit": true
        }
      ],
      "score": 0,
      "conversation_start_time_unix_secs": 0
    }
  ],
  "next_cursor": "string",
  "has_more": true
}