{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pdata-world/json-schema/pdata-world-event-brief-out-schema.json",
  "title": "EventBriefOut",
  "description": "One event, compact. Open events list prices; closed ones their results.\n\nEvery field that has no value for this event is left out of the body,\nnever sent as null.",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pdata-world-openapi.json#/components/schemas/EventBriefOut",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "live",
        "tombstone"
      ],
      "title": "Kind",
      "description": "\"live\" while pdata tracks the event; \"tombstone\" once it was archived, 10 days after it closed, when only a final record remains."
    },
    "venue": {
      "type": "string",
      "title": "Venue",
      "description": "The venue's name, e.g. Kalshi."
    },
    "source": {
      "type": "string",
      "title": "Source",
      "description": "Venue id: polymarket, kalshi, manifold, myriad, limitless, predict, opinion or gemini."
    },
    "id": {
      "type": "string",
      "title": "Id",
      "description": "The venue's own event id; unique within `source`. pdata's page for it is `_meta.canonical_url`."
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Title",
      "description": "Event title as the venue publishes it."
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "closed"
      ],
      "title": "Status",
      "description": "open: trading continues, and `outcomes` carry prices. closed: the venue closed the event, and `outcomes` carry results and final prices."
    },
    "categories": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Categories",
      "description": "pdata topic categories (e.g. Politics, Sports), assigned by rules and AI tagging."
    },
    "countries": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Countries",
      "description": "Countries every tagged market of the event concerns, full English names, from pdata's AI tagging. Absent when the markets name different countries or none."
    },
    "closes_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Closes At",
      "description": "Open events: when the first listed outcome is due to end (UTC): its end date as the venue reports it, else the event's. On Kalshi that is the time Kalshi expects the market to expire. Trading can stop before it (markets on a data release close days earlier) or, when the result is late, run past it to a later fallback deadline that pdata does not publish."
    },
    "closed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Closed At",
      "description": "Closed events: when trading stopped (UTC): the venue's close time for the event, else the latest close among its markets, else its end date; never a future date. A venue can report the result after this. For a tombstone it is the close time pdata stored when it archived the event, which for a Kalshi game event can be the scheduled expiry, a day or two after the game ended."
    },
    "winner": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Winner",
      "description": "Closed events: the result the venue reported. One market: YES, NO or the winning label. Mutually exclusive outcomes: the one that resolved YES. Independent markets: the result of the most traded market that has one, as a winning label (`76ers`; `O/U 54.5: Over` for a market with its own label), or that market's label when it is the event's only YES. Absent otherwise; each outcome's `result` is the full record."
    },
    "outcomes_are": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Outcomes Are",
      "description": "How the outcomes relate: one market; mutually exclusive outcomes, of which one resolves YES; or independent markets. Absent when the venue does not say."
    },
    "volume_24h": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Volume 24H",
      "description": "Open events: the event's trading volume over the last 24 hours, in `volume_unit`."
    },
    "volume_total": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Volume Total",
      "description": "Lifetime trading volume of the event, in `volume_unit`. Absent for a tombstone."
    },
    "volume_unit": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Volume Unit",
      "description": "The unit of the volume figures: each venue's own, never converted between venues."
    },
    "outcomes_total": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Outcomes Total",
      "description": "How many outcomes (markets) the event has; `outcomes` lists at most 20. For a tombstone, how many pdata kept, when that is fewer than its cap of 10."
    },
    "outcomes": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/BriefOutcomeOut"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Outcomes",
      "description": "At most 20 outcomes. Mutually exclusive outcomes are ordered by price, highest first; independent markets by 24h volume while open and lifetime volume once closed, price breaking ties. Open events list closed markets last; closed events list markets with a reported result (YES or a winning label) first. A tombstone, which does not record whether its outcomes are exclusive, lists reported results first, then by final price."
    },
    "rules": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rules",
      "description": "The venue's resolution rules, once: the first listed outcome's text, else the event's. `rules_apply_to` says what it covers."
    },
    "rules_apply_to": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rules Apply To",
      "description": "Which outcomes `rules` belongs to."
    },
    "_meta": {
      "anyOf": [
        {
          "$ref": "#/$defs/ResponseMetaBrief"
        },
        {
          "type": "null"
        }
      ],
      "description": "Response metadata: attribution, the event's pdata.world page, `data_as_of`, `cite_as`, and links to the full record and the price history."
    }
  },
  "type": "object",
  "required": [
    "kind",
    "venue",
    "source",
    "id",
    "status"
  ],
  "$defs": {
    "BriefOutcomeOut": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "description": "The outcome's label: the venue's short outcome title where it sets one, else the market's full question. For a group of Kalshi events (one game's bets), always the market's question, because short titles repeat across them."
        },
        "priced_outcome": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Priced Outcome",
          "description": "Which of the market's two outcomes `probability` / `final_price` is the price of, given only when they are not Yes/No: `Over` on an over/under line, a team's or player's name on a match. Absent on yes/no markets, where it is Yes."
        },
        "probability": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Probability",
          "description": "Open events: the implied probability of the market's first outcome (usually YES), in [0, 1], rounded to 4 places. Absent for a market that has not traded (an untraded Kalshi market reports 0) and for every market of an event with no traded price."
        },
        "change_24h": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Change 24H",
          "description": "Open events: change in `probability` over the last 24 hours on the same scale (0.05 = up 5 points). Absent without usable history."
        },
        "volume_24h": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Volume 24H",
          "description": "Open events: the market's trading volume over the last 24 hours, in `volume_unit`. Absent where the venue reports no per-market volume."
        },
        "result": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Result",
          "description": "The venue's reported resolution of this market, as the venue wrote it: yes or no, or the winning label. Absent until the venue reports one."
        },
        "final_price": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Final Price",
          "description": "Closed events: the last price pdata recorded for the market's first outcome, in [0, 1]. Usually read after the market settled, so it records the result; it is not a forecast."
        },
        "price_1d_before_close": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price 1D Before Close",
          "description": "Archived events: the price of the market's first outcome one day before trading closed, where pdata kept a usable quote (Polymarket and Kalshi, the first three markets, events archived since November 2026)."
        },
        "market_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Market Id",
          "description": "The venue's market id; `get_market` takes it with `source`."
        }
      },
      "type": "object",
      "required": [
        "name"
      ],
      "title": "BriefOutcomeOut",
      "description": "One outcome (one market) of the event. Fields with nothing to say are left out."
    },
    "ResponseMetaBrief": {
      "properties": {
        "attribution": {
          "type": "string",
          "title": "Attribution",
          "description": "Who aggregated this data, under which licence, and whose data it is.",
          "default": "Data aggregated by pdata.world (https://pdata.world) from Polymarket, Kalshi, Manifold, Myriad, Limitless, Predict, Opinion and Gemini; CC BY 4.0; source data © each venue."
        },
        "canonical_url": {
          "type": "string",
          "title": "Canonical Url",
          "description": "Stable URL for this resource: the pdata.world page, or the API URL for list responses."
        },
        "as_of": {
          "type": "string",
          "format": "date-time",
          "title": "As Of",
          "description": "When this response was generated (UTC)."
        },
        "docs": {
          "type": "string",
          "title": "Docs",
          "description": "API documentation.",
          "default": "https://api.pdata.world/docs"
        },
        "hint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hint",
          "description": "Advice for the next call, present only when there is some: today, why a search may have come back empty and where else to look. Absent otherwise."
        },
        "total_capped": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total Capped",
          "description": "Set on `?search=` and `/search/suggest` responses only. `true` when more rows matched than the search inspects (20,000 per table; 5,000 for the typo-tolerant fallback): `meta.total` (or `total_events` / `total_markets`) is then a lower bound, not the exact count. `/markets` pages normally stay in exact order. `/events` stays in exact order for events matched by their own text and may miss events matched only through a child market. `/search/suggest` ranks the inspected rows only. Absent when the count is exact."
        },
        "cite_as": {
          "type": "string",
          "title": "Cite As",
          "description": "A ready-made citation sentence: what the data says, its as-of date, and the canonical URL. Safe to quote verbatim."
        },
        "source_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Url",
          "description": "The same event or market on the venue's own website. NULL for venues without public event pages."
        },
        "data_as_of": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Data As Of",
          "description": "When pdata last wrote a change to the data in this response (UTC): for an event, the newest `updated_at` among all its markets (a market's row is rewritten when its price, volume or status changes); for a market, its own `updated_at`. An open event's or market's `cite_as` carries the same date. `as_of` is when the response was built. Absent on a tombstone, whose record is final."
        },
        "full_record": {
          "type": "string",
          "title": "Full Record",
          "description": "The full event record at the API (`get_event`): every market with every field, including each market's own rules text."
        },
        "price_history": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price History",
          "description": "Price history over the last 7 days for the event's first 20 markets in the full record's order (`limit=20`; the history endpoint takes up to 50, and `market_id` adds any other). Absent for a tombstone, which keeps no history."
        }
      },
      "type": "object",
      "required": [
        "canonical_url",
        "cite_as",
        "full_record"
      ],
      "title": "ResponseMetaBrief",
      "description": "`_meta` of a brief: the resource meta plus links to the full data."
    }
  }
}