---
title: "Resolve a pasted Polymarket/Kalshi/predict.fun market or event URL"
method: GET
path: "/search/resolve-url"
tags: ["Search"]
---

# Resolve a pasted Polymarket/Kalshi/predict.fun market or event URL

`GET /search/resolve-url`

## Request

- Base URL: `https://data.kairos.trade`
- URL: `https://data.kairos.trade/search/resolve-url`
- Auth: API key in header `X-Client-Id` and API key in header `X-Api-Key` and API key in header `X-Api-Secret`

Parses `url` against known host patterns — polymarket.com `/event/<slug>/<market-slug>` (market) or `/event/<slug>` (event) or legacy `/market/<slug>`; kalshi.com ticker/event_id/market_id path segments; predict.fun equivalents. Unrecognized hosts or unmatched paths return an empty `/search/simple`-shaped body (200) so the frontend can fall back to a normal text search rather than erroring. On a match, resolves the market/event (for an event URL, every outcome market in that event) and returns the same `{results, groups?, singles?, meta}` shape as `/search/simple`, enriched with `correlations` only (ladder classification is skipped — a resolved URL is already a single market/event, not a broad set to collapse).

## Query parameters

- `url` string, required

## Response `200`

Resolved market/event in `/search/simple` shape, or an empty body if the URL wasn't recognized.

