Prediction markets API
Which prediction markets, events or traders match this text?
Free-text search across prediction venues: matching markets, events and traders, with ids and close dates. Identity only, no prices or volume.
/api/external/prediction/prediction-searchWhat it returns
Relevance-ranked matches for a free-text query (a question, a team, a person, a username) in three lists: markets, events and traders. Every id is in its venue's own id space, and a market's eventId is its event's id, though that event need not be among the events returned. Rows carry identity only (titles, ids, outcome labels, dates), not prices, volume or trading status: the search index lags the venues, so read closesAt/endsAt to tell a live market from a finished one, and closed markets are returned too. Traders are searched on polymarket only. A query matching nothing answers three empty lists. No chain and no subject.
Chains
This endpoint is not tied to a chain: it takes no chain in its request.
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/prediction/prediction-search?q=<q>"
| Parameter | Description |
|---|---|
qquery · string · required | The text to search for, 2 to 100 characters. |
exchangequery · string · optional | Search one venue only: kalshi or polymarket. |
limitquery · integer · optional | How many markets to return. Defaults to 12; at most 30. Events are capped at 10 and traders at 8 whatever the limit. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
query | string | The query as searched. |
markets | object[] | Matching markets, best match first. |
markets[].exchange | string | The venue, lowercase, e.g. kalshi or polymarket. Open set: new venues can appear. |
markets[].id | string | The market's id in its venue's own id space: the ticker on kalshi, the condition id on polymarket. |
markets[].title | string | The market's question. |
markets[].label | string | null | The market's label inside its event, e.g. $63,500 or above. Null when it has none. |
markets[].slug | string | null | The market's URL slug on its venue. |
markets[].kind | string | null | The product shape, e.g. binary. Open set. |
markets[].eventId | string | null | The event this market belongs to, in the id space of the event rows' id. That event need not be among the events returned. Null for a standalone market. |
markets[].outcomes | string[] | The outcome labels, e.g. Yes, No. No prices. |
markets[].createdAt | string | null | ISO-8601 UTC, when the market was listed. |
markets[].closesAt | string | null | ISO-8601 UTC, when trading closes or closed. A date in the past means the market is no longer trading. |
events | object[] | Matching events, best match first. At most 10. |
events[].exchange | string | The venue, lowercase, e.g. kalshi or polymarket. Open set: new venues can appear. |
events[].id | string | The event's id in its venue's own id space. |
events[].title | string | The event's title. |
events[].slug | string | null | The event's URL slug on its venue. |
events[].category | string | null | The venue's category for the event. |
events[].kind | string | null | The product shape, e.g. binary. Open set. |
events[].marketCount | integer | null | How many markets the event groups. |
events[].startsAt | string | null | ISO-8601 UTC, when the event starts. |
events[].endsAt | string | null | ISO-8601 UTC, when the event ends. A date in the past means it is over. |
traders | object[] | Matching traders, best match first. At most 8; polymarket only. |
traders[].exchange | string | The venue, lowercase, e.g. kalshi or polymarket. Open set: new venues can appear. |
traders[].address | string | The trader's wallet address. |
traders[].username | string | null | The trader's username on the venue. |
traders[].displayName | string | null | The trader's display name. |
traders[].xUsername | string | null | The trader's linked X handle, when they linked one. |
traders[].lastTradeAt | string | null | ISO-8601 UTC, the trader's most recent trade. |
traders[].match | string | null | How the query matched this trader's name. |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key