Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.arcmira.com/llms.txt

Use this file to discover all available pages before exploring further.

Arcmira list endpoints use cursor pagination. They never return total counts — fast, stable, infinite-scroll-friendly.

Request shape

ParameterDescription
limit1–100. Default 20.
cursorOpaque cursor from a previous response’s next_cursor. Omit on the first request.

Response shape

{
  "data": [ /* up to `limit` rows */ ],
  "has_more": true,
  "next_cursor": "eyJvZmZzZXQiOjI1fQ"
}
  • data — the page of results.
  • has_more — whether more results exist after this page.
  • next_cursor — opaque token to pass back as cursor. Treat it as a black box; the encoding is internal and may change.
When has_more is false, you’ve reached the end and next_cursor is null.

Walking a list

Node 20+
async function* listMentions(entityId) {
  let cursor;
  while (true) {
    const url = new URL('https://api.arcmira.com/v1/mentions');
    url.searchParams.set('entity_id', entityId);
    url.searchParams.set('limit', '100');
    if (cursor) url.searchParams.set('cursor', cursor);

    const res = await fetch(url, {
      headers: { Authorization: `Bearer ${process.env.ARCMIRA_API_KEY}` },
    });
    if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);

    const { data, has_more, next_cursor } = await res.json();
    for (const row of data) yield row;

    if (!has_more) return;
    cursor = next_cursor;
  }
}
Python 3.10+
import os, httpx

def list_mentions(entity_id):
    cursor = None
    while True:
        params = {'entity_id': entity_id, 'limit': 100}
        if cursor:
            params['cursor'] = cursor
        r = httpx.get(
            'https://api.arcmira.com/v1/mentions',
            params=params,
            headers={'Authorization': f"Bearer {os.environ['ARCMIRA_API_KEY']}"},
        )
        r.raise_for_status()
        body = r.json()
        for row in body['data']:
            yield row
        if not body['has_more']:
            return
        cursor = body['next_cursor']

Tips

  • Don’t reconstruct cursors. They’re opaque. If you need to resume from a known anchor, store the most recent next_cursor you saw and pass it back unmodified.
  • Pick a reasonable limit. 50–100 is typical. Larger pages save round trips; smaller pages return faster.
  • Cursors can expire. If the underlying ordering changes (rare), an old cursor may still work but include duplicates or gaps. Pull fresh from null if you need a strict snapshot.
  • Respect rate limits while iterating. Watch RateLimit-Remaining headers and back off when low. See Rate limits.