# Polymarket Scraper — Odds, Volume & Liquidity API (`cleanrows/polymarket-markets-scraper`) Actor

Scrape Polymarket prediction markets with parsed odds, implied probability, bid/ask spread, volume and liquidity. Outcomes and prices come back as real arrays and numbers, not JSON-encoded strings.

- **URL**: https://apify.com/cleanrows/polymarket-markets-scraper.md
- **Developed by:** [Abhinav Gupta](https://apify.com/cleanrows) (community)
- **Categories:** Automation, Developer tools, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 market scrapeds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Scraper — odds, volume and liquidity in one clean schema

Scrape **Polymarket** prediction markets with the numbers already parsed: implied
probability, the favoured outcome, bid/ask spread, 24-hour and lifetime volume,
and resting liquidity.

### Why this one

Polymarket's API returns several fields as **JSON-encoded strings inside JSON**.
`outcomes` arrives as `'["Yes", "No"]'` and `outcomePrices` as
`'["0.0065", "0.9935"]'`. Prices and volumes arrive as strings too. Every buyer
ends up writing the same unwrapping code before they can do anything.

This does it once:

- **Real arrays and real numbers.** `outcomes` is an array, `outcomePrices` is an
  array of numbers, volumes are numbers you can sort on.
- **`impliedProbability`** — the Yes price as a percentage, which is the number
  most people actually want and no field gives you directly.
- **`topOutcome` and `topOutcomePrice`** — the favourite and its price, for *any*
  market. About a third of markets are not Yes/No (`Fritz vs Nakashima`), so a
  Yes-only field is blank for them. These are populated on every row.
- **A working `url`.** Built from the parent event slug, which the market object
  only carries in a nested array.
- **Stable columns.** Missing values are `null`, never absent, so CSV exports line
  up and downstream code does not break.

### Input

```json
{
  "status": "active",
  "searchQuery": "fed",
  "orderBy": "volume24hr",
  "minVolume": 1000,
  "minLiquidity": 0,
  "maxItems": 500
}
```

`status` is `active`, `closed` or `all`. `orderBy` is `volume24hr`, `volume`,
`liquidity` or `none`. `searchQuery` matches the question and the event title.

### Output

One row per market:

```json
{
  "marketId": "559651",
  "question": "Will the Fed decrease interest rates by 25 bps after the September meeting?",
  "url": "https://polymarket.com/event/fed-decision-in-september/fed-decrease-25-bps",
  "eventTitle": "Fed decision in September",
  "outcomes": ["Yes", "No"],
  "outcomePrices": [0.0105, 0.9895],
  "topOutcome": "No",
  "topOutcomePrice": 0.9895,
  "yesPrice": 0.0105,
  "noPrice": 0.9895,
  "impliedProbability": 1.05,
  "bestBid": 0.01, "bestAsk": 0.011, "spread": 0.001,
  "volumeTotal": 48211900.4, "volume24hr": 1458896.2, "liquidity": 402113.9,
  "startDate": "2026-07-30T00:00:00.000Z",
  "endDate": "2026-09-17T00:00:00.000Z",
  "active": true, "closed": false, "acceptingOrders": true,
  "conditionId": "0x7d0a...",
  "clobTokenIds": ["27146...", "33212..."]
}
```

`clobTokenIds` are included so you can go straight to the CLOB order book for a
specific outcome without a second lookup.

A `RUN_SUMMARY` record reports how many markets were scanned, matched and delivered.

### Who this is for

- **Traders and quants** tracking odds movement, spreads and liquidity
- **Researchers** studying prediction-market accuracy against real outcomes
- **Journalists and analysts** citing market-implied odds on elections, rates or sport
- **Arbitrage** against other venues, using bid/ask rather than last trade

### Notes

- Reads Polymarket's **public Gamma API**. No login, no cookies, no CAPTCHA
  solving, no proxies.
- Prices are point-in-time. Schedule the Actor if you want a series.
- `impliedProbability` is null for markets that are not Yes/No, by design. Use
  `topOutcome` and `topOutcomePrice` for those.

# Actor input Schema

## `status` (type: `string`):

Which markets to return. Active markets are open and still trading.

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

Keep only markets whose question or event title contains this text (case-insensitive). Leave empty for all.

## `orderBy` (type: `string`):

Sort order requested from Polymarket, highest first.

## `minVolume` (type: `integer`):

Drop markets below this lifetime volume. Useful for filtering out dormant markets.

## `minLiquidity` (type: `integer`):

Drop markets with less than this much resting liquidity.

## `tagId` (type: `integer`):

Restrict to one Polymarket tag (category). Leave empty for every category.

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

Stop after this many markets. 0 means no limit.

## Actor input object example

```json
{
  "status": "active",
  "searchQuery": "",
  "orderBy": "volume24hr",
  "minVolume": 0,
  "minLiquidity": 0,
  "maxItems": 500
}
```

# Actor output Schema

## `markets` (type: `string`):

One row per market: question, outcomes, prices, implied probability, spread, volume and liquidity.

## `runSummary` (type: `string`):

How many markets were scanned, matched the filters and were delivered.

# 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("cleanrows/polymarket-markets-scraper").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("cleanrows/polymarket-markets-scraper").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 '{}' |
apify call cleanrows/polymarket-markets-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/l8sYtrr9IrsZVmURI/builds/7VhDog5G44cy98he9/openapi.json
