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

# List active events

> Active cross-venue events in a stable id order, paged with `next_cursor`.

**Freshness**

- Every 200 carries `universe_last_seen_at` and `universe_age_s`: the newest `last_seen_at` among active events, and how long ago that was.

**Good to know**

- A cursor is bound to the filters it was minted under; reuse it only with the same filters.
- An event that becomes active or resolves while you page may or may not appear.
- An event whose id is longer than 256 characters is not listed.

**Errors**

| Status | Code | When |
|---|---|---|
| 422 | `invalid_request` | Bad bounds, an unknown parameter, or a cursor that is malformed or replayed under other filters. |
| 503 | `upstream_unavailable` | Event data unreadable, no active event, or the newest `last_seen_at` older than the bound. Never an empty 200 from a dead source. |

Any route can also answer 401, 403, 429, 500 or 503 `dependency_unavailable`, described on the Errors page.



## OpenAPI

````yaml /openapi.json get /public/v1/events
openapi: 3.1.0
info:
  description: >-
    Read-only prediction-market data across Polymarket, Kalshi, Limitless and
    predict.fun over REST. Every request sends your key as `Authorization:
    Bearer tl_live_…`; try any endpoint from its page.
  title: TrendlineLabs Public API
  version: '1'
servers:
  - description: Production
    url: https://systems.trendlinelabs.ai
security: []
tags:
  - description: 'Read back the key you are calling with: its scopes, tier and rate limit.'
    name: Your key
  - description: Events group markets across venues; each carries a `universal_id`.
    name: Events
  - description: One market's order book, price history and trades on one venue.
    name: Markets
  - description: Current prices for a set of markets in one call.
    name: Prices
  - description: Live cross-venue price gaps on the same market.
    name: Opportunities
