# Polymarket Sports Markets (`barefoot_grade/polymarket-sports`) Actor

Collect Polymarket sports markets with event context, outcome probabilities, liquidity, volume, and optional order books. One record per unique market with stable source identifiers and a versioned normalized envelope. Filter by event, tag, market type, and reported activity.

- **URL**: https://apify.com/barefoot_grade/polymarket-sports.md
- **Developed by:** [Philip Kirkbride](https://apify.com/barefoot_grade) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 market records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Polymarket Sports Markets

### Quick Start

Collect Polymarket sports markets with event context, outcome probabilities, liquidity, volume, and optional order books. Use the records for research, dashboards, and scheduled snapshots.

```json
{"tagSlug":"sports","marketTypes":["moneyline","spreads","totals"],"maxResults":250,"includeOrderBooks":false}
```

The default input keeps all market types, including futures and markets without a published type. A run returns up to `maxResults`, not necessarily the whole board. Open or active does not mean upcoming: older unresolved markets may still appear. Source tags and live flags are retained as reported; they are not independently verified game status.

### Input

| Name | Type | Default | What it does |
| --- | --- | --- | --- |
| `eventSlugs` | array | `[]` | Collects up to 50 selected events. Bypasses discovery tag and date bounds; other filters still apply. |
| `tagSlug` | string | `sports` | Selects the discovery tag, for example `nba`. |
| `marketTypes` | array | `[]` | Exact case-insensitive `sportsMarketType` values, such as `moneyline`, `spreads`, `totals`, or `first_half_totals`. Empty keeps every type. |
| `activeOnly` | boolean | `true` | Excludes explicitly inactive events and markets. |
| `openOnly` | boolean | `true` | Excludes closed events and markets. `false` includes both open and closed records. |
| `liveOnly` | boolean | `false` | Keeps events explicitly marked live by the source. |
| `startDateMin` / `startDateMax` | string | unset | Inclusive discovery bounds on **listing time** (`eventListingTime`), not game kickoff. ISO-8601; naive times mean UTC. Ignored for exact event slugs. |
| `liquidityMin` / `volumeMin` | number | unset | Minimum reported market liquidity / lifetime volume. An explicit bound excludes unknown values, including when the bound is zero. |
| `pageSize` | integer | `100` | Events requested per page, from 1 to 500; each event may contain many markets. |
| `maxResults` | integer | `500` | Maximum unique market records, from 1 to 5,000, across all events. |
| `includeOrderBooks` | boolean | `false` | Adds order books for the market's outcome tokens. |
| `orderBookConcurrency` | integer | `4` | Concurrent book requests, from 1 to 16; the request delay still applies. |
| `includeRaw` | boolean | `false` | Retains original event and market objects. This can substantially enlarge each row. |
| `requestDelaySecs` | number | `0.1` | Pause between page, event, or book requests, from 0 to 10 seconds. |

Unknown input fields, invalid types, non-finite numbers, reversed date ranges, and out-of-range limits fail validation. Very restrictive filters may require scanning many event pages before enough markets match.

### Output

Each dataset row represents one unique market. Identity uses `conditionId` when available; `recordKey` includes the `polymarket:` prefix. Rows include event details, `sportsMarketType`, line, `outcomes` (names), parallel `outcomePrices` (probabilities, not decimal odds), token IDs, liquidity, volume, quotes, and a versioned `canonical` envelope. Unpublished values remain `null` or empty lists; no kickoff, market type, or probability is invented.

Selected fields from a snapshot captured on 2026-10-16 (prices are historical, not current quotes):

```json
{
  "recordKey": "polymarket:0xe0f7727d3f05d038618bc44f8cc2e14cefa02016b53805028e82070eb5c84a67",
  "eventSlug": "nba-mia-orl-2026-10-16",
  "question": "Heat vs. Magic",
  "sportsMarketType": "moneyline",
  "line": null,
  "outcomes": ["Heat", "Magic"],
  "outcomePrices": [0.415, 0.585],
  "liquidity": 51561.2906
}
```

`eventStartTime` is the reported kickoff when present; `eventListingTime` is when the event was listed. `canonical` retains conservative market/participant evidence: ambiguous or unsupported interpretations remain unknown or quarantined rather than being forced into a match.

`orderBooks` is `null` when disabled. When enabled it follows `clobTokenIds` order; each successful book contains bids, asks, timestamps, and reported trading increments. A failed token has a `tokenId` and sanitized `error`, while its market is retained. `raw` is `null` unless enabled.

The separate `OUTPUT` summary reports written records, event counts, coverage counters, warnings, and `succeeded`, `succeeded_empty`, `succeeded_partial`, or `failed`. Collection or validation failures publish no buffered markets. Book failures preserve markets and report a partial result. A dataset charge limit can also produce a partial result, including zero written records; this is not reported as a genuine empty query. Coverage counters describe every market considered during collection, not necessarily the rows ultimately written.

### FAQ

**What sports can I collect?** Use the default sports tag, another supported source tag, or exact event slugs. Market availability and published metadata vary by sport.

**Are all markets moneylines, spreads, or totals?** No. Keep `marketTypes` empty for all source types; use explicit values to restrict the result. Unknown source types are preserved, not guessed.

**Is this a trading service?** No. It collects snapshots; it does not place trades or guarantee game status, executable prices, settlement equivalence, or cross-book matches.

**What are the limits?** Up to 5,000 unique markets per run (`maxResults`) and up to 50 exact event slugs. Turning on order books makes runs slower.

### Price

See the Actor's Pricing tab on Apify for current rates.

For support, contact Apify support and include the Actor run ID.

# Actor input Schema

## `eventSlugs` (type: `array`):

Optional exact Polymarket event slugs. When supplied, tag and date paging are bypassed.

## `tagSlug` (type: `string`):

Source event tag used for market discovery, for example sports or nba.

## `marketTypes` (type: `array`):

Optional exact sportsMarketType values, such as moneyline, spreads or totals. Empty keeps every type.

## `activeOnly` (type: `boolean`):

Exclude explicitly inactive events and markets.

## `openOnly` (type: `boolean`):

Exclude closed events and markets.

## `liveOnly` (type: `boolean`):

Return only events explicitly marked live.

## `startDateMin` (type: `string`):

Optional inclusive ISO-8601 lower bound on eventListingTime, not game kickoff. Naive times mean UTC. Ignored for exact event slugs.

## `startDateMax` (type: `string`):

Optional inclusive ISO-8601 upper bound on eventListingTime, not game kickoff. Naive times mean UTC. Ignored for exact event slugs.

## `liquidityMin` (type: `number`):

Drop markets below this reported liquidity, or with unknown liquidity when a bound is supplied.

## `volumeMin` (type: `number`):

Drop markets below this reported lifetime volume, or with unknown volume when a bound is supplied.

## `pageSize` (type: `integer`):

Event discovery page size. Each event may contain multiple market records.

## `maxResults` (type: `integer`):

Global cap across all fetched events.

## `includeOrderBooks` (type: `boolean`):

Add order books for every outcome token. Failed tokens retain a sanitized error and do not discard the market.

## `orderBookConcurrency` (type: `integer`):

Maximum simultaneous order-book requests when includeOrderBooks is enabled. Requests stay paced by requestDelaySecs regardless of this limit.

## `includeRaw` (type: `boolean`):

Embed the original event and market objects for debugging.

## `requestDelaySecs` (type: `number`):

Polite pause between pages, slugs, or order-book requests.

## Actor input object example

```json
{
  "eventSlugs": [],
  "tagSlug": "sports",
  "marketTypes": [],
  "activeOnly": true,
  "openOnly": true,
  "liveOnly": false,
  "pageSize": 100,
  "maxResults": 500,
  "includeOrderBooks": false,
  "orderBookConcurrency": 4,
  "includeRaw": false,
  "requestDelaySecs": 0.1
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "eventSlugs": [],
    "tagSlug": "sports",
    "marketTypes": [],
    "activeOnly": true,
    "openOnly": true,
    "liveOnly": false,
    "startDateMin": "",
    "startDateMax": "",
    "liquidityMin": 0,
    "volumeMin": 0,
    "pageSize": 100,
    "maxResults": 500,
    "includeOrderBooks": false,
    "orderBookConcurrency": 4,
    "includeRaw": false,
    "requestDelaySecs": 0.1
};

// Run the Actor and wait for it to finish
const run = await client.actor("barefoot_grade/polymarket-sports").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "eventSlugs": [],
    "tagSlug": "sports",
    "marketTypes": [],
    "activeOnly": True,
    "openOnly": True,
    "liveOnly": False,
    "startDateMin": "",
    "startDateMax": "",
    "liquidityMin": 0,
    "volumeMin": 0,
    "pageSize": 100,
    "maxResults": 500,
    "includeOrderBooks": False,
    "orderBookConcurrency": 4,
    "includeRaw": False,
    "requestDelaySecs": 0.1,
}

# Run the Actor and wait for it to finish
run = client.actor("barefoot_grade/polymarket-sports").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "eventSlugs": [],
  "tagSlug": "sports",
  "marketTypes": [],
  "activeOnly": true,
  "openOnly": true,
  "liveOnly": false,
  "startDateMin": "",
  "startDateMax": "",
  "liquidityMin": 0,
  "volumeMin": 0,
  "pageSize": 100,
  "maxResults": 500,
  "includeOrderBooks": false,
  "orderBookConcurrency": 4,
  "includeRaw": false,
  "requestDelaySecs": 0.1
}' |
apify call barefoot_grade/polymarket-sports --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,barefoot_grade/polymarket-sports"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/u5kuWrdLNQRDfH5db/builds/Z4F01nI0k8ECIicSu/openapi.json
