{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket Scraper - Events, Odds & Trading Data",
    "description": "Extract Polymarket events, market prices, volume, liquidity, public comments and trading activity. Pay per delivered row plus a start fee. Unofficial and not affiliated with Polymarket.",
    "version": "0.1",
    "x-build-id": "nNWhiZvSGNUy2MqmB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~polymarket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-polymarket-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/lentic_clockss~polymarket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-polymarket-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/lentic_clockss~polymarket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-polymarket-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": {
          "mode": {
            "title": "Collection mode",
            "enum": [
              "auto",
              "events",
              "event",
              "markets",
              "search",
              "tags",
              "series",
              "sports",
              "teams",
              "comments",
              "categories",
              "clob_markets",
              "book",
              "leaderboard",
              "positions",
              "trades",
              "holders",
              "resolutions",
              "perps",
              "data_status"
            ],
            "type": "string",
            "description": "Auto selects a mode from the fields you fill. A chosen mode is kept when its required target is present; otherwise another compatible mode or the example search may be selected.",
            "default": "auto"
          },
          "locale": {
            "title": "Locale",
            "enum": [
              "en",
              "zh",
              "es",
              "de",
              "fr",
              "pt",
              "ru",
              "ko",
              "ja"
            ],
            "type": "string",
            "description": "Language code for supported titles and links: en, zh, es, de, fr, pt, ru, ko or ja. Availability varies; this does not select a country or translate your search words.",
            "default": "en"
          },
          "tagSlug": {
            "title": "Tag / category slug",
            "type": "string",
            "description": "Category tag for event lists, such as politics, crypto or sports. An unfamiliar tag is still tried and may produce a warning."
          },
          "tagSlugs": {
            "title": "Multiple tag slugs",
            "maxItems": 20,
            "type": "array",
            "description": "Collect events for each tag. Each tag gets its own maxItems row budget.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "seriesSlug": {
            "title": "Series slug",
            "type": "string",
            "description": "Series identifier for event lists or series mode, such as nfl. Series-scoped events use offset pagination."
          },
          "sport": {
            "title": "Sport code",
            "type": "string",
            "description": "Sport code, such as nba or ufc. Filters sports mode or supplies an event category when no tag is provided."
          },
          "league": {
            "title": "Teams league",
            "type": "string",
            "description": "League identifier for teams mode, such as nba or nfl. An unfamiliar league is still tried and may produce a warning."
          },
          "eventSlug": {
            "title": "Event slug",
            "type": "string",
            "description": "Event slug for event detail, comments or resolutions. Enter the slug, not the full URL."
          },
          "eventSlugs": {
            "title": "Event slugs (batch)",
            "maxItems": 50,
            "type": "array",
            "description": "Up to 50 event slugs for event detail, comments or resolutions. Each input has its own maxItems allowance.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          },
          "eventId": {
            "title": "Event ID",
            "type": "string",
            "description": "Polymarket event ID for event detail, comments or resolutions."
          },
          "eventIds": {
            "title": "Event IDs (batch)",
            "maxItems": 50,
            "type": "array",
            "description": "Up to 50 Polymarket event IDs for event detail, comments or resolutions. Each input has its own maxItems allowance.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Search text for search mode, e.g. bitcoin or election. With Auto mode, filling only this field runs a search."
          },
          "order": {
            "title": "Sort order field",
            "enum": [
              "volume24hr",
              "volume",
              "liquidity",
              "competitive",
              "startDate",
              "endDate"
            ],
            "type": "string",
            "description": "Sort field for event lists. Market lists do not apply this setting.",
            "default": "volume24hr"
          },
          "ascending": {
            "title": "Ascending sort",
            "type": "boolean",
            "description": "Use ascending order for event lists when true.",
            "default": false
          },
          "closed": {
            "title": "Closed filter",
            "type": "boolean",
            "description": "Request closed events or markets when true; false requests open entries where supported. Offset and series-scoped event lists do not enforce false.",
            "default": false
          },
          "active": {
            "title": "Active filter",
            "type": "boolean",
            "description": "Filter events and markets by active status when set. Leave unset for no activity filter."
          },
          "featured": {
            "title": "Featured filter",
            "type": "boolean",
            "description": "Filter event lists by featured status when set. Leave unset for no featured filter."
          },
          "paginationMode": {
            "title": "Events pagination",
            "enum": [
              "keyset",
              "offset"
            ],
            "type": "string",
            "description": "Paging method for event lists: keyset follows a cursor, while offset uses page positions. Series-scoped event lists always use offset.",
            "default": "keyset"
          },
          "maxItems": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum Dataset rows for each tag, event slug/ID, query, series, sport, league, or comments parent. Default 70; larger values are collected in parts of up to 70. All emitted row types share that input's budget. The run also stops at your maximum total charge; free Apify plans are capped at 200 rows per run and 10 runs.",
            "default": 70
          },
          "includeMarkets": {
            "title": "Include raw markets on events",
            "type": "boolean",
            "description": "Add nested rawMarkets to event rows when true. Leave false for compact events, or use flattenMarkets to deliver separately billed market rows.",
            "default": false
          },
          "tokenId": {
            "title": "CLOB token id",
            "type": "string",
            "description": "Required for book mode. Optional for holders."
          },
          "user": {
            "title": "Public wallet",
            "type": "string",
            "description": "Required for positions. Optional for trades and holders."
          },
          "conditionId": {
            "title": "Condition id",
            "type": "string",
            "description": "Optional filter for trades and holders."
          },
          "flattenMarkets": {
            "title": "Flatten markets to rows",
            "type": "boolean",
            "description": "In events or event mode, emit separately billed market rows instead of the parent event where markets exist. These rows share the input maxItems allowance.",
            "default": false
          },
          "expandEvents": {
            "title": "Expand sports/series to events",
            "type": "boolean",
            "description": "In sports or series mode, return associated events instead of catalog rows where available. Returned rows count toward maxItems.",
            "default": false
          },
          "enrichPriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Add available price history for the first token on supported event or market rows. Events and search enrich at most 10 rows per collection part, with at most 500 stored points per row.",
            "default": false
          },
          "enrichDetails": {
            "title": "Enrich commenter profiles (X handle)",
            "type": "boolean",
            "description": "Add published profile details, including an X handle when available, to comment rows. Enabled by default; this does not add separately billed rows.",
            "default": true
          },
          "priceHistoryDays": {
            "title": "Price history days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Number of days to request when price-history enrichment is enabled, from 1 to 90.",
            "default": 7
          },
          "getPositions": {
            "title": "Comments: get positions",
            "type": "boolean",
            "description": "Request position information attached to public comments. This adds fields to comment rows rather than separate position rows.",
            "default": false
          },
          "holdersOnly": {
            "title": "Comments: holders only",
            "type": "boolean",
            "description": "In comments mode, request comments from holders only.",
            "default": false
          },
          "featuredTagsOnly": {
            "title": "Featured/nav tags only",
            "type": "boolean",
            "description": "In tags mode, keep tags marked as featured or included in the known navigation categories.",
            "default": false
          },
          "parentEntityType": {
            "title": "Comments parent type",
            "type": "string",
            "description": "Comments parent type: Event, Series, or PerpsAsset.",
            "default": "Event"
          },
          "parentEntityId": {
            "title": "Comments parent id",
            "type": "string",
            "description": "Parent entity id for comments mode."
          },
          "workerBaseUrl": {
            "title": "Developer test setting",
            "type": "string",
            "description": "Leave empty. Used only by the developer for testing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}