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.

GET/api/external/prediction/prediction-search

What 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>"
Parameters
ParameterDescription
q

query · string · required

The text to search for, 2 to 100 characters.
exchange

query · string · optional

Search one venue only: kalshi or polymarket.
limit

query · 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.

Response fields of Which prediction markets, events or traders match this text?
FieldTypeDescription
querystringThe query as searched.
marketsobject[]Matching markets, best match first.
markets[].exchangestringThe venue, lowercase, e.g. kalshi or polymarket. Open set: new venues can appear.
markets[].idstringThe market's id in its venue's own id space: the ticker on kalshi, the condition id on polymarket.
markets[].titlestringThe market's question.
markets[].labelstring | nullThe market's label inside its event, e.g. $63,500 or above. Null when it has none.
markets[].slugstring | nullThe market's URL slug on its venue.
markets[].kindstring | nullThe product shape, e.g. binary. Open set.
markets[].eventIdstring | nullThe 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[].outcomesstring[]The outcome labels, e.g. Yes, No. No prices.
markets[].createdAtstring | nullISO-8601 UTC, when the market was listed.
markets[].closesAtstring | nullISO-8601 UTC, when trading closes or closed. A date in the past means the market is no longer trading.
eventsobject[]Matching events, best match first. At most 10.
events[].exchangestringThe venue, lowercase, e.g. kalshi or polymarket. Open set: new venues can appear.
events[].idstringThe event's id in its venue's own id space.
events[].titlestringThe event's title.
events[].slugstring | nullThe event's URL slug on its venue.
events[].categorystring | nullThe venue's category for the event.
events[].kindstring | nullThe product shape, e.g. binary. Open set.
events[].marketCountinteger | nullHow many markets the event groups.
events[].startsAtstring | nullISO-8601 UTC, when the event starts.
events[].endsAtstring | nullISO-8601 UTC, when the event ends. A date in the past means it is over.
tradersobject[]Matching traders, best match first. At most 8; polymarket only.
traders[].exchangestringThe venue, lowercase, e.g. kalshi or polymarket. Open set: new venues can appear.
traders[].addressstringThe trader's wallet address.
traders[].usernamestring | nullThe trader's username on the venue.
traders[].displayNamestring | nullThe trader's display name.
traders[].xUsernamestring | nullThe trader's linked X handle, when they linked one.
traders[].lastTradeAtstring | nullISO-8601 UTC, the trader's most recent trade.
traders[].matchstring | nullHow 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