- SearchSimpleResponse: Shared envelope for /search/simple and /search/resolve-url. Both always include results/meta; groups/singles appear only when the underlying search was grouped (always true for /search/simple with group_results=true, and for /search/resolve-url on an event URL). classifiedGroups/absorbedMarketIds are only ever attached by /search/simple (group_results=true); /search/resolve-url never sets them. correlations is attached by both, best-effort, and absent if no counterpart markets were found.
  - `results` SearchResult[], required
    - `market_id` string, required
    - `provider_id` integer, required: Numeric provider id (1=kalshi, 2=polymarket, 3=opinion, 8=predictfun).
    - `provider` string, required
    - `event_id` string, nullable
    - `event_name` string, nullable
    - `name` string, nullable: Market title.
    - `symbol` string, nullable
    - `category` string, nullable
    - `status` string, nullable
    - `expires_at` string, date-time, nullable
    - `relevance_score` number, required: Composite final score = text_score + business_score - penalty.
    - `volume_24h` number
    - `outcome_label` string, nullable
    - `series_key` string, nullable: Polymarket seriesSlug or Kalshi series_ticker.
    - `series_title` string, nullable
    - `text_score` number: Text match score before the live/starting-soon boost.
    - `business_score` number
    - `penalty` number
    - `timing_boost` number: Live/starting-soon multiplier (1 to 3) applied to text_score in relevance_score.
    - `price` number, nullable
    - `volume_1h` number
    - `liquidity` number
    - `image` string, nullable
    - `icon` string, nullable
    - `token_id` string, nullable: First outcome's on-chain token id (legacy singular field). For a market with more than one outcome use `token_ids`/`outcomes` instead.
    - `condition_id` string, nullable: Venue condition id (Polymarket 0x… condition hash), when the venue has one.
    - `token_ids` string[]: Full on-chain outcome token roster, aligned with `outcomes`. Feed these to `/v1/synthetics` legs and `/v1/candles` without a second resolve call. Empty when the market has no on-chain tokens.
    - `outcomes` string[]: Outcome labels aligned positionally with `token_ids`.
    - `type` 'event', nullable: Only present (and only ever "event") on rows returned by /search/markets-and-events when type=event or both.
  - `groups` SearchEventGroup[]
    - `event_id` string, required
    - `event_name` string, nullable
    - `market_count` integer, required: Count of markets kept after provider-visibility filtering.
    - `representative` SearchResult: One market or event row from search results, post provider-visibility filtering.
      - `market_id` string, required
      - `provider_id` integer, required: Numeric provider id (1=kalshi, 2=polymarket, 3=opinion, 8=predictfun).
      - `provider` string, required
      - `event_id` string, nullable
      - `event_name` string, nullable
      - `name` string, nullable: Market title.
      - `symbol` string, nullable
      - `category` string, nullable
      - `status` string, nullable
      - `expires_at` string, date-time, nullable
      - `relevance_score` number, required: Composite final score = text_score + business_score - penalty.
      - `volume_24h` number
      - `outcome_label` string, nullable
      - `series_key` string, nullable: Polymarket seriesSlug or Kalshi series_ticker.
      - `series_title` string, nullable
      - `text_score` number: Text match score before the live/starting-soon boost.
      - `business_score` number
      - `penalty` number
      - `timing_boost` number: Live/starting-soon multiplier (1 to 3) applied to text_score in relevance_score.
      - `price` number, nullable
      - `volume_1h` number
      - `liquidity` number
      - `image` string, nullable
      - `icon` string, nullable
      - `token_id` string, nullable: First outcome's on-chain token id (legacy singular field). For a market with more than one outcome use `token_ids`/`outcomes` instead.
      - `condition_id` string, nullable: Venue condition id (Polymarket 0x… condition hash), when the venue has one.
      - `token_ids` string[]: Full on-chain outcome token roster, aligned with `outcomes`. Feed these to `/v1/synthetics` legs and `/v1/candles` without a second resolve call. Empty when the market has no on-chain tokens.
      - `outcomes` string[]: Outcome labels aligned positionally with `token_ids`.
      - `type` 'event', nullable: Only present (and only ever "event") on rows returned by /search/markets-and-events when type=event or both.
    - `markets` SearchResult[], required
      - `market_id` string, required
      - `provider_id` integer, required: Numeric provider id (1=kalshi, 2=polymarket, 3=opinion, 8=predictfun).
      - `provider` string, required
      - `event_id` string, nullable
      - `event_name` string, nullable
      - `name` string, nullable: Market title.
      - `symbol` string, nullable
      - `category` string, nullable
      - `status` string, nullable
      - `expires_at` string, date-time, nullable
      - `relevance_score` number, required: Composite final score = text_score + business_score - penalty.
      - `volume_24h` number
      - `outcome_label` string, nullable
      - `series_key` string, nullable: Polymarket seriesSlug or Kalshi series_ticker.
      - `series_title` string, nullable
      - `text_score` number: Text match score before the live/starting-soon boost.
      - `business_score` number
      - `penalty` number
      - `timing_boost` number: Live/starting-soon multiplier (1 to 3) applied to text_score in relevance_score.
      - `price` number, nullable
      - `volume_1h` number
      - `liquidity` number
      - `image` string, nullable
      - `icon` string, nullable
      - `token_id` string, nullable: First outcome's on-chain token id (legacy singular field). For a market with more than one outcome use `token_ids`/`outcomes` instead.
      - `condition_id` string, nullable: Venue condition id (Polymarket 0x… condition hash), when the venue has one.
      - `token_ids` string[]: Full on-chain outcome token roster, aligned with `outcomes`. Feed these to `/v1/synthetics` legs and `/v1/candles` without a second resolve call. Empty when the market has no on-chain tokens.
      - `outcomes` string[]: Outcome labels aligned positionally with `token_ids`.
      - `type` 'event', nullable: Only present (and only ever "event") on rows returned by /search/markets-and-events when type=event or both.
  - `singles` SearchResult[]
    - `market_id` string, required
    - `provider_id` integer, required: Numeric provider id (1=kalshi, 2=polymarket, 3=opinion, 8=predictfun).
    - `provider` string, required
    - `event_id` string, nullable
    - `event_name` string, nullable
    - `name` string, nullable: Market title.
    - `symbol` string, nullable
    - `category` string, nullable
    - `status` string, nullable
    - `expires_at` string, date-time, nullable
    - `relevance_score` number, required: Composite final score = text_score + business_score - penalty.
    - `volume_24h` number
    - `outcome_label` string, nullable
    - `series_key` string, nullable: Polymarket seriesSlug or Kalshi series_ticker.
    - `series_title` string, nullable
    - `text_score` number: Text match score before the live/starting-soon boost.
    - `business_score` number
    - `penalty` number
    - `timing_boost` number: Live/starting-soon multiplier (1 to 3) applied to text_score in relevance_score.
    - `price` number, nullable
    - `volume_1h` number
    - `liquidity` number
    - `image` string, nullable
    - `icon` string, nullable
    - `token_id` string, nullable: First outcome's on-chain token id (legacy singular field). For a market with more than one outcome use `token_ids`/`outcomes` instead.
    - `condition_id` string, nullable: Venue condition id (Polymarket 0x… condition hash), when the venue has one.
    - `token_ids` string[]: Full on-chain outcome token roster, aligned with `outcomes`. Feed these to `/v1/synthetics` legs and `/v1/candles` without a second resolve call. Empty when the market has no on-chain tokens.
    - `outcomes` string[]: Outcome labels aligned positionally with `token_ids`.
    - `type` 'event', nullable: Only present (and only ever "event") on rows returned by /search/markets-and-events when type=event or both.
  - `meta` SearchSimpleMeta, required
    - `query` string
    - `returned` integer: Count of results after provider-visibility filtering.
    - `query_time_ms` number
    - `total` integer, nullable: Present only when include_total=true. Best-effort: the upstream total if no rows were filtered by visibility, else the filtered count.
  - `classifiedGroups` SearchMarketGroup[]
    - `type` 'group', required
    - `groupKey` string, required
    - `provider` string, required
    - `title` string, nullable
    - `kind` string, nullable: Classification kind, e.g. threshold ladder.
    - `axisLabel` string, nullable
    - `unit` string, nullable
    - `direction` string, nullable
    - `confidence` number: Rounded to 3 decimal places.
    - `marketCount` integer
    - `category` string, nullable
    - `image` string, nullable
    - `icon` string, nullable
    - `eventId` string, nullable
    - `eventTitle` string, nullable
    - `outcomes` SearchOutcomeRef[], required
      - `id` string
      - `provider` string
      - `title` string, nullable
      - `outcomeLabel` string, nullable
      - `tokenId` string, nullable
      - `price` number, nullable
      - `op` string, nullable: Comparison operator this outcome represents on the group's axis, e.g. '>=', '<'.
      - `value` number, nullable: Threshold value on the group's axis.
      - `hi` number, nullable: Upper bound, for range-shaped outcomes.
  - `absorbedMarketIds` string[]: Market/outcome ids already rendered inside classifiedGroups — the overlay should not also render them as standalone rows.
  - `correlations` object: Map of result market_id -> up to 4 similar cross-venue counterpart markets, sorted by similarity descending.

## Other responses

- `401`: No valid credential presented — missing/invalid API-key headers, or an invalid/expired session token.
- `403`: Authenticated but not permitted. Three distinct causes: the session user is not invited (`Invite required`), the API key lacks the operation's scope, or API-key access to the requested venue is switched off (`API access is disabled for <provider>`). Admin and API-key callers bypass the invite check; session and admin callers bypass scope and venue checks.
- `422`: Request failed FastAPI parameter validation.
- `429`: Rate limit exceeded for this route's sliding window, keyed on the session `sub` when authenticated and on the trusted client IP otherwise. Honor `Retry-After`. A per-API-key data ceiling (set per credential) rejects with `{"detail": "API key data rate limit exceeded"}` instead of the `error` envelope below.
- `500`: URL resolution failed.

---

[API](https://skmtc.dev/kairos/apis/kairos-data-api.md) - [All operations](https://skmtc.dev/kairos/apis/kairos-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kairos/apis/kairos-data-api/revisions/cf6b76079e38?raw)
