# Polymarket Scraper: Live Odds, Results & Price History (`peccarvalho/polymarket-markets`) Actor

Live odds for every Polymarket prediction market from the official public API: prices, implied probability, volume, liquidity, 24h price moves, order books, resolved results and price history. No login, no proxies.

- **URL**: https://apify.com/peccarvalho/polymarket-markets.md
- **Developed by:** [Pedro Carvalho](https://apify.com/peccarvalho) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 market returneds

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 Scraper: Live Odds, Results & Price History

Get **live odds for any Polymarket prediction market** as clean JSON, CSV or Excel. It covers elections, crypto (Bitcoin, Ethereum), the Fed and the economy, sports, geopolitics, tech, pop culture and more.

Data comes from **Polymarket's official public APIs**. There's no login, no API key, no browser and no proxies, which is why runs are fast (usually a few seconds) and don't break when the website changes.

### What you get

For every market:

| Field | Example |
|---|---|
| `question`, `outcome` | "Will Lula win the 2026 Brazilian presidential election?", "Lula" |
| `eventTitle`, `eventSlug`, `tags` | "Brazil Presidential Election", `["Politics", "Brazil"]` |
| `impliedProbability` | `0.145`: the mid of the best bid and ask, or the Yes price if the book is thin |
| `outcomes`, `outcomePrices`, `yesPrice`, `noPrice` | `["Yes", "No"]`, `[0.145, 0.855]` |
| `bestBid`, `bestAsk`, `spread`, `lastTradePrice` | prices in dollars (0–1) |
| `priceChange24h`, `priceChange1w`, `priceChange1m` | `-0.23`: how much the odds moved |
| `volume`, `volume24h`, `volume1w`, `liquidity` | in dollars |
| `startDate`, `endDate`, `closedTime` | ISO timestamps |
| `status`, `result` | `resolved`, `"No"` for settled markets |
| `yesTokenId`, `noTokenId`, `conditionId` | IDs for Polymarket's trading API |
| `url` | a link to the market on polymarket.com |

**Optional extras:**

- **Price history** (`priceHistory`): the Yes price over the last hour, day, week, month or all time.
- **Order book** (`orderbook`): bids and asks with sizes, up to 100 levels deep.
- **Resolution rules** (`description`, `resolutionSource`).

### How to use it

**Search like the site does:** `keywords: ["bitcoin", "fed", "election"]`

**Whole topics:** `tags: ["politics", "crypto", "sports"]`

**Paste links:** `eventSlugs: ["https://polymarket.com/event/brazil-presidential-election"]` returns every outcome of that event. Use `marketSlugs` for single markets. Pair these with an Apify **schedule** to build a watchlist that updates every few minutes.

**Top markets right now:** leave everything empty and sort by 24h volume, total volume, liquidity, newest or ending soonest.

**Resolved markets for backtests:** `status: "resolved"` returns each market's winning outcome in `result`.

**Filters:**

- `minVolume`, `minVolume24h`, `minLiquidity`
- `minProbability` / `maxProbability` (e.g. only markets priced 5–95%)
- `closesWithinHours`

#### Example input

```json
{
  "keywords": ["bitcoin"],
  "status": "open",
  "minVolume24h": 10000,
  "includePriceHistory": true,
  "historyInterval": "1w",
  "maxItems": 100
}
```

### Pricing

You pay **per market returned**, and `maxItems` caps what a run can cost. Price history and order books are included at no extra charge. You also pay nothing for markets that your filters drop.

### Use cases

- **Traders and quants:** track odds, spreads and liquidity; spot big 24h moves; export history for backtests.
- **Researchers and journalists:** see what the crowd expects on elections, rates, wars or company events.
- **Cross-market arbitrage:** pair this with the [Kalshi Markets Scraper](https://apify.com/peccarvalho/kalshi-markets) to compare odds on the same event across both exchanges.
- **Dashboards and alerts:** schedule a run, then pipe the results to Google Sheets, Slack or a webhook with Apify integrations.

### FAQ

**Is this allowed?** Yes. It only reads Polymarket's public market data APIs, which Polymarket publishes for exactly this purpose. It doesn't log in or place orders.

**Why do odds look different from the site?** The site shows the midpoint when the spread is tight and the last trade otherwise. This scraper does the same, and gives you the raw bid, ask and last price so you can choose.

**Something's wrong or missing?** Open an issue on the Issues tab, and it'll be fixed quickly.

*Not affiliated with Polymarket. Market data is provided as-is and isn't financial advice.*

# Actor input Schema

## `keywords` (type: `array`):

Search Polymarket like the search box on the site, e.g. 'bitcoin', 'fed', 'trump', 'NBA'. Leave empty to list everything (sorted by the field below).

## `tags` (type: `array`):

Only events with these Polymarket tags, e.g. 'politics', 'crypto', 'sports', 'economy', 'tech', 'geopolitics', 'pop-culture'.

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

Every outcome of these events, e.g. https://polymarket.com/event/brazil-presidential-election or just 'brazil-presidential-election'.

## `marketSlugs` (type: `array`):

Exact markets to track, e.g. for a scheduled watchlist.

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

Resolved markets include the winning outcome in 'result', which is useful for backtests.

## `sortBy` (type: `string`):

Order when listing without keywords.

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

Skip markets that have traded less than this in total.

## `minVolume24h` (type: `integer`):

Skip markets that traded less than this in the last 24 hours.

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

Skip thin markets.

## `minProbability` (type: `string`):

0 to 1, e.g. 0.05. Skip markets priced below this.

## `maxProbability` (type: `string`):

0 to 1, e.g. 0.95. Skip markets priced above this.

## `closesWithinHours` (type: `integer`):

Only markets whose end date is within this many hours from now.

## `includePriceHistory` (type: `boolean`):

Adds 'priceHistory': the Yes price over time.

## `historyInterval` (type: `string`):

How far back the price history goes.

## `includeOrderbook` (type: `boolean`):

Adds 'orderbook' with the best bids and asks for the Yes side (open markets only).

## `orderbookDepth` (type: `integer`):

Price levels per side.

## `includeDescription` (type: `boolean`):

Adds the market's description and resolution source.

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

Stop after this many markets. You're charged per market, so this caps the run's cost.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin",
    "election"
  ],
  "status": "open",
  "sortBy": "volume24h",
  "includePriceHistory": false,
  "historyInterval": "1w",
  "includeOrderbook": false,
  "orderbookDepth": 10,
  "includeDescription": false,
  "maxItems": 200
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `allFields` (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 = {
    "keywords": [
        "bitcoin",
        "election"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("peccarvalho/polymarket-markets").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 = { "keywords": [
        "bitcoin",
        "election",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("peccarvalho/polymarket-markets").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 '{
  "keywords": [
    "bitcoin",
    "election"
  ]
}' |
apify call peccarvalho/polymarket-markets --silent --output-dataset

```

## MCP server setup

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

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/OwOEVsh9qBtKy6qSl/builds/gumldEoYPyAQXh5kT/openapi.json
