# Polymarket API no limit | Scraper/Screener |  API V3 (`yellowchimp/polymarket`) Actor

API for Agentic AI on Polymarket. Automate data extraction for markets, events, and price feeds. Features high-speed crawling and clean JSON formatting designed for developers building trading bots and market analysis tools. Structured JSON and Apify Dataset. Awarded best 2026.

- **URL**: https://apify.com/yellowchimp/polymarket.md
- **Developed by:** [INFO-YC Studios](https://apify.com/yellowchimp) (community)
- **Categories:** Developer tools, Integrations, News
- **Stats:** 18 total users, 2 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.99 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

🔮 Polymarket Market Data Scraper - Flexible API Access (✅ 04/2026 Upgrade)

QUICK GUIDE

This Actor is a powerful tool for fetching data from the Polymarket API. It offers three primary modes: fetching a single market by ID or Slug, searching for markets based on a query, or performing a comprehensive, paginated crawl of all markets.

All results are pushed to the Dataset as individual JSON records.

#### Input Examples

You must provide **only one** of the primary fetch parameters (`marketId`, `marketSlug`, or `searchQuery`).  
If none are provided, the Actor defaults to a **Full Market Crawl**.

| Mode | Input JSON Example |
|------|-------------------|
| Market Search (e.g., for "SpaceX" including closed markets) | `{ "searchQuery": "SpaceX" }` |
| Full Market Crawl (Default) | `{ "batchSize": 100, "fetchClosedMarkets": false, "sortAscending": true }` |
| Single Market by ID | `{ "marketId": "98374" }` |

### ⚙️ Input Configuration

| Field Name | Type | Default | Description | Fetch Mode |
|-----------|------|---------|-------------|-----------|
| marketId | String | null | Fetches a single specific market using its unique numerical ID (e.g., "98374"). Takes highest priority. | Single Market by ID |
| marketSlug | String | null | Fetches a single specific market using its URL slug (e.g., "spacex-ipo-closing-market-cap"). Takes second priority. | Single Market by Slug |
| searchQuery | String | null | A keyword or phrase (e.g., "Trump", "SpaceX") to search for markets using the `/public-search` endpoint. Results are correctly saved to the Dataset. | Market Search |
| batchSize | Number | 50 | The number of markets to fetch per API call when searching or performing a full crawl. | Search & Full Crawl |
| fetchClosedMarkets | Boolean | false | If true, the scraper will include markets that are already closed or resolved. | Search & Full Crawl |
| sortAscending | Boolean | false | Determines the order of results when performing a full crawl (false = descending by market ID). | Full Crawl Only |

### 🚀 Fetch Modes & Priority

The Actor executes **exactly one** of the following modes, checked in this order:

1. **Single Market by ID (`marketId`)**  
   Endpoint: `/markets/{marketId}`  
   Behavior: Fetches a single JSON object for the specified market.

2. **Single Market by Slug (`marketSlug`)**  
   Endpoint: `/markets/slug/{marketSlug}`  
   Behavior: Fetches a single JSON object for the specified market.

3. **Market Search (`searchQuery`)**  
   Endpoint: `/public-search`  
   Behavior: Searches for markets matching the query. Results are extracted from the `events` array and individually saved to the Dataset.

4. **Full Market Crawl (Default)**  
   Endpoint: `/events`  
   Behavior: Paginates through all available markets when no specific fetch parameters are provided.

### 💾 Output and Data Structure

All fetched markets are stored in the Dataset using:

`Actor.push_data(data)`

The output format mirrors the Polymarket API response:

```json
{
  "id": "98374",
  "ticker": "spacex-ipo-closing-market-cap",
  "slug": "spacex-ipo-closing-market-cap",
  "title": "SpaceX IPO Closing Market Cap",
  "description": "This market will resolve based on SpaceX's market capitalization...",
  "resolutionSource": "",
  "startDate": "2025-12-06T01:34:37.744882Z",
  "endDate": "2027-12-31T00:00:00Z",
  "liquidity": 144425.35661,
  "volume": 298198.233994,
  "markets": [
    {
      "id": "842087",
      "question": "Will SpaceX's market cap be between $500B and $600B...",
      "outcomePrices": ["0.015", "0.985"],
      "volume": "28286.541268",
      "liquidityNum": 16074.91576
    }
  ]
}
````

#### 💡 Use Cases

- Quantitative Market Analysis: Collect large datasets for backtesting strategies.

- Forecasting & Trends: Track prediction markets for politics, tech, and economics.

- Archiving: Build historical datasets using Full Market Crawl with fetchClosedMarkets: true.

- Industry Monitoring: Track new markets for specific industries or technologies via searchQuery.

# Actor input Schema

## `marketId` (type: `string`):

The unique ID (UUID) of a specific market to fetch (e.g., '140e70a0-0010-47b2-bd77-2e11d6b039f6'). If this is provided, all other fetch/search options are ignored.

## `marketSlug` (type: `string`):

The human-readable slug of a specific market to fetch (e.g., 'will-bitcoin-price-be-over-50k-on-date'). If this is provided, all other fetch/search options are ignored.

## `searchQuery` (type: `string`):

A keyword or phrase to search for. If provided, the dedicated /public-search endpoint is used, where Batch Size is mapped to 'limit\_per\_type' and Fetch Closed Markets is mapped to 'keep\_closed\_markets'.

## `maxItems` (type: `integer`):

Maximum number of items to scrape globally. Set to 0 for unlimited.

## `batchSize` (type: `integer`):

The number of items to fetch per API request. This is used as the 'limit' for /events and 'limit\_per\_type' for /public-search. Default is 50.

## `fetchClosedMarkets` (type: `boolean`):

Set to true to fetch all markets, including closed/resolved ones. Mapped to 'closed' for /events and 'keep\_closed\_markets=1' for /public-search. Default is false.

## `sortAscending` (type: `boolean`):

If true, results are sorted ascending. Mapped to 'ascending' for both /events and /public-search.

## Actor input object example

```json
{
  "marketId": "",
  "marketSlug": "",
  "searchQuery": "",
  "maxItems": 0,
  "batchSize": 50,
  "fetchClosedMarkets": false,
  "sortAscending": false
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("yellowchimp/polymarket").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 = {}

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

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

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

```

## CLI example

```bash
echo '{}' |
apify call yellowchimp/polymarket --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=yellowchimp/polymarket",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Polymarket API no limit | Scraper/Screener |  API V3",
        "description": "API for Agentic AI on Polymarket. Automate data extraction for markets, events, and price feeds. Features high-speed crawling and clean JSON formatting designed for developers building trading bots and market analysis tools. Structured JSON and Apify Dataset. Awarded best 2026.",
        "version": "0.0",
        "x-build-id": "qkpu78JwztUqReYfU"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/yellowchimp~polymarket/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-yellowchimp-polymarket",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/yellowchimp~polymarket/runs": {
            "post": {
                "operationId": "runs-sync-yellowchimp-polymarket",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/yellowchimp~polymarket/run-sync": {
            "post": {
                "operationId": "run-sync-yellowchimp-polymarket",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "batchSize",
                    "fetchClosedMarkets",
                    "sortAscending"
                ],
                "properties": {
                    "marketId": {
                        "title": "Market ID (Specific Market Lookup)",
                        "type": "string",
                        "description": "The unique ID (UUID) of a specific market to fetch (e.g., '140e70a0-0010-47b2-bd77-2e11d6b039f6'). If this is provided, all other fetch/search options are ignored.",
                        "default": ""
                    },
                    "marketSlug": {
                        "title": "Market Slug (Specific Market Lookup)",
                        "type": "string",
                        "description": "The human-readable slug of a specific market to fetch (e.g., 'will-bitcoin-price-be-over-50k-on-date'). If this is provided, all other fetch/search options are ignored.",
                        "default": ""
                    },
                    "searchQuery": {
                        "title": "Search Query (Optional)",
                        "type": "string",
                        "description": "A keyword or phrase to search for. If provided, the dedicated /public-search endpoint is used, where Batch Size is mapped to 'limit_per_type' and Fetch Closed Markets is mapped to 'keep_closed_markets'.",
                        "default": ""
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of items to scrape globally. Set to 0 for unlimited.",
                        "default": 0
                    },
                    "batchSize": {
                        "title": "Batch Size",
                        "type": "integer",
                        "description": "The number of items to fetch per API request. This is used as the 'limit' for /events and 'limit_per_type' for /public-search. Default is 50.",
                        "default": 50
                    },
                    "fetchClosedMarkets": {
                        "title": "Fetch Closed Markets",
                        "type": "boolean",
                        "description": "Set to true to fetch all markets, including closed/resolved ones. Mapped to 'closed' for /events and 'keep_closed_markets=1' for /public-search. Default is false.",
                        "default": false
                    },
                    "sortAscending": {
                        "title": "Sort Ascending",
                        "type": "boolean",
                        "description": "If true, results are sorted ascending. Mapped to 'ascending' for both /events and /public-search.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
