> ## Documentation Index
> Fetch the complete documentation index at: https://docs.surfaceapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Surface API

> Cross-exchange contract matching between Kalshi and Polymarket.

The Surface API lets you look up any Kalshi contract ticker or Polymarket contract ID and get the full cross-exchange cluster — every contract in the same group, their resolution rules, and the relationships between them.

One endpoint. Works in any direction.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="bolt" href="/quickstart">
    Make your first request in under a minute.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Full endpoint reference with interactive playground.
  </Card>
</CardGroup>

## How it works

Surface maintains a continuously updated dataset of matched contracts across Kalshi and Polymarket. Every match passes through a multi-stage pipeline that checks team, date, line, and side alignment — mismatches are blocked, not returned.

When you call `/match/{contractID}`, Surface resolves the input and returns the full cluster: all contracts in the same cross-exchange group and the relationships between them. The response is identical regardless of which contract ID you query.

```bash theme={null}
curl https://surfaceapi.com/api/v1/match/KXMLBGAME-26MAR252005NYYSF-SF \
  -H "X-API-Key: YOUR_API_KEY"
```

```json theme={null}
{
  "contracts": [
    {
      "id": "KXMLBGAME-26MAR252005NYYSF-SF",
      "parent_market_id": "KXMLBGAME-26MAR252005NYYSF",
      "exchange": "kalshi",
      "question": "New York Y vs San Francisco Winner?",
      "yes_name": "San Francisco",
      "no_name": "NO: San Francisco"
    },
    {
      "id": "mlb-nyy-sf-2026-03-25",
      "parent_market_id": "mlb-nyy-sf-2026-03-25",
      "exchange": "polymarket",
      "question": "New York Yankees vs. San Francisco Giants",
      "yes_name": "New York Yankees",
      "no_name": "San Francisco Giants"
    },
    {
      "id": "KXMLBGAME-26MAR252005NYYSF-NYY",
      "parent_market_id": "KXMLBGAME-26MAR252005NYYSF",
      "exchange": "kalshi",
      "question": "New York Y vs San Francisco Winner?",
      "yes_name": "New York Y",
      "no_name": "NO: New York Y"
    }
  ],
  "relationships": [
    { "from": "KXMLBGAME-26MAR252005NYYSF-SF", "to": "mlb-nyy-sf-2026-03-25", "is_inverse": false },
    { "from": "KXMLBGAME-26MAR252005NYYSF-NYY", "to": "mlb-nyy-sf-2026-03-25", "is_inverse": true }
  ]
}
```