paths:
  /public/v1/events:
    get:
      tags:
        - Events
      summary: List active events
      description: >-
        Active cross-venue events in a stable id order, paged with
        `next_cursor`.


        **Freshness**


        - Every 200 carries `universe_last_seen_at` and `universe_age_s`: the
        newest `last_seen_at` among active events, and how long ago that was.


        **Good to know**


        - A cursor is bound to the filters it was minted under; reuse it only
        with the same filters.

        - An event that becomes active or resolves while you page may or may not
        appear.

        - An event whose id is longer than 256 characters is not listed.


        **Errors**


        | Status | Code | When |

        |---|---|---|

        | 422 | `invalid_request` | Bad bounds, an unknown parameter, or a
        cursor that is malformed or replayed under other filters. |

        | 503 | `upstream_unavailable` | Event data unreadable, no active event,
        or the newest `last_seen_at` older than the bound. Never an empty 200
        from a dead source. |


        Any route can also answer 401, 403, 429, 500 or 503
        `dependency_unavailable`, described on the Errors page.
      operationId: listEvents
      parameters:
        - description: only events in this category
          in: query
          name: category
          required: false
          schema:
            anyOf:
              - maxLength: 64
                type: string
              - type: 'null'
            description: only events in this category
            title: Category
        - description: only events listed on this venue
          in: query
          name: venue
          required: false
          schema:
            anyOf:
              - enum:
                  - kalshi
                  - polymarket
                  - limitless
                  - predictfun
                type: string
              - type: 'null'
            description: only events listed on this venue
            title: Venue
        - description: only events listed on at least this many venues
          in: query
          name: min_venues
          required: false
          schema:
            default: 1
            description: only events listed on at least this many venues
            maximum: 4
            minimum: 1
            title: Min Venues
            type: integer
        - description: events per page
          in: query
          name: limit
          required: false
          schema:
            default: 50
            description: events per page
            maximum: 100
            minimum: 1
            title: Limit
            type: integer
        - description: >-
            `next_cursor` from the previous page; it binds the filters it was
            minted under
          in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - maxLength: 4152
                type: string
              - type: 'null'
            description: >-
              `next_cursor` from the previous page; it binds the filters it was
              minted under
            title: Cursor
      responses:
        '200':
          content:
            application/json:
              example:
                events:
                  - categories:
                      - crypto
                      - bitcoin
                    category_group: crypto
                    first_seen_at: '2026-09-01T12:00:00.000Z'
                    image_url: null
                    kalshi_event_ticker: KXBTC-26DEC31
                    last_seen_at: '2026-10-06T05:59:30.000Z'
                    limitless_event_id: null
                    platform_count: 2
                    poly_event_slug: bitcoin-above-100k-on-december-31
                    predictfun_event_id: null
                    resolution_date: '2026-12-31T23:59:59.000Z'
                    title: Bitcoin price at year end
                    universal_id: ev-btc-100k-2026
                    venues:
                      - kalshi
                      - polymarket
                next_cursor: >-
                  eyJ2IjoxLCJhZnRlciI6ImV2LWJ0Yy0xMDBrLTIwMjYiLCJmcCI6IjAwMDAwMDAwMDAwMDAwMDAifQ==
                universe_age_s: 30
                universe_last_seen_at: '2026-10-06T05:59:30.000Z'
              schema:
                $ref: '#/components/schemas/PublicEventsPage'
          description: Successful Response
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: 'unauthorized: no key, or a key that is unknown, revoked or expired.'
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            WWW-Authenticate:
              description: Bearer realm="public-api"
              schema:
                type: string
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            insufficient_scope: the key lacks the scope this route needs;
            ip_not_allowed: the request came from an address outside the key's
            allowlist; tier_required: the key owner's plan does not include API
            access; access_not_granted: API access is free but granted on
            request; request it on https://trendlinelabs.ai/developer.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            invalid_request: a parameter is missing, unknown, malformed or out
            of bounds, or a cursor does not match.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            rate_limited: too many requests, or too many failed authentications;
            wait Retry-After seconds.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Retry-After:
              description: seconds to wait before retrying
              schema:
                type: integer
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            internal_error: an unexpected failure on our side; quote the request
            id. The body may instead be text/plain with no envelope and no
            X-RateLimit-* headers when a failure escapes the route's own
            handling.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            dependency_unavailable: one of our own stores could not be read;
            retry later; upstream_unavailable: the data source is unreadable,
            absent or older than its bound; never an empty 200.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
      security:
        - HTTPBearer: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >
            #!/bin/sh

            # listEvents: List active events. Needs TRENDLINE_API_KEY;
            TRENDLINE_API_BASE overrides the base.

            curl -sS
            "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/events?limit=1"
            \
              -H "Authorization: Bearer $TRENDLINE_API_KEY"
        - label: Python
          lang: python
          source: >
            """listEvents: List active events. Needs TRENDLINE_API_KEY;
            TRENDLINE_API_BASE overrides the base."""

            import os


            import requests


            BASE = os.environ.get("TRENDLINE_API_BASE",
            "https://systems.trendlinelabs.ai")

            KEY = os.environ["TRENDLINE_API_KEY"]


            r = requests.get(f"{BASE}/public/v1/events", params={"limit": "1"},
                             headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
            r.raise_for_status()

            print(r.json())
        - label: JavaScript
          lang: javascript
          source: >
            // listEvents: List active events. Needs TRENDLINE_API_KEY;
            TRENDLINE_API_BASE overrides the base.

            const BASE = process.env.TRENDLINE_API_BASE ??
            "https://systems.trendlinelabs.ai";

            const KEY = process.env.TRENDLINE_API_KEY;

            const r = await fetch(`${BASE}/public/v1/events?limit=1`, { headers:
            { Authorization: `Bearer ${KEY}` } });

            console.log(r.status, await r.json());
components:
  schemas:
    PublicEventsPage:
      properties:
        events:
          description: this page's events, in a stable id order
          items:
            $ref: '#/components/schemas/PublicEventSummary'
          title: Events
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: pass as `cursor` for the next page; null on the last page
          title: Next Cursor
        universe_age_s:
          description: >-
            seconds since `universe_last_seen_at`; the route answers 503 instead
            once this passes its bound
          title: Universe Age S
          type: integer
        universe_last_seen_at:
          description: >-
            the newest `last_seen_at` among active events, ISO 8601: the list's
            liveness signal
          title: Universe Last Seen At
          type: string
      required:
        - events
        - universe_last_seen_at
        - universe_age_s
      title: PublicEventsPage
      type: object
    PublicError:
      properties:
        error:
          $ref: '#/components/schemas/PublicErrorBody'
          description: the refusal
      required:
        - error
      title: PublicError
      type: object
    PublicEventSummary:
      properties:
        categories:
          default: []
          description: the event's categories
          items:
            type: string
          title: Categories
          type: array
        category_group:
          anyOf:
            - type: string
            - type: 'null'
          description: the broad category group
          title: Category Group
        first_seen_at:
          anyOf:
            - type: string
            - type: 'null'
          description: when the event was first seen, ISO 8601
          title: First Seen At
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          description: an image for the event, when a venue publishes one
          title: Image Url
        kalshi_event_ticker:
          anyOf:
            - type: string
            - type: 'null'
          description: the Kalshi event ticker, when Kalshi lists the event
          title: Kalshi Event Ticker
        last_seen_at:
          anyOf:
            - type: string
            - type: 'null'
          description: when the event was last seen on a venue, ISO 8601
          title: Last Seen At
        limitless_event_id:
          anyOf:
            - type: string
            - type: 'null'
          description: the Limitless event id, when Limitless lists the event
          title: Limitless Event Id
        platform_count:
          description: how many venues list the event
          title: Platform Count
          type: integer
        poly_event_slug:
          anyOf:
            - type: string
            - type: 'null'
          description: the Polymarket event slug, when Polymarket lists the event
          title: Poly Event Slug
        predictfun_event_id:
          anyOf:
            - type: string
            - type: 'null'
          description: the predict.fun event id, when predict.fun lists the event
          title: Predictfun Event Id
        resolution_date:
          anyOf:
            - type: string
            - type: 'null'
          description: when the event resolves, ISO 8601
          title: Resolution Date
        title:
          anyOf:
            - type: string
            - type: 'null'
          description: the event title
          title: Title
        universal_id:
          description: the event universal id; pass it to /public/v1/events/{universal_id}
          title: Universal Id
          type: string
        venues:
          default: []
          description: the venues that list the event
          items:
            enum:
              - kalshi
              - polymarket
              - limitless
              - predictfun
            type: string
          title: Venues
          type: array
      required:
        - universal_id
        - platform_count
      title: PublicEventSummary
      type: object
    PublicErrorBody:
      properties:
        code:
          description: >-
            a machine-readable code from x-known-codes; a new code may be added,
            so handle an unknown one by its status
          title: Code
          type: string
          x-known-codes:
            - access_not_granted
            - dependency_unavailable
            - insufficient_scope
            - internal_error
            - invalid_request
            - ip_not_allowed
            - market_closed
            - not_found
            - rate_limited
            - tier_required
            - unauthorized
            - upstream_unavailable
            - venue_not_listed
            - venue_unsupported
        message:
          description: a human-readable explanation; never parse it
          title: Message
          type: string
        request_id:
          description: >-
            this request's id, also sent as the X-Request-Id header; quote it
            when asking for help
          title: Request Id
          type: string
      required:
        - code
        - message
        - request_id
      title: PublicErrorBody
      type: object
  securitySchemes:
    HTTPBearer:
      description: 'Authorization: Bearer tl_live_…'
      scheme: bearer
      type: http

````

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