{
  "openapi": "3.0.1",
  "info": {
    "title": "UltraSignup Race Scraper",
    "description": "Track UltraSignup trail and ultramarathon races worldwide, with spots remaining, waitlist counts, sold-out status and upcoming price changes for every distance, and get alerted only when something changes.",
    "version": "0.0",
    "x-build-id": "XpPpRJG7k4C81l5RI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hypebridge~ultrasignup-race-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hypebridge-ultrasignup-race-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/hypebridge~ultrasignup-race-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hypebridge-ultrasignup-race-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/hypebridge~ultrasignup-race-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hypebridge-ultrasignup-race-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste UltraSignup URLs: the event search page (all upcoming races), an organizer page (groups.aspx?gid=…), or specific race pages (register, waitlist, entrants or results URLs). Leave empty to scrape the whole open-registration catalog. Direct race URLs always return full registration, waitlist and price detail.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxRaces": {
            "title": "Max races",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of races to process across all start URLs, soonest first. In change-tracking mode this counts races checked, not races returned.",
            "default": 100
          },
          "getRaceDetails": {
            "title": "Get registration details",
            "type": "boolean",
            "description": "Visit each race's registration page to add per-distance spots remaining, fill percentage, sold-out and waitlist size, current and next price, organizer, website and social links. Off: basic catalog fields only (cheaper, faster).",
            "default": false
          },
          "registrationStatus": {
            "title": "Registration filter",
            "enum": [
              "open",
              "all-upcoming"
            ],
            "type": "string",
            "description": "Applies to the search-page catalog. 'Open' returns races you can register for or join a waitlist for (including sold-out races with a waitlist); 'All upcoming' also returns closed and not-yet-open races dated up to 2030.",
            "default": "open"
          },
          "stateCodes": {
            "title": "State / province codes",
            "maxItems": 60,
            "uniqueItems": true,
            "type": "array",
            "description": "Only keep races whose region code (as UltraSignup lists it) is in this list, e.g. CA, TX, BC. Races outside the US and Canada usually have no code; they are only returned when this list is empty. Use 2 or 3 letters, e.g. TX or BC.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2,3}$"
            },
            "default": []
          },
          "dateFrom": {
            "title": "Races from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Earliest race date (YYYY-MM-DD). Defaults to today."
          },
          "dateTo": {
            "title": "Races until",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Latest race date (YYYY-MM-DD)."
          },
          "entrantCounts": {
            "title": "Include registered-entrant counts",
            "type": "boolean",
            "description": "Adds 'entrantCount' per distance. Requires registration details. Each distance costs an extra page request (up to about 0.6 MB for large races), so leave off unless you need it. Runner names are never collected.",
            "default": false
          },
          "changeTracking": {
            "title": "Change tracking",
            "enum": [
              "off",
              "annotate",
              "only-changes"
            ],
            "type": "string",
            "description": "Compare each race with its snapshot from your previous run and add 'changeStatus' and 'changes'. 'Annotate' returns every race; 'Only changes' returns just races whose spots, sold-out state, waitlist size, price or registration status changed. The first run has no baseline and returns everything marked 'baseline'. Turns on registration details automatically.",
            "default": "off"
          },
          "snapshotName": {
            "title": "Snapshot name",
            "pattern": "^[a-z0-9-]{1,40}$",
            "type": "string",
            "description": "Label for the stored snapshot used by change tracking. Use different names to keep independent monitors (for example one per region). Lowercase letters, digits and hyphens.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Parallel registration/waitlist page requests. UltraSignup slows down above this range; the default is the measured sweet spot.",
            "default": 5
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Log per-request details and save the HTML of pages that fail to parse to the key-value store (capped at 10 files).",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}