{
  "openapi": "3.0.1",
  "info": {
    "title": "Horse Racing Pulse",
    "description": "Live PMU horse-racing odds (French tracks plus foreign tracks PMU takes bets on) for races still open to betting, with 19 source-side filters (country, racecourse, discipline, distance, going, odds...). Flags implied-probability steamers and drifters between runs.",
    "version": "0.3",
    "x-build-id": "XabUwgqsSaadd4rbJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/0xgollum~horse-racing-pulse/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-0xgollum-horse-racing-pulse",
        "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/0xgollum~horse-racing-pulse/runs": {
      "post": {
        "operationId": "runs-sync-0xgollum-horse-racing-pulse",
        "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/0xgollum~horse-racing-pulse/run-sync": {
      "post": {
        "operationId": "run-sync-0xgollum-horse-racing-pulse",
        "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": {
          "max_races": {
            "title": "Max active races",
            "type": "integer",
            "description": "How many soonest-starting races still open for betting to scan per run.",
            "default": 20
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Only these countries. PMU 3-letter codes: FRA, GBR, IRL, SWE, ESP, HKG, USA... Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "meetings": {
            "title": "Racecourses",
            "type": "array",
            "description": "Only these racecourses, e.g. CHANTILLY, LONGCHAMP, VINCENNES, ASCOT. Partial and case/accent-insensitive (LONGCHAMP matches PARISLONGCHAMP). Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "disciplines": {
            "title": "Disciplines",
            "type": "array",
            "description": "PLAT (flat), ATTELE (harness trot), MONTE (ridden trot), HAIE (hurdles), STEEPLECHASE, CROSS. English also accepted: FLAT, HURDLE, CHASE, TROT. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Race categories",
            "type": "array",
            "description": "e.g. HANDICAP (matches every handicap variant), COURSE_A_CONDITIONS, A_RECLAMER (claimers), GROUPE_I / GROUPE_II / GROUPE_III, AMATEURS, APPRENTIS, AUTOSTART, EUROPEENNE, INTERNATIONALE, NATIONALE. A word matches any category containing it; GROUPE_I does not match GROUPE_II. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "surfaces": {
            "title": "Surfaces",
            "type": "array",
            "description": "HERBE (turf; GAZON/TURF accepted), PSF (all-weather), SABLE (sand/dirt), POUZZOLANE. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "going": {
            "title": "Going (ground)",
            "type": "array",
            "description": "Official going, e.g. Bon, Bon souple, Souple, Très souple, Lourd, Léger, Bon léger, PSF RAPIDE, PSF STANDARD (case/accent-insensitive, exact label). Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "age_conditions": {
            "title": "Age conditions",
            "type": "array",
            "description": "e.g. DEUX_ANS, TROIS_ANS, TROIS_ANS_ET_PLUS, QUATRE_ANS, QUATRE_ANS_ET_PLUS, CINQ_ANS_ET_PLUS. Exact match. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sex_conditions": {
            "title": "Sex conditions",
            "type": "array",
            "description": "TOUS_CHEVAUX, FEMELLES (fillies/mares), MALES, MALES_ET_HONGRES, FEMELLES_ET_MALES. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "track_directions": {
            "title": "Track direction",
            "type": "array",
            "description": "CORDE_DROITE (right-handed), CORDE_GAUCHE (left-handed), LIGNE_DROITE (straight). Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "min_distance_m": {
            "title": "Min distance (m)",
            "minimum": 0,
            "type": "integer",
            "description": "Only races of at least this distance, in metres (1 furlong ≈ 201 m)."
          },
          "max_distance_m": {
            "title": "Max distance (m)",
            "minimum": 0,
            "type": "integer",
            "description": "Only races up to this distance, in metres."
          },
          "min_prize_eur": {
            "title": "Min prize money (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Only races whose total prize money is at least this amount."
          },
          "max_prize_eur": {
            "title": "Max prize money (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Only races whose total prize money is at most this amount."
          },
          "min_runners": {
            "title": "Min runners",
            "minimum": 0,
            "type": "integer",
            "description": "Skip small fields: only races with at least this many declared runners."
          },
          "max_runners": {
            "title": "Max runners",
            "minimum": 0,
            "type": "integer",
            "description": "Only races with at most this many declared runners."
          },
          "start_after": {
            "title": "Start after (HH:MM)",
            "pattern": "^$|^([01]?\\d|2[0-3])[:hH][0-5]\\d$",
            "type": "string",
            "description": "Only races starting at or after this time (see filter_timezone), e.g. 13:30."
          },
          "start_before": {
            "title": "Start before (HH:MM)",
            "pattern": "^$|^([01]?\\d|2[0-3])[:hH][0-5]\\d$",
            "type": "string",
            "description": "Only races starting at or before this time, e.g. 18:00. A window across midnight works (22:00 → 02:00)."
          },
          "filter_timezone": {
            "title": "Timezone for start times",
            "type": "string",
            "description": "IANA timezone for start_after/start_before, e.g. Europe/Paris (default), Europe/London, Asia/Tokyo."
          },
          "min_odds": {
            "title": "Min odds",
            "minimum": 1,
            "type": "number",
            "description": "Only horses currently at these decimal odds or longer, e.g. 5 to skip short favourites. Applied to every row type."
          },
          "max_odds": {
            "title": "Max odds",
            "minimum": 1,
            "type": "number",
            "description": "Only horses currently at these decimal odds or shorter, e.g. 20 to skip long shots. Applied to every row type."
          },
          "movement_threshold_pct": {
            "title": "Movement threshold (percentage points)",
            "type": "number",
            "description": "Minimum implied-probability change (in percentage points) between runs to fire a steamer/drifter signal. Default 5.",
            "default": 5
          },
          "movement_relative_pct": {
            "title": "Relative movement threshold (%)",
            "minimum": 0,
            "maximum": 500,
            "type": "number",
            "description": "Also fire a signal when an outcome's implied probability moves by at least this percentage of its previous value, whatever the absolute move — this is what catches an outsider steaming (50/1 -> 20/1 is only +3 points but +150 %). Set 0 to disable and keep the absolute rule only.",
            "default": 30
          },
          "only_signals": {
            "title": "Only output signals",
            "type": "boolean",
            "description": "If true, skip snapshot rows and only push steamer/drifter signal rows (and form patterns, if enabled).",
            "default": false
          },
          "include_form_history": {
            "title": "Include hidden form patterns (NEW)",
            "type": "boolean",
            "description": "If true, also flag hidden form patterns per horse: debutant, winless streak (10+ starts, 0 wins), jockey/driver change, and significant year-over-year earnings swings. Off by default — existing behavior is unchanged unless you turn this on.",
            "default": false
          },
          "max_results": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum rows returned per run. The free preview is capped at 15 — raise this once you need the full feed.",
            "default": 15
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}