{"openapi":"3.1.0","info":{"title":"pdata backend","description":"pdata is a read-only aggregator of live prediction-market data across 8 platforms (Polymarket, Kalshi, Manifold, Myriad, Limitless, Predict, Opinion, Gemini). All endpoints are public; no auth, no rate cards.\n\n**For AI agents:** a Model Context Protocol server is mounted at https://api.pdata.world/mcp exposing the 9 most useful operations as tools. For non-MCP agents, a plain JSON descriptor of the MCP surface is available at https://api.pdata.world/api/v1/mcp-info. Quickstart guide: https://pdata.world/agents.md. Verbose index with curl examples: https://pdata.world/llms-full.txt.","version":"1.6.0","contact":{"name":"pdata agent guide","url":"https://pdata.world/agents"},"license":{"name":"Per-source attribution; aggregation under MIT","url":"https://pdata.world/methodology"},"termsOfService":"https://pdata.world/about"},"paths":{"/api/v1/events/in-focus":{"get":{"tags":["events"],"summary":"Get In Focus","description":"Curated 4-source-group × 5-category grid for the homepage.\n\nReads the pre-materialized `InFocusOut` payload from `in_focus_grid`\n(single-row table, refreshed by the scheduler every ~5 min via\n`compute_and_store_in_focus_grid`). One indexed row fetch + Pydantic\nJSON validation = ~5ms backend latency.\n\nSee `compute_and_store_in_focus_grid` for the writer side and the\n`_IN_FOCUS_SQL` / `_PULSE_SQL` doc-blocks for the curation algorithm:\n\nTwo-pass fill:\n\n1. **Priority-5 candidates** (`_IN_FOCUS_SQL`). For every (group,\n   category) cell, the top-N markets (by score = |Δprob| × cf)\n   whose parent event carries that category. Same logic for all\n   four strips.\n2. **Pulse extension** (`_PULSE_SQL`, **'others' + 'manifold'\n   strips**). Pulse rows fill empty cells in those two strips\n   with the next-best market from the same source(s) whose parent\n   event sits OUTSIDE the priority 5 (Health, Economics, Climate,\n   etc.). Drained via an **empty-first** policy — each pulse\n   market goes to the cell with the fewest current candidates —\n   so a strip with 15 pulse markets and 5 cells distributes ~3\n   per cell rather than piling 10 into cell 0.\n\n   Pulse is **NOT** applied to Polymarket or Kalshi. Their\n   priority-5 coverage is dense enough that a missing cell is\n   signal (\"nothing in Elections moved >2pp on Polymarket today\")\n   rather than a layout bug. Manifold *is* pulse-extended\n   because, despite high market volume overall, its category\n   mix skews away from Culture/World — the strip would otherwise\n   leave those cells empty.\n\nBoth queries respect the `_IN_FOCUS_BLOCKED_QUESTION_PATTERNS`\ntitle kill-switch — see that constant for the list and how to\nextend it.","operationId":"get_in_focus_api_v1_events_in_focus_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InFocusOut"}}}}}}},"/api/v1/events":{"get":{"tags":["events"],"summary":"List Events","description":"Use when an agent wants to browse, filter, or search prediction-market events across all 8 platforms. Returns paginated events with their child markets, prices, and platform metadata. Filterable by source (polymarket/kalshi/manifold/myriad/limitless/predict/opinion/gemini), category, country, status (open/closed), and full-text search via `search`. Sortable by `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, or `closed_time` (prefix `-` for descending). Cap `page_size` ≤ 50 to keep responses small enough for LLM context windows.","operationId":"list_events","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed).","default":1,"title":"Page"},"description":"Page number (1-indexed)."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200; default 50). Pass page_size=5 for chat-style summaries.","default":50,"title":"Page Size"},"description":"Items per page (1-200; default 50). Pass page_size=5 for chat-style summaries."},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source name(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini.","title":"Source"},"description":"Source name(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini."},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by `active` flag (true/false).","title":"Active"},"description":"Filter by `active` flag (true/false)."},{"name":"closed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by `closed` flag (true/false). Open markets are `closed=false`.","title":"Closed"},"description":"Filter by `closed` flag (true/false). Open markets are `closed=false`."},{"name":"volume_24hr_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum 24h notional volume (USD). Excludes low-activity markets.","title":"Volume 24Hr Min"},"description":"Minimum 24h notional volume (USD). Excludes low-activity markets."},{"name":"volume_24hr_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum 24h notional volume (USD).","title":"Volume 24Hr Max"},"description":"Maximum 24h notional volume (USD)."},{"name":"volume_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum cumulative volume (USD). Excludes low-activity markets across full history.","title":"Volume Min"},"description":"Minimum cumulative volume (USD). Excludes low-activity markets across full history."},{"name":"volume_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum cumulative volume (USD).","title":"Volume Max"},"description":"Maximum cumulative volume (USD)."},{"name":"rank_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Minimum rank score (numeric). Higher = more prominent.","title":"Rank Min"},"description":"Minimum rank score (numeric). Higher = more prominent."},{"name":"rank_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Maximum rank score (numeric).","title":"Rank Max"},"description":"Maximum rank score (numeric)."},{"name":"ends_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to events whose end_date >= this ISO 8601 datetime (e.g. `2026-06-01T00:00:00Z`).","title":"Ends After"},"description":"Filter to events whose end_date >= this ISO 8601 datetime (e.g. `2026-06-01T00:00:00Z`)."},{"name":"ends_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to events whose end_date <= this ISO 8601 datetime.","title":"Ends Before"},"description":"Filter to events whose end_date <= this ISO 8601 datetime."},{"name":"hide_ended","in":"query","required":false,"schema":{"type":"boolean","description":"If true, hide markets/events whose end_date is in the past (end_date <= now()); rows with no end_date are kept.","default":false,"title":"Hide Ended"},"description":"If true, hide markets/events whose end_date is in the past (end_date <= now()); rows with no end_date are kept."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to rows whose created_at >= this ISO 8601 datetime (first appearance in pdata's database).","title":"Created After"},"description":"Filter to rows whose created_at >= this ISO 8601 datetime (first appearance in pdata's database)."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to rows whose created_at <= this ISO 8601 datetime.","title":"Created Before"},"description":"Filter to rows whose created_at <= this ISO 8601 datetime."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated status list; any of {open, closing-soon, resolved}","title":"Status"},"description":"Comma-separated status list; any of {open, closing-soon, resolved}"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Full-text search across title, description, slug. Case-insensitive substring match.","title":"Search"},"description":"Full-text search across title, description, slug. Case-insensitive substring match."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field name; prefix '-' for descending order (e.g. `-volume_24hr`). Common allowed values: `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, `closed_time`, `updated_at`. Markets endpoints additionally accept `probability`, `prob_24h_change`, `spread`. Invalid values return 400.","title":"Sort"},"description":"Field name; prefix '-' for descending order (e.g. `-volume_24hr`). Common allowed values: `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, `closed_time`, `updated_at`. Markets endpoints additionally accept `probability`, `prob_24h_change`, `spread`. Invalid values return 400."},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category labels to include (OR)","title":"Categories"},"description":"Comma-separated category labels to include (OR)"},{"name":"categories_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category labels to exclude","title":"Categories Exclude"},"description":"Comma-separated category labels to exclude"},{"name":"hide_price_derivatives","in":"query","required":false,"schema":{"type":"boolean","description":"If true, exclude events with is_price_derivative=TRUE","default":false,"title":"Hide Price Derivatives"},"description":"If true, exclude events with is_price_derivative=TRUE"},{"name":"include_uncategorized","in":"query","required":false,"schema":{"type":"boolean","description":"If true, the include clause also matches rows whose categories array is empty/NULL or contains only labels outside the canonical set (synthetic 'Other' bucket).","default":false,"title":"Include Uncategorized"},"description":"If true, the include clause also matches rows whose categories array is empty/NULL or contains only labels outside the canonical set (synthetic 'Other' bucket)."},{"name":"countries","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated country names to include (OR). Full English names per the AI categorizer's prompt — e.g. 'United States', 'United Kingdom', 'European Union'. No allow-list — misspelled values silently yield zero matches.","title":"Countries"},"description":"Comma-separated country names to include (OR). Full English names per the AI categorizer's prompt — e.g. 'United States', 'United Kingdom', 'European Union'. No allow-list — misspelled values silently yield zero matches."},{"name":"countries_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated country names to exclude.","title":"Countries Exclude"},"description":"Comma-separated country names to exclude."},{"name":"include_uncountried","in":"query","required":false,"schema":{"type":"boolean","description":"If true, the include clause also matches rows whose countries array is empty/NULL — country-agnostic markets (synthetic 'No country' bucket).","default":false,"title":"Include Uncountried"},"description":"If true, the include clause also matches rows whose countries array is empty/NULL — country-agnostic markets (synthetic 'No country' bucket)."},{"name":"country_match","in":"query","required":false,"schema":{"type":"string","pattern":"^(any|all)$","description":"How multiple `countries` combine: 'any' (default, OR — tagged with any selected country) or 'all' (AND — tagged with all of them, e.g. both Iran and Israel). Markets carry ≤3 country tags.","default":"any","title":"Country Match"},"description":"How multiple `countries` combine: 'any' (default, OR — tagged with any selected country) or 'all' (AND — tagged with all of them, e.g. both Iran and Israel). Markets carry ≤3 country tags."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_EventOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/events/{source}/{event_id}":{"get":{"tags":["events"],"summary":"Get Event","description":"Use when an agent needs the full detail of a single prediction-market event by its composite key (source + event_id). Returns the event with all of its child markets, latest probabilities, and metadata. The canonical URL `https://pdata.world/events/{source}/{event_id}` is stable for the lifetime of the underlying market.","operationId":"get_event","parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","description":"Platform ID: polymarket / kalshi / manifold / myriad / limitless / predict / opinion / gemini.","title":"Source"},"description":"Platform ID: polymarket / kalshi / manifold / myriad / limitless / predict / opinion / gemini."},{"name":"event_id","in":"path","required":true,"schema":{"type":"string","description":"Event ID native to the source. URL-encoded if it contains special chars.","title":"Event Id"},"description":"Event ID native to the source. URL-encoded if it contains special chars."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/markets":{"get":{"tags":["markets"],"summary":"List Markets","description":"Use when the user wants to browse, filter, or sort individual markets (not events). Returns paginated markets with their probability, volume, source, parent event ID, and 24h delta. Filterable by source, country, category, status, and full-text `search`. Sortable by `volume_24hr` or `probability`. Cap `page_size` ≤ 50 for chat-friendly responses.","operationId":"list_markets","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed).","default":1,"title":"Page"},"description":"Page number (1-indexed)."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200; default 50). Pass page_size=5 for chat-style summaries.","default":50,"title":"Page Size"},"description":"Items per page (1-200; default 50). Pass page_size=5 for chat-style summaries."},{"name":"spread_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Minimum bid-ask spread (0-1). Higher = less liquid.","title":"Spread Min"},"description":"Minimum bid-ask spread (0-1). Higher = less liquid."},{"name":"spread_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Maximum bid-ask spread (0-1). Lower = more liquid.","title":"Spread Max"},"description":"Maximum bid-ask spread (0-1). Lower = more liquid."},{"name":"probability_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Minimum probability (0-1). Filters to markets above this implied probability.","title":"Probability Min"},"description":"Minimum probability (0-1). Filters to markets above this implied probability."},{"name":"probability_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Maximum probability (0-1).","title":"Probability Max"},"description":"Maximum probability (0-1)."},{"name":"prob_24h_change_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"description":"Minimum 24h probability change (-1 to 1, signed). Use 0.15 for >=15pp positive moves.","title":"Prob 24H Change Min"},"description":"Minimum 24h probability change (-1 to 1, signed). Use 0.15 for >=15pp positive moves."},{"name":"prob_24h_change_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"description":"Maximum 24h probability change (-1 to 1, signed).","title":"Prob 24H Change Max"},"description":"Maximum 24h probability change (-1 to 1, signed)."},{"name":"volume_24h_change_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum 24h notional volume change (signed USD; e.g. 1000 means +$1k vs prior 24h).","title":"Volume 24H Change Min"},"description":"Minimum 24h notional volume change (signed USD; e.g. 1000 means +$1k vs prior 24h)."},{"name":"volume_24h_change_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum 24h notional volume change (signed USD).","title":"Volume 24H Change Max"},"description":"Maximum 24h notional volume change (signed USD)."},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source name(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini.","title":"Source"},"description":"Source name(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini."},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by `active` flag (true/false).","title":"Active"},"description":"Filter by `active` flag (true/false)."},{"name":"closed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by `closed` flag (true/false). Open markets are `closed=false`.","title":"Closed"},"description":"Filter by `closed` flag (true/false). Open markets are `closed=false`."},{"name":"volume_24hr_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum 24h notional volume (USD). Excludes low-activity markets.","title":"Volume 24Hr Min"},"description":"Minimum 24h notional volume (USD). Excludes low-activity markets."},{"name":"volume_24hr_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum 24h notional volume (USD).","title":"Volume 24Hr Max"},"description":"Maximum 24h notional volume (USD)."},{"name":"volume_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum cumulative volume (USD). Excludes low-activity markets across full history.","title":"Volume Min"},"description":"Minimum cumulative volume (USD). Excludes low-activity markets across full history."},{"name":"volume_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum cumulative volume (USD).","title":"Volume Max"},"description":"Maximum cumulative volume (USD)."},{"name":"rank_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Minimum rank score (numeric). Higher = more prominent.","title":"Rank Min"},"description":"Minimum rank score (numeric). Higher = more prominent."},{"name":"rank_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Maximum rank score (numeric).","title":"Rank Max"},"description":"Maximum rank score (numeric)."},{"name":"ends_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to events whose end_date >= this ISO 8601 datetime (e.g. `2026-06-01T00:00:00Z`).","title":"Ends After"},"description":"Filter to events whose end_date >= this ISO 8601 datetime (e.g. `2026-06-01T00:00:00Z`)."},{"name":"ends_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to events whose end_date <= this ISO 8601 datetime.","title":"Ends Before"},"description":"Filter to events whose end_date <= this ISO 8601 datetime."},{"name":"hide_ended","in":"query","required":false,"schema":{"type":"boolean","description":"If true, hide markets/events whose end_date is in the past (end_date <= now()); rows with no end_date are kept.","default":false,"title":"Hide Ended"},"description":"If true, hide markets/events whose end_date is in the past (end_date <= now()); rows with no end_date are kept."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to rows whose created_at >= this ISO 8601 datetime (first appearance in pdata's database).","title":"Created After"},"description":"Filter to rows whose created_at >= this ISO 8601 datetime (first appearance in pdata's database)."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to rows whose created_at <= this ISO 8601 datetime.","title":"Created Before"},"description":"Filter to rows whose created_at <= this ISO 8601 datetime."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated status list; any of {open, closing-soon, resolved}","title":"Status"},"description":"Comma-separated status list; any of {open, closing-soon, resolved}"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Full-text search across title, description, slug. Case-insensitive substring match.","title":"Search"},"description":"Full-text search across title, description, slug. Case-insensitive substring match."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field name; prefix '-' for descending order (e.g. `-volume_24hr`). Common allowed values: `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, `closed_time`, `updated_at`. Markets endpoints additionally accept `probability`, `prob_24h_change`, `spread`. Invalid values return 400.","title":"Sort"},"description":"Field name; prefix '-' for descending order (e.g. `-volume_24hr`). Common allowed values: `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, `closed_time`, `updated_at`. Markets endpoints additionally accept `probability`, `prob_24h_change`, `spread`. Invalid values return 400."},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category labels to include (OR)","title":"Categories"},"description":"Comma-separated category labels to include (OR)"},{"name":"categories_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category labels to exclude","title":"Categories Exclude"},"description":"Comma-separated category labels to exclude"},{"name":"hide_price_derivatives","in":"query","required":false,"schema":{"type":"boolean","description":"If true, exclude events with is_price_derivative=TRUE","default":false,"title":"Hide Price Derivatives"},"description":"If true, exclude events with is_price_derivative=TRUE"},{"name":"include_uncategorized","in":"query","required":false,"schema":{"type":"boolean","description":"If true, the include clause also matches rows whose categories array is empty/NULL or contains only labels outside the canonical set (synthetic 'Other' bucket).","default":false,"title":"Include Uncategorized"},"description":"If true, the include clause also matches rows whose categories array is empty/NULL or contains only labels outside the canonical set (synthetic 'Other' bucket)."},{"name":"countries","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated country names to include (OR). Full English names per the AI categorizer's prompt — e.g. 'United States', 'United Kingdom', 'European Union'. No allow-list — misspelled values silently yield zero matches.","title":"Countries"},"description":"Comma-separated country names to include (OR). Full English names per the AI categorizer's prompt — e.g. 'United States', 'United Kingdom', 'European Union'. No allow-list — misspelled values silently yield zero matches."},{"name":"countries_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated country names to exclude.","title":"Countries Exclude"},"description":"Comma-separated country names to exclude."},{"name":"include_uncountried","in":"query","required":false,"schema":{"type":"boolean","description":"If true, the include clause also matches rows whose countries array is empty/NULL — country-agnostic markets (synthetic 'No country' bucket).","default":false,"title":"Include Uncountried"},"description":"If true, the include clause also matches rows whose countries array is empty/NULL — country-agnostic markets (synthetic 'No country' bucket)."},{"name":"country_match","in":"query","required":false,"schema":{"type":"string","pattern":"^(any|all)$","description":"How multiple `countries` combine: 'any' (default, OR — tagged with any selected country) or 'all' (AND — tagged with all of them, e.g. both Iran and Israel). Markets carry ≤3 country tags.","default":"any","title":"Country Match"},"description":"How multiple `countries` combine: 'any' (default, OR — tagged with any selected country) or 'all' (AND — tagged with all of them, e.g. both Iran and Israel). Markets carry ≤3 country tags."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MarketOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/markets/{source}/{market_id}":{"get":{"tags":["markets"],"summary":"Get Market","description":"Use when an agent needs the full detail of a single market by its composite key (source + market_id). Returns the market with its parent event reference, current probability, volume, 24h delta, and historical chart points. Includes a `_meta.cite_as` field that the agent can drop directly into its reply.","operationId":"get_market","parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","description":"Platform ID: polymarket / kalshi / manifold / myriad / limitless / predict / opinion / gemini.","title":"Source"},"description":"Platform ID: polymarket / kalshi / manifold / myriad / limitless / predict / opinion / gemini."},{"name":"market_id","in":"path","required":true,"schema":{"type":"string","description":"Market ID native to the source. Composite key with `source`.","title":"Market Id"},"description":"Market ID native to the source. Composite key with `source`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/markets/top-movers":{"get":{"tags":["markets"],"summary":"Top Movers","description":"Use when the user wants to see markets with the largest 24h probability swings. Returns the top N movers (default 5, max 20) ranked by absolute `prob_24h_change`. Filterable by source. Excludes Limitless and price-derivative markets by curation. Useful for 'what changed today?' style queries.","operationId":"top_movers","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of results to return (1-20; default 5).","default":5,"title":"Limit"},"description":"Number of results to return (1-20; default 5)."},{"name":"spread_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Minimum bid-ask spread (0-1). Higher = less liquid.","title":"Spread Min"},"description":"Minimum bid-ask spread (0-1). Higher = less liquid."},{"name":"spread_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Maximum bid-ask spread (0-1). Lower = more liquid.","title":"Spread Max"},"description":"Maximum bid-ask spread (0-1). Lower = more liquid."},{"name":"probability_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Minimum probability (0-1). Filters to markets above this implied probability.","title":"Probability Min"},"description":"Minimum probability (0-1). Filters to markets above this implied probability."},{"name":"probability_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Maximum probability (0-1).","title":"Probability Max"},"description":"Maximum probability (0-1)."},{"name":"prob_24h_change_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"description":"Minimum 24h probability change (-1 to 1, signed). Use 0.15 for >=15pp positive moves.","title":"Prob 24H Change Min"},"description":"Minimum 24h probability change (-1 to 1, signed). Use 0.15 for >=15pp positive moves."},{"name":"prob_24h_change_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"description":"Maximum 24h probability change (-1 to 1, signed).","title":"Prob 24H Change Max"},"description":"Maximum 24h probability change (-1 to 1, signed)."},{"name":"volume_24h_change_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum 24h notional volume change (signed USD; e.g. 1000 means +$1k vs prior 24h).","title":"Volume 24H Change Min"},"description":"Minimum 24h notional volume change (signed USD; e.g. 1000 means +$1k vs prior 24h)."},{"name":"volume_24h_change_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum 24h notional volume change (signed USD).","title":"Volume 24H Change Max"},"description":"Maximum 24h notional volume change (signed USD)."},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source name(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini.","title":"Source"},"description":"Source name(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini."},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by `active` flag (true/false).","title":"Active"},"description":"Filter by `active` flag (true/false)."},{"name":"closed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by `closed` flag (true/false). Open markets are `closed=false`.","title":"Closed"},"description":"Filter by `closed` flag (true/false). Open markets are `closed=false`."},{"name":"volume_24hr_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum 24h notional volume (USD). Excludes low-activity markets.","title":"Volume 24Hr Min"},"description":"Minimum 24h notional volume (USD). Excludes low-activity markets."},{"name":"volume_24hr_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum 24h notional volume (USD).","title":"Volume 24Hr Max"},"description":"Maximum 24h notional volume (USD)."},{"name":"volume_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum cumulative volume (USD). Excludes low-activity markets across full history.","title":"Volume Min"},"description":"Minimum cumulative volume (USD). Excludes low-activity markets across full history."},{"name":"volume_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum cumulative volume (USD).","title":"Volume Max"},"description":"Maximum cumulative volume (USD)."},{"name":"rank_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Minimum rank score (numeric). Higher = more prominent.","title":"Rank Min"},"description":"Minimum rank score (numeric). Higher = more prominent."},{"name":"rank_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Maximum rank score (numeric).","title":"Rank Max"},"description":"Maximum rank score (numeric)."},{"name":"ends_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to events whose end_date >= this ISO 8601 datetime (e.g. `2026-06-01T00:00:00Z`).","title":"Ends After"},"description":"Filter to events whose end_date >= this ISO 8601 datetime (e.g. `2026-06-01T00:00:00Z`)."},{"name":"ends_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to events whose end_date <= this ISO 8601 datetime.","title":"Ends Before"},"description":"Filter to events whose end_date <= this ISO 8601 datetime."},{"name":"hide_ended","in":"query","required":false,"schema":{"type":"boolean","description":"If true, hide markets/events whose end_date is in the past (end_date <= now()); rows with no end_date are kept.","default":false,"title":"Hide Ended"},"description":"If true, hide markets/events whose end_date is in the past (end_date <= now()); rows with no end_date are kept."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to rows whose created_at >= this ISO 8601 datetime (first appearance in pdata's database).","title":"Created After"},"description":"Filter to rows whose created_at >= this ISO 8601 datetime (first appearance in pdata's database)."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to rows whose created_at <= this ISO 8601 datetime.","title":"Created Before"},"description":"Filter to rows whose created_at <= this ISO 8601 datetime."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated status list; any of {open, closing-soon, resolved}","title":"Status"},"description":"Comma-separated status list; any of {open, closing-soon, resolved}"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Full-text search across title, description, slug. Case-insensitive substring match.","title":"Search"},"description":"Full-text search across title, description, slug. Case-insensitive substring match."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field name; prefix '-' for descending order (e.g. `-volume_24hr`). Common allowed values: `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, `closed_time`, `updated_at`. Markets endpoints additionally accept `probability`, `prob_24h_change`, `spread`. Invalid values return 400.","title":"Sort"},"description":"Field name; prefix '-' for descending order (e.g. `-volume_24hr`). Common allowed values: `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, `closed_time`, `updated_at`. Markets endpoints additionally accept `probability`, `prob_24h_change`, `spread`. Invalid values return 400."},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category labels to include (OR)","title":"Categories"},"description":"Comma-separated category labels to include (OR)"},{"name":"categories_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category labels to exclude","title":"Categories Exclude"},"description":"Comma-separated category labels to exclude"},{"name":"hide_price_derivatives","in":"query","required":false,"schema":{"type":"boolean","description":"If true, exclude events with is_price_derivative=TRUE","default":false,"title":"Hide Price Derivatives"},"description":"If true, exclude events with is_price_derivative=TRUE"},{"name":"include_uncategorized","in":"query","required":false,"schema":{"type":"boolean","description":"If true, the include clause also matches rows whose categories array is empty/NULL or contains only labels outside the canonical set (synthetic 'Other' bucket).","default":false,"title":"Include Uncategorized"},"description":"If true, the include clause also matches rows whose categories array is empty/NULL or contains only labels outside the canonical set (synthetic 'Other' bucket)."},{"name":"countries","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated country names to include (OR). Full English names per the AI categorizer's prompt — e.g. 'United States', 'United Kingdom', 'European Union'. No allow-list — misspelled values silently yield zero matches.","title":"Countries"},"description":"Comma-separated country names to include (OR). Full English names per the AI categorizer's prompt — e.g. 'United States', 'United Kingdom', 'European Union'. No allow-list — misspelled values silently yield zero matches."},{"name":"countries_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated country names to exclude.","title":"Countries Exclude"},"description":"Comma-separated country names to exclude."},{"name":"include_uncountried","in":"query","required":false,"schema":{"type":"boolean","description":"If true, the include clause also matches rows whose countries array is empty/NULL — country-agnostic markets (synthetic 'No country' bucket).","default":false,"title":"Include Uncountried"},"description":"If true, the include clause also matches rows whose countries array is empty/NULL — country-agnostic markets (synthetic 'No country' bucket)."},{"name":"country_match","in":"query","required":false,"schema":{"type":"string","pattern":"^(any|all)$","description":"How multiple `countries` combine: 'any' (default, OR — tagged with any selected country) or 'all' (AND — tagged with all of them, e.g. both Iran and Israel). Markets carry ≤3 country tags.","default":"any","title":"Country Match"},"description":"How multiple `countries` combine: 'any' (default, OR — tagged with any selected country) or 'all' (AND — tagged with all of them, e.g. both Iran and Israel). Markets carry ≤3 country tags."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MarketOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/markets/closing-soon":{"get":{"tags":["markets"],"summary":"Closing Soon","description":"Use when the user wants to see markets that will resolve within the next 36 hours. Returns markets sorted by close timestamp ascending. Filterable by `source=` and `categories=` (CSV). Excludes Limitless and price-derivative markets.","operationId":"closing_soon","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of results to return (1-20; default 5).","default":5,"title":"Limit"},"description":"Number of results to return (1-20; default 5)."},{"name":"spread_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Minimum bid-ask spread (0-1). Higher = less liquid.","title":"Spread Min"},"description":"Minimum bid-ask spread (0-1). Higher = less liquid."},{"name":"spread_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Maximum bid-ask spread (0-1). Lower = more liquid.","title":"Spread Max"},"description":"Maximum bid-ask spread (0-1). Lower = more liquid."},{"name":"probability_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Minimum probability (0-1). Filters to markets above this implied probability.","title":"Probability Min"},"description":"Minimum probability (0-1). Filters to markets above this implied probability."},{"name":"probability_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Maximum probability (0-1).","title":"Probability Max"},"description":"Maximum probability (0-1)."},{"name":"prob_24h_change_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"description":"Minimum 24h probability change (-1 to 1, signed). Use 0.15 for >=15pp positive moves.","title":"Prob 24H Change Min"},"description":"Minimum 24h probability change (-1 to 1, signed). Use 0.15 for >=15pp positive moves."},{"name":"prob_24h_change_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"description":"Maximum 24h probability change (-1 to 1, signed).","title":"Prob 24H Change Max"},"description":"Maximum 24h probability change (-1 to 1, signed)."},{"name":"volume_24h_change_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum 24h notional volume change (signed USD; e.g. 1000 means +$1k vs prior 24h).","title":"Volume 24H Change Min"},"description":"Minimum 24h notional volume change (signed USD; e.g. 1000 means +$1k vs prior 24h)."},{"name":"volume_24h_change_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum 24h notional volume change (signed USD).","title":"Volume 24H Change Max"},"description":"Maximum 24h notional volume change (signed USD)."},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source name(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini.","title":"Source"},"description":"Source name(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini."},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by `active` flag (true/false).","title":"Active"},"description":"Filter by `active` flag (true/false)."},{"name":"closed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by `closed` flag (true/false). Open markets are `closed=false`.","title":"Closed"},"description":"Filter by `closed` flag (true/false). Open markets are `closed=false`."},{"name":"volume_24hr_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum 24h notional volume (USD). Excludes low-activity markets.","title":"Volume 24Hr Min"},"description":"Minimum 24h notional volume (USD). Excludes low-activity markets."},{"name":"volume_24hr_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum 24h notional volume (USD).","title":"Volume 24Hr Max"},"description":"Maximum 24h notional volume (USD)."},{"name":"volume_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum cumulative volume (USD). Excludes low-activity markets across full history.","title":"Volume Min"},"description":"Minimum cumulative volume (USD). Excludes low-activity markets across full history."},{"name":"volume_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum cumulative volume (USD).","title":"Volume Max"},"description":"Maximum cumulative volume (USD)."},{"name":"rank_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Minimum rank score (numeric). Higher = more prominent.","title":"Rank Min"},"description":"Minimum rank score (numeric). Higher = more prominent."},{"name":"rank_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Maximum rank score (numeric).","title":"Rank Max"},"description":"Maximum rank score (numeric)."},{"name":"ends_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to events whose end_date >= this ISO 8601 datetime (e.g. `2026-06-01T00:00:00Z`).","title":"Ends After"},"description":"Filter to events whose end_date >= this ISO 8601 datetime (e.g. `2026-06-01T00:00:00Z`)."},{"name":"ends_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to events whose end_date <= this ISO 8601 datetime.","title":"Ends Before"},"description":"Filter to events whose end_date <= this ISO 8601 datetime."},{"name":"hide_ended","in":"query","required":false,"schema":{"type":"boolean","description":"If true, hide markets/events whose end_date is in the past (end_date <= now()); rows with no end_date are kept.","default":false,"title":"Hide Ended"},"description":"If true, hide markets/events whose end_date is in the past (end_date <= now()); rows with no end_date are kept."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to rows whose created_at >= this ISO 8601 datetime (first appearance in pdata's database).","title":"Created After"},"description":"Filter to rows whose created_at >= this ISO 8601 datetime (first appearance in pdata's database)."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to rows whose created_at <= this ISO 8601 datetime.","title":"Created Before"},"description":"Filter to rows whose created_at <= this ISO 8601 datetime."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated status list; any of {open, closing-soon, resolved}","title":"Status"},"description":"Comma-separated status list; any of {open, closing-soon, resolved}"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Full-text search across title, description, slug. Case-insensitive substring match.","title":"Search"},"description":"Full-text search across title, description, slug. Case-insensitive substring match."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field name; prefix '-' for descending order (e.g. `-volume_24hr`). Common allowed values: `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, `closed_time`, `updated_at`. Markets endpoints additionally accept `probability`, `prob_24h_change`, `spread`. Invalid values return 400.","title":"Sort"},"description":"Field name; prefix '-' for descending order (e.g. `-volume_24hr`). Common allowed values: `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, `closed_time`, `updated_at`. Markets endpoints additionally accept `probability`, `prob_24h_change`, `spread`. Invalid values return 400."},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category labels to include (OR)","title":"Categories"},"description":"Comma-separated category labels to include (OR)"},{"name":"categories_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category labels to exclude","title":"Categories Exclude"},"description":"Comma-separated category labels to exclude"},{"name":"hide_price_derivatives","in":"query","required":false,"schema":{"type":"boolean","description":"If true, exclude events with is_price_derivative=TRUE","default":false,"title":"Hide Price Derivatives"},"description":"If true, exclude events with is_price_derivative=TRUE"},{"name":"include_uncategorized","in":"query","required":false,"schema":{"type":"boolean","description":"If true, the include clause also matches rows whose categories array is empty/NULL or contains only labels outside the canonical set (synthetic 'Other' bucket).","default":false,"title":"Include Uncategorized"},"description":"If true, the include clause also matches rows whose categories array is empty/NULL or contains only labels outside the canonical set (synthetic 'Other' bucket)."},{"name":"countries","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated country names to include (OR). Full English names per the AI categorizer's prompt — e.g. 'United States', 'United Kingdom', 'European Union'. No allow-list — misspelled values silently yield zero matches.","title":"Countries"},"description":"Comma-separated country names to include (OR). Full English names per the AI categorizer's prompt — e.g. 'United States', 'United Kingdom', 'European Union'. No allow-list — misspelled values silently yield zero matches."},{"name":"countries_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated country names to exclude.","title":"Countries Exclude"},"description":"Comma-separated country names to exclude."},{"name":"include_uncountried","in":"query","required":false,"schema":{"type":"boolean","description":"If true, the include clause also matches rows whose countries array is empty/NULL — country-agnostic markets (synthetic 'No country' bucket).","default":false,"title":"Include Uncountried"},"description":"If true, the include clause also matches rows whose countries array is empty/NULL — country-agnostic markets (synthetic 'No country' bucket)."},{"name":"country_match","in":"query","required":false,"schema":{"type":"string","pattern":"^(any|all)$","description":"How multiple `countries` combine: 'any' (default, OR — tagged with any selected country) or 'all' (AND — tagged with all of them, e.g. both Iran and Israel). Markets carry ≤3 country tags.","default":"any","title":"Country Match"},"description":"How multiple `countries` combine: 'any' (default, OR — tagged with any selected country) or 'all' (AND — tagged with all of them, e.g. both Iran and Israel). Markets carry ≤3 country tags."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MarketOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/search/suggest":{"get":{"tags":["search"],"summary":"Suggest","description":"Mixed events+markets typeahead.\n\nReturns ≤ `limit` results coalesced as described in the module\ndocstring. Empty results for q < 2 chars (frontend gates on the\nsame threshold; this is a defence-in-depth check).","operationId":"suggest_api_v1_search_suggest_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSuggestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/summary":{"get":{"tags":["summary"],"summary":"Get Summary","description":"Per-source homepage stats. O(rows) — one SELECT, five rows.","operationId":"get_summary_api_v1_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummaryOut"}}}}}}},"/api/v1/summary/chart":{"get":{"tags":["summary"],"summary":"Get Summary Chart","description":"Per-source × time-bucket series for the homepage \"24h pulse\" chart.\n\nReads pre-materialized 30-min rows from `chart_buckets` (written by\n`app/pipeline/chart_bucket.py` at the tail of each source's cycle),\nforward-fills missing buckets, then downsamples at read time for\nthe 7d/30d windows.\n\nAlways returns one entry per source present in `chart_buckets`\nwithin the window. Sources with zero rows in the window are\nomitted (not zero-filled) — matches the prior behavior where a\nsource with no event_snapshots produced no `series` row.","operationId":"get_summary_chart_api_v1_summary_chart_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"enum":["24h","7d","30d"],"type":"string","default":"24h","title":"Window"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/countries":{"get":{"tags":["countries"],"summary":"List Countries","description":"Use when an agent needs the list of country tags that markets have been tagged with. Returns the canonical country vocabulary with per-country market counts. Accepts the same filter params as `list_markets` (source, category, status, volume/probability ranges, search, …): the counts then reflect that filtered population, so this doubles as a facet endpoint. The country dimension itself is ignored when computing counts, so passing `country=` does not collapse the menu. Useful as the menu source for the `country=` filter on `list_events` / `list_markets` / `top_movers`.","operationId":"list_countries","parameters":[{"name":"spread_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Minimum bid-ask spread (0-1). Higher = less liquid.","title":"Spread Min"},"description":"Minimum bid-ask spread (0-1). Higher = less liquid."},{"name":"spread_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Maximum bid-ask spread (0-1). Lower = more liquid.","title":"Spread Max"},"description":"Maximum bid-ask spread (0-1). Lower = more liquid."},{"name":"probability_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Minimum probability (0-1). Filters to markets above this implied probability.","title":"Probability Min"},"description":"Minimum probability (0-1). Filters to markets above this implied probability."},{"name":"probability_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Maximum probability (0-1).","title":"Probability Max"},"description":"Maximum probability (0-1)."},{"name":"prob_24h_change_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"description":"Minimum 24h probability change (-1 to 1, signed). Use 0.15 for >=15pp positive moves.","title":"Prob 24H Change Min"},"description":"Minimum 24h probability change (-1 to 1, signed). Use 0.15 for >=15pp positive moves."},{"name":"prob_24h_change_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"description":"Maximum 24h probability change (-1 to 1, signed).","title":"Prob 24H Change Max"},"description":"Maximum 24h probability change (-1 to 1, signed)."},{"name":"volume_24h_change_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum 24h notional volume change (signed USD; e.g. 1000 means +$1k vs prior 24h).","title":"Volume 24H Change Min"},"description":"Minimum 24h notional volume change (signed USD; e.g. 1000 means +$1k vs prior 24h)."},{"name":"volume_24h_change_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum 24h notional volume change (signed USD).","title":"Volume 24H Change Max"},"description":"Maximum 24h notional volume change (signed USD)."},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source name(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini.","title":"Source"},"description":"Source name(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini."},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by `active` flag (true/false).","title":"Active"},"description":"Filter by `active` flag (true/false)."},{"name":"closed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by `closed` flag (true/false). Open markets are `closed=false`.","title":"Closed"},"description":"Filter by `closed` flag (true/false). Open markets are `closed=false`."},{"name":"volume_24hr_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum 24h notional volume (USD). Excludes low-activity markets.","title":"Volume 24Hr Min"},"description":"Minimum 24h notional volume (USD). Excludes low-activity markets."},{"name":"volume_24hr_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum 24h notional volume (USD).","title":"Volume 24Hr Max"},"description":"Maximum 24h notional volume (USD)."},{"name":"volume_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum cumulative volume (USD). Excludes low-activity markets across full history.","title":"Volume Min"},"description":"Minimum cumulative volume (USD). Excludes low-activity markets across full history."},{"name":"volume_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum cumulative volume (USD).","title":"Volume Max"},"description":"Maximum cumulative volume (USD)."},{"name":"rank_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Minimum rank score (numeric). Higher = more prominent.","title":"Rank Min"},"description":"Minimum rank score (numeric). Higher = more prominent."},{"name":"rank_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":100,"minimum":0},{"type":"null"}],"description":"Maximum rank score (numeric).","title":"Rank Max"},"description":"Maximum rank score (numeric)."},{"name":"ends_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to events whose end_date >= this ISO 8601 datetime (e.g. `2026-06-01T00:00:00Z`).","title":"Ends After"},"description":"Filter to events whose end_date >= this ISO 8601 datetime (e.g. `2026-06-01T00:00:00Z`)."},{"name":"ends_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to events whose end_date <= this ISO 8601 datetime.","title":"Ends Before"},"description":"Filter to events whose end_date <= this ISO 8601 datetime."},{"name":"hide_ended","in":"query","required":false,"schema":{"type":"boolean","description":"If true, hide markets/events whose end_date is in the past (end_date <= now()); rows with no end_date are kept.","default":false,"title":"Hide Ended"},"description":"If true, hide markets/events whose end_date is in the past (end_date <= now()); rows with no end_date are kept."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to rows whose created_at >= this ISO 8601 datetime (first appearance in pdata's database).","title":"Created After"},"description":"Filter to rows whose created_at >= this ISO 8601 datetime (first appearance in pdata's database)."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter to rows whose created_at <= this ISO 8601 datetime.","title":"Created Before"},"description":"Filter to rows whose created_at <= this ISO 8601 datetime."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated status list; any of {open, closing-soon, resolved}","title":"Status"},"description":"Comma-separated status list; any of {open, closing-soon, resolved}"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Full-text search across title, description, slug. Case-insensitive substring match.","title":"Search"},"description":"Full-text search across title, description, slug. Case-insensitive substring match."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field name; prefix '-' for descending order (e.g. `-volume_24hr`). Common allowed values: `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, `closed_time`, `updated_at`. Markets endpoints additionally accept `probability`, `prob_24h_change`, `spread`. Invalid values return 400.","title":"Sort"},"description":"Field name; prefix '-' for descending order (e.g. `-volume_24hr`). Common allowed values: `volume_24hr`, `normalized_vol_24hr`, `liquidity`, `end_date`, `closed_time`, `updated_at`. Markets endpoints additionally accept `probability`, `prob_24h_change`, `spread`. Invalid values return 400."},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category labels to include (OR)","title":"Categories"},"description":"Comma-separated category labels to include (OR)"},{"name":"categories_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category labels to exclude","title":"Categories Exclude"},"description":"Comma-separated category labels to exclude"},{"name":"hide_price_derivatives","in":"query","required":false,"schema":{"type":"boolean","description":"If true, exclude events with is_price_derivative=TRUE","default":false,"title":"Hide Price Derivatives"},"description":"If true, exclude events with is_price_derivative=TRUE"},{"name":"include_uncategorized","in":"query","required":false,"schema":{"type":"boolean","description":"If true, the include clause also matches rows whose categories array is empty/NULL or contains only labels outside the canonical set (synthetic 'Other' bucket).","default":false,"title":"Include Uncategorized"},"description":"If true, the include clause also matches rows whose categories array is empty/NULL or contains only labels outside the canonical set (synthetic 'Other' bucket)."},{"name":"countries","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated country names to include (OR). Full English names per the AI categorizer's prompt — e.g. 'United States', 'United Kingdom', 'European Union'. No allow-list — misspelled values silently yield zero matches.","title":"Countries"},"description":"Comma-separated country names to include (OR). Full English names per the AI categorizer's prompt — e.g. 'United States', 'United Kingdom', 'European Union'. No allow-list — misspelled values silently yield zero matches."},{"name":"countries_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated country names to exclude.","title":"Countries Exclude"},"description":"Comma-separated country names to exclude."},{"name":"include_uncountried","in":"query","required":false,"schema":{"type":"boolean","description":"If true, the include clause also matches rows whose countries array is empty/NULL — country-agnostic markets (synthetic 'No country' bucket).","default":false,"title":"Include Uncountried"},"description":"If true, the include clause also matches rows whose countries array is empty/NULL — country-agnostic markets (synthetic 'No country' bucket)."},{"name":"country_match","in":"query","required":false,"schema":{"type":"string","pattern":"^(any|all)$","description":"How multiple `countries` combine: 'any' (default, OR — tagged with any selected country) or 'all' (AND — tagged with all of them, e.g. both Iran and Israel). Markets carry ≤3 country tags.","default":"any","title":"Country Match"},"description":"How multiple `countries` combine: 'any' (default, OR — tagged with any selected country) or 'all' (AND — tagged with all of them, e.g. both Iran and Israel). Markets carry ≤3 country tags."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountriesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/news/movers":{"get":{"tags":["news"],"summary":"List Movers","description":"Use when the user wants to see the news-feed view: markets that exhibited a probability spike in the chosen lookback window, scored by `|Δprob_pp| × log10(1+USD-equivalent volume)`. Refreshed every 5 min. The `window=` param selects the lookback: 24 (default, ≥15pp), 12 (≥12pp), or 2 (≥2h, ≥10pp); `prob_change` is measured over that window. Includes a `prob_history` array (24h bucketed trajectory) per row regardless of window. Filterable by `source=` and `categories=` (CSV). Soft flags (`is_entertainment`/`is_microprediction`/`is_crypto`/`is_sports`/`is_weather`) default OFF; opt in with `include_*=true`.","operationId":"list_news_movers","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Platform ID(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini.","title":"Source"},"description":"Platform ID(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini."},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Category filter (CSV). Examples: 'Politics', 'Sports', 'Crypto', 'Weather'. Maps to events.categories assignments.","title":"Categories"},"description":"Category filter (CSV). Examples: 'Politics', 'Sports', 'Crypto', 'Weather'. Maps to events.categories assignments."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full-text search across market title and event title. Case-insensitive substring match.","title":"Q"},"description":"Full-text search across market title and event title. Case-insensitive substring match."},{"name":"min_score","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum spike score. Higher = more notable spikes only.","title":"Min Score"},"description":"Minimum spike score. Higher = more notable spikes only."},{"name":"include_entertainment","in":"query","required":false,"schema":{"type":"boolean","description":"Include entertainment markets (default: excluded for signal-to-noise).","default":false,"title":"Include Entertainment"},"description":"Include entertainment markets (default: excluded for signal-to-noise)."},{"name":"include_microprediction","in":"query","required":false,"schema":{"type":"boolean","description":"Include microprediction / hyperlocal markets (default: excluded).","default":false,"title":"Include Microprediction"},"description":"Include microprediction / hyperlocal markets (default: excluded)."},{"name":"include_crypto","in":"query","required":false,"schema":{"type":"boolean","description":"Include crypto price-derivative markets (default: excluded).","default":false,"title":"Include Crypto"},"description":"Include crypto price-derivative markets (default: excluded)."},{"name":"include_sports","in":"query","required":false,"schema":{"type":"boolean","description":"Include sports markets (default: excluded).","default":false,"title":"Include Sports"},"description":"Include sports markets (default: excluded)."},{"name":"include_weather","in":"query","required":false,"schema":{"type":"boolean","description":"Include weather markets (default: excluded).","default":false,"title":"Include Weather"},"description":"Include weather markets (default: excluded)."},{"name":"include_resolved","in":"query","required":false,"schema":{"type":"boolean","description":"Include resolved (closed) markets (default: excluded — news movers focus on live markets).","default":false,"title":"Include Resolved"},"description":"Include resolved (closed) markets (default: excluded — news movers focus on live markets)."},{"name":"ordering","in":"query","required":false,"schema":{"type":"string","description":"Sort order. Allowed values: `vol` (volume-weighted score; default), `score` (raw spike score), `prob` (probability change magnitude).","default":"vol","title":"Ordering"},"description":"Sort order. Allowed values: `vol` (volume-weighted score; default), `score` (raw spike score), `prob` (probability change magnitude)."},{"name":"window","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SpikeWindow","description":"Spike lookback window in hours: 24 (default), 12, or 2. Markets are included if they spiked within this window, and `prob_change`/`score` are computed over it. Shorter windows use a lower pp threshold (2h≥10pp, 12h≥12pp, 24h≥15pp) and naturally surface fewer markets.","default":24},"description":"Spike lookback window in hours: 24 (default), 12, or 2. Markets are included if they spiked within this window, and `prob_change`/`score` are computed over it. Shorter windows use a lower pp threshold (2h≥10pp, 12h≥12pp, 24h≥15pp) and naturally surface fewer markets."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed).","default":1,"title":"Page"},"description":"Page number (1-indexed)."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200; default 50).","default":50,"title":"Page Size"},"description":"Items per page (1-200; default 50)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsMoversResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/news/movers/by-category":{"get":{"tags":["news"],"summary":"List Movers By Category","description":"Use when the user wants the news feed bucketed by category. Returns the same data shape as `list_news_movers` but pre-grouped into the canonical 14-category vocabulary, with cluster grouping inside each bucket. Useful for 'what's moving in politics?' style queries.","operationId":"news_movers_by_category","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Platform ID(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini.","title":"Source"},"description":"Platform ID(s); single value or comma-separated list. Allowed: polymarket, kalshi, manifold, myriad, limitless, predict, opinion, gemini."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full-text search across market title and event title. Case-insensitive substring match.","title":"Q"},"description":"Full-text search across market title and event title. Case-insensitive substring match."},{"name":"min_score","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum spike score. Higher = more notable spikes only.","title":"Min Score"},"description":"Minimum spike score. Higher = more notable spikes only."},{"name":"include_entertainment","in":"query","required":false,"schema":{"type":"boolean","description":"Include entertainment markets (default: excluded for signal-to-noise).","default":false,"title":"Include Entertainment"},"description":"Include entertainment markets (default: excluded for signal-to-noise)."},{"name":"include_microprediction","in":"query","required":false,"schema":{"type":"boolean","description":"Include microprediction / hyperlocal markets (default: excluded).","default":false,"title":"Include Microprediction"},"description":"Include microprediction / hyperlocal markets (default: excluded)."},{"name":"include_crypto","in":"query","required":false,"schema":{"type":"boolean","description":"Include crypto price-derivative markets (default: excluded).","default":false,"title":"Include Crypto"},"description":"Include crypto price-derivative markets (default: excluded)."},{"name":"include_sports","in":"query","required":false,"schema":{"type":"boolean","description":"Include sports markets (default: excluded).","default":false,"title":"Include Sports"},"description":"Include sports markets (default: excluded)."},{"name":"include_weather","in":"query","required":false,"schema":{"type":"boolean","description":"Include weather markets (default: excluded).","default":false,"title":"Include Weather"},"description":"Include weather markets (default: excluded)."},{"name":"include_resolved","in":"query","required":false,"schema":{"type":"boolean","description":"Include resolved (closed) markets (default: excluded — news movers focus on live markets).","default":false,"title":"Include Resolved"},"description":"Include resolved (closed) markets (default: excluded — news movers focus on live markets)."},{"name":"per_category","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max items per category bucket (1-50; default 11).","default":11,"title":"Per Category"},"description":"Max items per category bucket (1-50; default 11)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsByCategoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sitemap/events":{"get":{"tags":["sitemap"],"summary":"List events for sitemap generation","description":"Open + above-threshold + top-level events, sorted by recency.\n\nFilter: `NOT closed AND volume_24hr >= $1 AND\nparent_event_id IS NULL`. The frontend handler caches at\n`revalidate=3600`, so this endpoint runs at most once per hour\nper worker — no CDN caching needed here.","operationId":"sitemap_events_api_v1_sitemap_events_get","parameters":[{"name":"min_volume_24h","in":"query","required":false,"schema":{"type":"number","minimum":0,"description":"Minimum 24h notional volume to be included.","default":1000.0,"title":"Min Volume 24H"},"description":"Minimum 24h notional volume to be included."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"minimum":1,"default":10000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SitemapEventOut"},"title":"Response Sitemap Events Api V1 Sitemap Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp-info":{"get":{"tags":["discovery"],"summary":"Mcp Info","description":"Plain-JSON descriptor of the MCP server mounted at /mcp. For agents probing over HTTP that haven't established an MCP session yet — returns the MCP URL, tool list, and pointers to the agent guide and OpenAPI spec. The MCP endpoint itself responds only to MCP-protocol POST requests; use this route for plain-HTTP discovery.","operationId":"mcp_info","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mcp Info"}}}}}}}},"components":{"schemas":{"ChartOut":{"properties":{"window":{"type":"string","title":"Window"},"buckets":{"items":{"type":"string","format":"date-time"},"type":"array","title":"Buckets"},"series":{"items":{"$ref":"#/components/schemas/ChartSeries"},"type":"array","title":"Series"},"total":{"items":{"type":"number"},"type":"array","title":"Total"},"_meta":{"anyOf":[{"$ref":"#/components/schemas/ResponseMetaList"},{"type":"null"}]}},"type":"object","required":["window","buckets","series","total"],"title":"ChartOut"},"ChartSeries":{"properties":{"source":{"type":"string","title":"Source"},"values":{"items":{"type":"number"},"type":"array","title":"Values"}},"type":"object","required":["source","values"],"title":"ChartSeries"},"CountriesOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CountryCount"},"type":"array","title":"Items"},"_meta":{"anyOf":[{"$ref":"#/components/schemas/ResponseMetaList"},{"type":"null"}]}},"type":"object","required":["items"],"title":"CountriesOut","description":"Envelope for /api/v1/countries. Added in Spec 3 D1 to carry `_meta`.\n\nPre-Spec-3 the endpoint returned a bare `list[CountryCount]`; agents\nthat mandate \"every API response carries `_meta`\" need an envelope.\nThe frontend unwraps `.items` in `lib/api/countries.ts` so existing\ncomponent code continues to receive an array."},"CountryCount":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"CountryCount","description":"Single country + how many AI-evaluated markets are tagged with it."},"EventDetailOut":{"properties":{"source":{"type":"string","title":"Source"},"id":{"type":"string","title":"Id"},"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"active":{"type":"boolean","title":"Active"},"closed":{"type":"boolean","title":"Closed"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"closed_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed Time"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"volume_24hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24Hr"},"volume_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24H Change"},"normalized_vol_24hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normalized Vol 24Hr"},"normalized_volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normalized Volume"},"liquidity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Liquidity"},"open_interest":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Open Interest"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"tags":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array","title":"Tags","default":[]},"synthetic":{"type":"boolean","title":"Synthetic","default":false},"is_group":{"type":"boolean","title":"Is Group","default":false},"group_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Key"},"parent_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Event Id"},"probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Probability"},"spread":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spread"},"top_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Outcome"},"top_outcome_probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Outcome Probability"},"top_outcome_prob_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Outcome Prob 24H Change"},"top_outcome_volume_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Outcome Volume 24H Change"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"},"added_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Added At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"chart_24h":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Chart 24H"},"markets":{"items":{"$ref":"#/components/schemas/MarketOut"},"type":"array","title":"Markets","default":[]},"_meta":{"anyOf":[{"$ref":"#/components/schemas/ResponseMetaResource"},{"type":"null"}]}},"type":"object","required":["source","id","active","closed","updated_at","fetched_at"],"title":"EventDetailOut","description":"Event detail page: extends EventOut with nested child markets.\n\nFor leaf events (real, orphan-synth, or unrelated): `markets` is\nthe list of child markets sorted by probability DESC.\n\nFor group events (`is_group = TRUE`): `markets` is the FLATTENED\nlist of markets across every child event of the group, ordered by\neach child event's rank then the activity-bucket / probability\nsort. The grouping shape is reconstructed client-side via the\n`event_id` on each market row — see routers/events.py::get_event."},"EventOut":{"properties":{"source":{"type":"string","title":"Source"},"id":{"type":"string","title":"Id"},"ticker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"active":{"type":"boolean","title":"Active"},"closed":{"type":"boolean","title":"Closed"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"closed_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed Time"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"volume_24hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24Hr"},"volume_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24H Change"},"normalized_vol_24hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normalized Vol 24Hr"},"normalized_volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normalized Volume"},"liquidity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Liquidity"},"open_interest":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Open Interest"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"tags":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array","title":"Tags","default":[]},"synthetic":{"type":"boolean","title":"Synthetic","default":false},"is_group":{"type":"boolean","title":"Is Group","default":false},"group_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Key"},"parent_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Event Id"},"probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Probability"},"spread":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spread"},"top_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Outcome"},"top_outcome_probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Outcome Probability"},"top_outcome_prob_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Outcome Prob 24H Change"},"top_outcome_volume_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Outcome Volume 24H Change"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"},"added_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Added At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"chart_24h":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Chart 24H"}},"type":"object","required":["source","id","active","closed","updated_at","fetched_at"],"title":"EventOut","description":"Event as returned in list endpoints."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InFocusEvent":{"properties":{"source":{"type":"string","title":"Source"},"id":{"type":"string","title":"Id"},"event_id":{"type":"string","title":"Event Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"title":{"type":"string","title":"Title"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"group_item_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Item Title"},"event_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"primary_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Category"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"volume_24hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24Hr"},"top_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Outcome"},"top_outcome_probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Outcome Probability"},"top_outcome_prob_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Outcome Prob 24H Change"},"top_outcome_volume_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Outcome Volume 24H Change"},"prob_chart_24h":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Prob Chart 24H"},"vol_chart_24h":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Vol Chart 24H"}},"type":"object","required":["source","id","event_id","slug","title","question","group_item_title","event_title","url","primary_category","countries","volume_24hr","top_outcome","top_outcome_probability","top_outcome_prob_24h_change","top_outcome_volume_24h_change","prob_chart_24h","vol_chart_24h"],"title":"InFocusEvent","description":"One cell in the in-focus grid — a single market with parent-event\ncontext. `id` is the MARKET id (frontend uses it as a React key);\n`event_id` is its parent event for URL building.\n\n`question`, `group_item_title`, `event_title` are surfaced raw so\nthe frontend's `displayTitle()` util can pick the right composition\nper source convention (Polymarket question is self-contained;\nGemini multi-outcome needs `event_title — question`; Kalshi\nthreshold markets need `question — group_item_title`; etc.).\n`title` is kept for back-compat consumers but is just a fallback —\nnew code should use the three component fields with `displayTitle`."},"InFocusOut":{"properties":{"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"groups":{"additionalProperties":{"items":{"items":{"$ref":"#/components/schemas/InFocusEvent"},"type":"array"},"type":"array"},"type":"object","title":"Groups"},"_meta":{"anyOf":[{"$ref":"#/components/schemas/ResponseMetaList"},{"type":"null"}]}},"type":"object","required":["categories","groups"],"title":"InFocusOut","description":"Grid of curated markets for the homepage 'in focus' strip.\n\n`categories` lists the 5 categories in priority order. `groups` is\nkeyed by source group; each value is a list of length 5 aligned to\n`categories`. `groups[g][i]` is now a LIST of up to ~10 candidate\nmarkets for category `categories[i]` in group `g`, in score-DESC\norder. The frontend's strip-level refresh button rotates through\nthese candidates with a within-strip event-uniqueness constraint.\nEmpty list means no qualifying market for that cell — the cell\nrenders as a placeholder."},"MarketDetailOut":{"properties":{"source":{"type":"string","title":"Source"},"id":{"type":"string","title":"Id"},"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"group_item_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Item Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"outcomes":{"items":{"type":"string"},"type":"array","title":"Outcomes","default":[]},"outcome_prices":{"items":{"type":"number"},"type":"array","title":"Outcome Prices","default":[]},"probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Probability"},"spread":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spread"},"active":{"type":"boolean","title":"Active"},"closed":{"type":"boolean","title":"Closed"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"closed_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed Time"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"volume_24hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24Hr"},"prob_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prob 24H Change"},"volume_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24H Change"},"normalized_vol_24hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normalized Vol 24Hr"},"normalized_volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normalized Volume"},"liquidity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Liquidity"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"},"added_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Added At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"event_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Title"},"chart_24h":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Chart 24H"},"_meta":{"anyOf":[{"$ref":"#/components/schemas/ResponseMetaResource"},{"type":"null"}]}},"type":"object","required":["source","id","active","closed","updated_at","fetched_at"],"title":"MarketDetailOut","description":"Single-market response: extends MarketOut with `_meta` (agent\nmetadata + cite_as).\n\nKept as a separate wrapper rather than putting `_meta` on MarketOut\nitself so list responses (Page[MarketOut]) don't carry `_meta` on\nevery item — that would inflate response size O(N) for no agent\nbenefit. The list envelope already carries `_meta` once. Parallels\nEventDetailOut(EventOut)."},"MarketOut":{"properties":{"source":{"type":"string","title":"Source"},"id":{"type":"string","title":"Id"},"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"group_item_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Item Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"outcomes":{"items":{"type":"string"},"type":"array","title":"Outcomes","default":[]},"outcome_prices":{"items":{"type":"number"},"type":"array","title":"Outcome Prices","default":[]},"probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Probability"},"spread":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spread"},"active":{"type":"boolean","title":"Active"},"closed":{"type":"boolean","title":"Closed"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"closed_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed Time"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"volume_24hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24Hr"},"prob_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prob 24H Change"},"volume_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24H Change"},"normalized_vol_24hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normalized Vol 24Hr"},"normalized_volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normalized Volume"},"liquidity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Liquidity"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"},"added_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Added At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"event_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Title"},"chart_24h":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Chart 24H"}},"type":"object","required":["source","id","active","closed","updated_at","fetched_at"],"title":"MarketOut","description":"Market as returned in list and detail endpoints."},"NewsByCategoryResponse":{"properties":{"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At"},"by_category":{"additionalProperties":{"items":{"oneOf":[{"$ref":"#/components/schemas/NewsCluster"},{"$ref":"#/components/schemas/NewsEventOut"}],"discriminator":{"propertyName":"kind","mapping":{"cluster":"#/components/schemas/NewsCluster","event":"#/components/schemas/NewsEventOut"}}},"type":"array"},"type":"object","title":"By Category"},"_meta":{"anyOf":[{"$ref":"#/components/schemas/ResponseMetaList"},{"type":"null"}]}},"type":"object","required":["last_refreshed_at","by_category"],"title":"NewsByCategoryResponse","description":"Response for GET /api/v1/news/movers/by-category.\n\nThe same event/cluster can appear in multiple buckets when its\ncategories list contains more than one entry. Bucket keys match\nv2's `KNOWN_CATEGORIES`; bucket values are sorted by score desc\nand capped at the per-category limit (`?per_category=`, default 11)."},"NewsCluster":{"properties":{"kind":{"type":"string","const":"cluster","title":"Kind","default":"cluster"},"cluster_key":{"type":"string","title":"Cluster Key"},"cluster_label":{"type":"string","title":"Cluster Label"},"cluster_slug":{"type":"string","title":"Cluster Slug"},"source":{"type":"string","title":"Source"},"src":{"type":"string","enum":["pm","ka","ma","li","op","pr","my","gm"],"title":"Src"},"total_vol_24hr":{"type":"number","title":"Total Vol 24Hr"},"score":{"type":"number","title":"Score"},"events":{"items":{"$ref":"#/components/schemas/NewsEventOut"},"type":"array","title":"Events"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"}},"type":"object","required":["cluster_key","cluster_label","cluster_slug","source","src","total_vol_24hr","score","events"],"title":"NewsCluster","description":"A cluster of news events that share a specific topical tag.\n\nBuilt per-source from the parent event's `tags` array (currently\nPolymarket-only — other sources don't reliably populate tags).\nPicked tag is the rarest globally that's also shared by at least\ntwo events in the news feed; the cluster's `cluster_label` is\nthat tag's `label` field as published by Polymarket.\n\n`events` is the member event list sorted by score desc. The\nFE renders the cluster as a 3-level structure:\n  cluster header → up to N events → each event's gainer/loser."},"NewsEventOut":{"properties":{"kind":{"type":"string","const":"event","title":"Kind","default":"event"},"source":{"type":"string","title":"Source"},"market_id":{"type":"string","title":"Market Id"},"src":{"type":"string","enum":["pm","ka","ma","li","op","pr","my","gm"],"title":"Src"},"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"group_item_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Item Title"},"event_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Title"},"cat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cat"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"countries":{"items":{"type":"string"},"type":"array","title":"Countries","default":[]},"prob":{"type":"number","title":"Prob"},"d_prob":{"type":"number","title":"D Prob"},"vol_24hr":{"type":"number","title":"Vol 24Hr"},"normalized_vol":{"type":"number","title":"Normalized Vol"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"closed_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed Time"},"status":{"type":"string","enum":["open","closing-soon","resolved"],"title":"Status"},"is_resolved":{"type":"boolean","title":"Is Resolved"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"event_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Url"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"spike_kind":{"type":"string","const":"prob","title":"Spike Kind","default":"prob"},"score":{"type":"number","title":"Score"},"prob_history":{"items":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"array","title":"Prob History","default":[]},"spike":{"anyOf":[{"$ref":"#/components/schemas/NewsSpike"},{"type":"null"}]},"is_entertainment":{"type":"boolean","title":"Is Entertainment"},"is_microprediction":{"type":"boolean","title":"Is Microprediction"},"is_crypto":{"type":"boolean","title":"Is Crypto"},"is_sports":{"type":"boolean","title":"Is Sports"},"is_weather":{"type":"boolean","title":"Is Weather"},"children":{"items":{"$ref":"#/components/schemas/NewsEventOut"},"type":"array","title":"Children","default":[]}},"type":"object","required":["source","market_id","src","prob","d_prob","vol_24hr","normalized_vol","status","is_resolved","score","is_entertainment","is_microprediction","is_crypto","is_sports","is_weather"],"title":"NewsEventOut","description":"One news row, shaped to the wireframe's `NewsEvent` type."},"NewsMoversResponse":{"properties":{"count":{"type":"integer","title":"Count"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At"},"results":{"items":{"oneOf":[{"$ref":"#/components/schemas/NewsCluster"},{"$ref":"#/components/schemas/NewsEventOut"}],"discriminator":{"propertyName":"kind","mapping":{"cluster":"#/components/schemas/NewsCluster","event":"#/components/schemas/NewsEventOut"}}},"type":"array","title":"Results"},"_meta":{"anyOf":[{"$ref":"#/components/schemas/ResponseMetaList"},{"type":"null"}]}},"type":"object","required":["count","page","page_size","last_refreshed_at","results"],"title":"NewsMoversResponse","description":"Response for GET /api/v1/news/movers."},"NewsSpike":{"properties":{"pos":{"type":"number","title":"Pos"},"peak_prob":{"type":"number","title":"Peak Prob"}},"type":"object","required":["pos","peak_prob"],"title":"NewsSpike","description":"The news-qualifying probability swing, pinned for the chart.\n\nThe hourly ``prob_history`` can bucket a sub-hour spike away; this\ncarries the actual peak snapshot so the carousel chart draws and\nmarks it. ``pos`` is the fractional hour on the same 0..23 axis as\n``prob_history`` indices; ``peak_prob`` is the peak probability\n(0..100 pp) — named distinctly from ``NewsEventOut.prob`` (the\n*current* probability) to avoid the \"now vs peak\" confusion."},"PageMeta":{"properties":{"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","minimum":1.0,"title":"Page Size"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"total_pages":{"type":"integer","minimum":0.0,"title":"Total Pages"}},"type":"object","required":["page","page_size","total","total_pages"],"title":"PageMeta"},"Page_EventOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EventOut"},"type":"array","title":"Items"},"meta":{"$ref":"#/components/schemas/PageMeta"},"_meta":{"$ref":"#/components/schemas/ResponseMetaList"}},"type":"object","required":["items","meta","_meta"],"title":"Page[EventOut]"},"Page_MarketOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MarketOut"},"type":"array","title":"Items"},"meta":{"$ref":"#/components/schemas/PageMeta"},"_meta":{"$ref":"#/components/schemas/ResponseMetaList"}},"type":"object","required":["items","meta","_meta"],"title":"Page[MarketOut]"},"ResponseMetaList":{"properties":{"attribution":{"type":"string","title":"Attribution","default":"pdata.world — aggregated prediction-market data across 8 platforms"},"canonical_url":{"type":"string","title":"Canonical Url"},"as_of":{"type":"string","format":"date-time","title":"As Of"},"docs":{"type":"string","title":"Docs","default":"https://api.pdata.world/docs"}},"type":"object","required":["canonical_url"],"title":"ResponseMetaList","description":"Agent metadata for list/aggregate responses (no cite_as)."},"ResponseMetaResource":{"properties":{"attribution":{"type":"string","title":"Attribution","default":"pdata.world — aggregated prediction-market data across 8 platforms"},"canonical_url":{"type":"string","title":"Canonical Url"},"as_of":{"type":"string","format":"date-time","title":"As Of"},"docs":{"type":"string","title":"Docs","default":"https://api.pdata.world/docs"},"cite_as":{"type":"string","title":"Cite As"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"}},"type":"object","required":["canonical_url","cite_as"],"title":"ResponseMetaResource","description":"Agent metadata for single-resource responses (with cite_as)."},"SearchHit":{"properties":{"kind":{"type":"string","enum":["event","market"],"title":"Kind"},"id":{"type":"string","title":"Id"},"source":{"type":"string","title":"Source"},"title":{"type":"string","title":"Title"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headline"},"status":{"type":"string","enum":["open","closing-soon","past","resolved"],"title":"Status"},"volume_24hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24Hr"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"child_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Child Count"},"url_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Path"},"event_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Title"},"probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Probability"},"prob_24h_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prob 24H Change"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}},"type":"object","required":["kind","id","source","title","headline","status","volume_24hr","volume","child_count","url_path","event_title","probability","prob_24h_change","end_date"],"title":"SearchHit"},"SearchSuggestOut":{"properties":{"results":{"items":{"$ref":"#/components/schemas/SearchHit"},"type":"array","title":"Results"},"total_events":{"type":"integer","title":"Total Events"},"total_markets":{"type":"integer","title":"Total Markets"},"_meta":{"anyOf":[{"$ref":"#/components/schemas/ResponseMetaList"},{"type":"null"}]}},"type":"object","required":["results","total_events","total_markets"],"title":"SearchSuggestOut","description":"Envelope kept distinct from `Page` because suggest never paginates\n— `total` is meaningless when ranking truncates aggressively at 8.\n\nBut we *do* expose total match counts so the frontend can render a\n\"View all N results\" deep-link footer (the typeahead becomes a\nlaunchpad to the markets page, not a dead-end at 8 hits)."},"SitemapEventOut":{"properties":{"source":{"type":"string","title":"Source"},"id":{"type":"string","title":"Id"},"lastmod":{"type":"string","format":"date-time","title":"Lastmod"}},"type":"object","required":["source","id","lastmod"],"title":"SitemapEventOut","description":"Lightweight event reference for sitemap generation.\n\nOne row per indexable event — open + above a volume threshold +\ntop-level (not a group child). Drives `frontend/src/app/sitemap.ts`."},"SourceSummary":{"properties":{"source":{"type":"string","title":"Source"},"volume_24hr_total":{"type":"number","title":"Volume 24Hr Total"},"events_active":{"type":"integer","title":"Events Active"},"markets_active":{"type":"integer","title":"Markets Active"},"markets_with_volume":{"type":"integer","title":"Markets With Volume"},"events_with_volume":{"type":"integer","title":"Events With Volume"},"categories":{"additionalProperties":{"type":"number"},"type":"object","title":"Categories"},"computed_at":{"type":"string","format":"date-time","title":"Computed At"}},"type":"object","required":["source","volume_24hr_total","events_active","markets_active","markets_with_volume","events_with_volume","categories","computed_at"],"title":"SourceSummary"},"SpikeWindow":{"type":"integer","enum":[2,12,24],"title":"SpikeWindow","description":"Lookback windows the carousel selector exposes (hours). An IntEnum\n(not Literal[2,12,24]) because FastAPI coerces a query STRING to an\nIntEnum member but NOT to an int literal — `?window=24` would 422\nagainst a Literal even though the Python default 24 validates."},"SummaryOut":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/SourceSummary"},"type":"array","title":"Sources"},"grand_total_volume_24hr":{"type":"number","title":"Grand Total Volume 24Hr"},"_meta":{"anyOf":[{"$ref":"#/components/schemas/ResponseMetaList"},{"type":"null"}]}},"type":"object","required":["sources","grand_total_volume_24hr"],"title":"SummaryOut"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"externalDocs":{"url":"https://pdata.world/agents","description":"Agent quickstart — MCP setup, citation policy, schema policy."},"servers":[{"url":"https://api.pdata.world","description":"Production"}]}