pdata Compare API
The compare API from pdata — 1 operation(s) for compare.
The compare API from pdata — 1 operation(s) for compare.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/pdata-world:pdata-world-compare-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: 'pdata.world API: prediction-market data across 8 platforms…'
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 key, no paid tier.
Please send a descriptive `User-Agent` naming your app or agent and a URL where its operator can be reached, so a misbehaving client can be contacted instead of blocked. Fair use: at most 50 requests a second per IP address, with bursts of up to 100; for everything at once, use the nightly bulk files at https://api.pdata.world/bulk/.
**For AI agents:** a Model Context Protocol server is mounted at https://api.pdata.world/mcp exposing 15 of its 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: 2.8.0
contact:
name: pdata agent guide
url: https://pdata.world/agents
license:
name: CC BY 4.0 (pdata aggregation; source data subject to each venue's terms)
url: https://creativecommons.org/licenses/by/4.0/
termsOfService: https://pdata.world/about
servers:
- url: https://api.pdata.world
description: Production
tags:
- name: compare
paths:
/api/v1/compare/pairs:
get:
tags:
- compare
summary: Compare Pairs
description: 'Use when an agent needs the questions that two venues both price, with both prices and the gap between them: ''where do Polymarket and Kalshi disagree'', ''compare Polymarket and Kalshi odds''. One call returns every matched question, largest gap first, each with the venue''s probability, bid, ask, volume, end date and pdata.world page on both sides. Only Polymarket and Kalshi are supported today. The pairs are matched automatically, not by hand: two events pair only when their titles hold the same words and they have the same shape (one yes/no market each, or one outcome both venues name alike); the response''s `method` field spells the rule out. The match does not read the venues'' resolution rules, which can differ, so a gap is a reason to read both markets, not proof of a mispricing. Pairs without a firm two-sided quote on both venues are counted in `matched` and left out of `pairs`. Human-readable version: https://pdata.world/compare/polymarket-vs-kalshi.'
operationId: compare_pairs
parameters:
- name: left
in: query
required: false
schema:
type: string
description: 'First venue. Supported pair: polymarket and kalshi, in either order.'
default: polymarket
title: Left
examples:
- polymarket
description: 'First venue. Supported pair: polymarket and kalshi, in either order.'
- name: right
in: query
required: false
schema:
type: string
description: Second venue, different from `left`.
default: kalshi
title: Right
examples:
- kalshi
description: Second venue, different from `left`.
- name: limit
in: query
required: false
schema:
type: integer
description: Max pairs to return, largest gap first (1-200).
default: 100
title: Limit
examples:
- 10
description: Max pairs to return, largest gap first (1-200).
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ComparePairsOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'400':
description: 'Bad request: an unknown query parameter, an unknown source, a missing argument, or an invalid value or range. `code` says which; `message` lists what is allowed or what to call first.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorOut'
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ComparePairsOut:
properties:
left:
type: string
title: Left
description: The first venue.
right:
type: string
title: Right
description: The second venue.
pairs:
items:
$ref: '#/components/schemas/ComparePairOut'
type: array
title: Pairs
description: Matched questions with a firm quote on both venues, largest gap first.
total:
type: integer
title: Total
description: Matched questions with a firm quote on both venues, before `limit`.
matched:
type: integer
title: Matched
description: Questions matched across the two venues, including those left out of `pairs` because a side has no firm quote (a wide or one-sided order book, or a stored price outside it).
method:
type: string
title: Method
description: How the pairs were matched and what the match does not guarantee.
_meta:
anyOf:
- $ref: '#/components/schemas/ResponseMetaList'
- type: 'null'
description: 'Response metadata: attribution, canonical URL, as-of time and docs link.'
type: object
required:
- left
- right
- pairs
- total
- matched
- method
title: ComparePairsOut
ResponseMetaList:
properties:
attribution:
type: string
title: Attribution
description: Who aggregated this data, under which licence, and whose data it is.
default: Data aggregated by pdata.world (https://pdata.world) from Polymarket, Kalshi, Manifold, Myriad, Limitless, Predict, Opinion and Gemini; CC BY 4.0; source data © each venue.
canonical_url:
type: string
title: Canonical Url
description: 'Stable URL for this resource: the pdata.world page, or the API URL for list responses.'
as_of:
type: string
format: date-time
title: As Of
description: When this response was generated (UTC).
docs:
type: string
title: Docs
description: API documentation.
default: https://api.pdata.world/docs
hint:
anyOf:
- type: string
- type: 'null'
title: Hint
description: 'Advice for the next call, present only when there is some: today, why a search may have come back empty and where else to look. Absent otherwise.'
total_capped:
anyOf:
- type: boolean
- type: 'null'
title: Total Capped
description: 'Set on `?search=` and `/search/suggest` responses only. `true` when more rows matched than the search inspects (20,000 per table; 5,000 for the typo-tolerant fallback): `meta.total` (or `total_events` / `total_markets`) is then a lower bound, not the exact count. `/markets` pages normally stay in exact order. `/events` stays in exact order for events matched by their own text and may miss events matched only through a child market. `/search/suggest` ranks the inspected rows only. Absent when the count is exact.'
type: object
required:
- canonical_url
title: ResponseMetaList
description: Agent metadata for list/aggregate responses (no cite_as).
ComparePairOut:
properties:
question:
type: string
title: Question
description: 'The question: the left venue''s event title.'
outcome:
anyOf:
- type: string
- type: 'null'
title: Outcome
description: The outcome whose price is compared, as the left venue names it. Null for a yes/no question (the price of Yes). For a question with several outcomes it is the one with the highest combined price among those both venues list under the same name, never one venue's leader against the other's.
kind:
type: string
enum:
- binary
- outcome
title: Kind
description: '`binary`: each venue lists the question as one yes/no market. `outcome`: each lists several yes/no markets and one same-named outcome is compared.'
left:
$ref: '#/components/schemas/CompareSideOut'
description: The `left` venue's side.
right:
$ref: '#/components/schemas/CompareSideOut'
description: The `right` venue's side.
gap:
type: number
title: Gap
description: Absolute difference between the two probabilities, as a fraction on the [0, 1] scale (0.05 = 5 percentage points). Computed from the unrounded prices.
similarity:
type: number
title: Similarity
description: 'Cosine similarity of the two event titles'' embeddings, 0-1, recomputed nightly. Informational: pairs are accepted on the title rule in `method`, not on this score.'
matched_outcomes:
type: integer
title: Matched Outcomes
description: How many outcomes both venues list under the same name (1 for a yes/no question).
type: object
required:
- question
- kind
- left
- right
- gap
- similarity
- matched_outcomes
title: ComparePairOut
description: One question both venues price, with both prices.
CompareSideOut:
properties:
source:
type: string
title: Source
description: Venue.
event_id:
type: string
title: Event Id
description: The venue's event id.
market_id:
type: string
title: Market Id
description: 'The compared market''s id on the venue: the event''s only market for a yes/no question, else the market of the outcome named in `outcome`.'
title:
type: string
title: Title
description: Event title as the venue publishes it.
outcome:
anyOf:
- type: string
- type: 'null'
title: Outcome
description: The venue's own name for the compared outcome. Null for a yes/no question, where `probability` is the price of Yes.
probability:
type: number
title: Probability
description: 'The compared market''s implied probability, in [0, 1]: the same figure the venue''s event page on pdata.world shows for it.'
best_bid:
type: number
title: Best Bid
description: Highest bid for Yes, in [0, 1].
best_ask:
type: number
title: Best Ask
description: Lowest ask for Yes, in [0, 1].
volume_24hr:
anyOf:
- type: number
- type: 'null'
title: Volume 24Hr
description: The compared market's venue-reported 24h volume, in the venue's own unit (shares for Polymarket, contracts for Kalshi); not comparable across venues.
volume:
anyOf:
- type: number
- type: 'null'
title: Volume
description: The compared market's all-time volume, in the venue's own unit.
end_date:
anyOf:
- type: string
format: date-time
- type: 'null'
title: End Date
description: 'The event''s end date as the venue states it (UTC). The two venues'' dates rarely agree: Kalshi''s is when it expects to settle the market, which for an election is often six months after the vote.'
url:
type: string
title: Url
description: The event's page on pdata.world.
type: object
required:
- source
- event_id
- market_id
- title
- probability
- best_bid
- best_ask
- url
title: CompareSideOut
description: 'One venue''s side of a pair: the event, and the market that is compared.'
ErrorOut:
description: The body of every error response.
properties:
code:
title: Code
type: string
description: Machine-readable reason, e.g. `unknown_param`, `invalid_source`, `missing_argument`, `not_found`.
message:
title: Message
type: string
description: What went wrong and what to send instead, in one or two sentences.
detail:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
default: null
title: Detail
description: 'Structured extras when there are any: `missing` and `next_tool` for `missing_argument`, `did_you_mean` (closest documented paths) for an unknown path.'
docs:
default: https://api.pdata.world/docs
title: Docs
type: string
description: API documentation.
home:
default: https://api.pdata.world/
title: Home
type: string
description: The API's front door, which links every surface.
required:
- code
- message
title: ErrorOut
type: object
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.