# Polymarket Markets API (polymarket.markets)

- Canonical page: https://everyinfra.com/en/polymarket-api/markets
- Endpoint: POST /api/v1/social with {"platform": "polymarket", "action": "markets", "params": {...}}
- Price: $0.006806 per call ($6.81 per 1,000 requests); failed and empty results are not charged
- Returns: list, default 20, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=polymarket&action=markets

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | no | not declared | Words to find in market or event titles, at least 3 characters, such as `bitcoin` or `election`; leave it out to list everything by the chosen order. |
| sort | enum: created / expiration / open_interest / price_asc / price_desc / trades_1d / volume / volume_1d / volume_7d | no | not declared | Order of the list. `markets`: volume (default), open_interest, price_desc, price_asc, expiration, created, volume_1d, volume_7d, trades_1d. `events`: created (default), start_date, end_date, volume_1d, volume_7d, volume_all_time, open_interest, trades_1d. |
| status | enum: closed / open | no | not declared | open (still trading) or closed (finished); leave it out for both. |
| limit | integer (1–100) | no | 20 | The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | Polymarket ID of the market or event, as a string. |
| condition_id | The market's on-chain condition ID (0x...); pass it as `market` to trades. |
| slug | Short name of the market or event in Polymarket links; a market slug works as `market` for trades. |
| url | Link to the record on the platform. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| description | Summary or description, usually shorter than text. |
| status | open (still trading) or closed (finished). |
| winning_outcome | The winning side of a resolved market, such as Yes; absent before resolution. |
| outcomes | The outcomes you can buy, each with label, token_id and price (0 to 1, readable as the market-implied probability; 1 for the winner after resolution). |
| volume_usd | Total traded value in US dollars. |
| liquidity_usd | Current order-book liquidity in US dollars. |
| volume_24h_usd | Traded value in the last 24 hours, US dollars. |
| volume_7d_usd | Traded value in the last 7 days, US dollars (markets). |
| trades_24h | Trades in the last 24 hours (markets). |
| tags | Tags; absent when there are none. |
| event_id | ID of the parent event (markets). |
| event_slug | Short name of the parent event (markets). |
| event_title | Title of the parent event (markets). |
| image_url | Image link. Capabilities with several images may return an image_urls array. |
| start_at | Start time, ISO 8601 UTC. |
| end_at | Scheduled end time, ISO 8601 UTC. |
| closed_at | Actual close time, ISO 8601 UTC; absent while open. |
| created_at | Creation time, same format as posted_at. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "polymarket",
  "action": "markets",
  "params": {}
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "polymarket",
        "action": "markets",
        "params": {},
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "polymarket",
  "action": "markets",
  "results": [
    {
      "id": …,
      "condition_id": …,
      "slug": …,
      "url": …,
      "title": …,
      "description": …,
      "status": …,
      "winning_outcome": …,
      "outcomes": …,
      "volume_usd": …,
      "liquidity_usd": …,
      "volume_24h_usd": …,
      "volume_7d_usd": …,
      "trades_24h": …,
      "tags": …,
      "event_id": …,
      "event_slug": …,
      "event_title": …,
      "image_url": …,
      "start_at": …,
      "end_at": …,
      "closed_at": …,
      "created_at": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=polymarket
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
