{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Real-Time Data — Live Market Intel",
    "description": "Live Polymarket prediction-market intelligence: market search, event details, live trade tape, wallet activity, open positions, and trader profiles. Structured JSON streams to your dataset in real time.",
    "version": "0.0",
    "x-build-id": "uVG9xul7MmLbzhE5Q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/b2b_leads~Polymarket-Real-Time-Data-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-b2b_leads-Polymarket-Real-Time-Data-Scraper",
        "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/b2b_leads~Polymarket-Real-Time-Data-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-b2b_leads-Polymarket-Real-Time-Data-Scraper",
        "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/b2b_leads~Polymarket-Real-Time-Data-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-b2b_leads-Polymarket-Real-Time-Data-Scraper",
        "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",
        "properties": {
          "enableMarketSearch": {
            "title": "Market Search",
            "type": "boolean",
            "description": "Live search across Polymarket prediction markets — crypto prices, elections, sports, Fed decisions, culture. On by default and prefilled so you can click Start and get results in seconds.",
            "default": true
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "One or more search terms, e.g. \"bitcoin\", \"fed rate\", \"super bowl\". Required when Market Search is on.",
            "default": [
              "bitcoin",
              "fed rate decision",
              "super bowl"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchMaxResults": {
            "title": "Max markets per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum markets to return for each query (1–100). Default 10 — perfect for instant demo runs.",
            "default": 10
          },
          "searchIncludeClosed": {
            "title": "Include closed / resolved markets",
            "type": "boolean",
            "description": "When off (default), only live tradeable markets are returned. Turn on for backtests and resolved-outcome research.",
            "default": false
          },
          "searchFetchFullDetails": {
            "title": "Enrich with full market details",
            "type": "boolean",
            "description": "When on, each search result stays ONE row (featureType market_search, detailsFetched=true) but is enriched with outcomes, prices, volume, liquidity, and event context. Adds a little extra time per market. When off, you get fast search cards with question, prices, and volume. Every discovered market is always saved — never filtered out.",
            "default": false
          },
          "enableMarketDetails": {
            "title": "Market / Event Details",
            "type": "boolean",
            "description": "Full record for specific Polymarket markets or events by slug, condition ID, or URL.",
            "default": false
          },
          "marketSlugs": {
            "title": "Market / event slugs (optional)",
            "type": "array",
            "description": "Polymarket slugs, e.g. \"bitcoin-above-on-february-23\", \"will-trump-win-2028\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "conditionIds": {
            "title": "Condition IDs (optional)",
            "type": "array",
            "description": "Hex condition IDs (0x...) shared by Market Details and Live Trades. Live Trades may be left empty when Market Search is on — it then reuses the markets just discovered.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "marketUrls": {
            "title": "Market / event URLs (optional)",
            "type": "array",
            "description": "Full Polymarket URLs (https://polymarket.com/event/... or /market/...).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeOrderBook": {
            "title": "Include live order-book snapshot",
            "type": "boolean",
            "description": "Adds best bid/ask depth per outcome on Market Details rows. Best-effort: unavailable for closed markets, which still return full Gamma fields.",
            "default": false
          },
          "enableMarketTrades": {
            "title": "Live Market Trades",
            "type": "boolean",
            "description": "Recent tape per market — side, size, price, outcome, trader, timestamp. Essential for flow and whale-watch bots.",
            "default": false
          },
          "tradesMaxPerMarket": {
            "title": "Max trades per market",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum recent trades to collect per market (1–200).",
            "default": 30
          },
          "enableWalletActivity": {
            "title": "Wallet Activity",
            "type": "boolean",
            "description": "Full trade history per wallet — buys, sells, redeems with size, price, and market context. Score real traders, not leaderboards.",
            "default": false
          },
          "walletAddresses": {
            "title": "Wallet addresses",
            "type": "array",
            "description": "Ethereum wallet addresses (0x...). Shared by Wallet Activity, Open Positions, and Trader Profile.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "activityMaxPerWallet": {
            "title": "Max activity rows per wallet",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum activity rows to collect per wallet (1–500).",
            "default": 50
          },
          "enableWalletPositions": {
            "title": "Wallet Open Positions",
            "type": "boolean",
            "description": "Live open positions per wallet — current value, average entry, unrealized PnL. Uses the same walletAddresses list.",
            "default": false
          },
          "positionsMaxPerWallet": {
            "title": "Max positions per wallet",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum open positions to collect per wallet (1–200).",
            "default": 50
          },
          "enableWalletProfile": {
            "title": "Trader Profile",
            "type": "boolean",
            "description": "Public trader identity: pseudonym, volume, rank signals, and account context. Uses the same walletAddresses list.",
            "default": false
          },
          "enableScrapeByUrl": {
            "title": "Scrape By URL",
            "type": "boolean",
            "description": "Paste any Polymarket URL — event, market, or trader profile page.",
            "default": false
          },
          "scrapeUrls": {
            "title": "Polymarket URLs",
            "type": "array",
            "description": "Any Polymarket event, market, or profile URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. Every record is always saved to the run dataset — this webhook is an ADDITIONAL real-time push. Each new row is also POSTed to this URL (Slack, Discord, Zapier, Make, n8n, custom trading bot).",
            "default": ""
          },
          "webhookFormat": {
            "title": "Webhook format",
            "enum": [
              "json",
              "slack"
            ],
            "type": "string",
            "description": "json = full record object; slack = Slack-friendly message payload.",
            "default": "json"
          },
          "proxyConfiguration": {
            "title": "Proxy settings",
            "type": "object",
            "description": "Residential proxy recommended for reliable results at scale.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}