{
  "openapi": "3.0.1",
  "info": {
    "title": "Yahoo Finance Options Chain Scraper",
    "description": "Collect Yahoo Finance option contracts with expiration dates, strikes, bid/ask, volume, open interest and implied volatility. Filter calls and puts and keep the underlying price with each row.",
    "version": "0.1",
    "x-build-id": "uLEcDIUX5HF5VMApv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~yahoo-options-chain/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-yahoo-options-chain",
        "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/s-r~yahoo-options-chain/runs": {
      "post": {
        "operationId": "runs-sync-s-r-yahoo-options-chain",
        "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/s-r~yahoo-options-chain/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-yahoo-options-chain",
        "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",
        "required": [
          "tickers"
        ],
        "properties": {
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Yahoo Finance symbols, as an array or comma-separated text. US-listed stocks, ETFs and indices are supported.",
            "items": {
              "type": "string"
            }
          },
          "expirations": {
            "title": "Expirations",
            "enum": [
              "nearest",
              "next_n",
              "all",
              "dates"
            ],
            "type": "string",
            "description": "Select the nearest expiration, the next N, all expirations, or explicit dates.",
            "default": "nearest"
          },
          "max_expirations": {
            "title": "Max expirations",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of nearest expirations when expirations is next_n.",
            "default": 1
          },
          "expiration_dates": {
            "title": "Expiration dates",
            "type": "array",
            "description": "Explicit UTC expiration dates when expirations is dates. Unlisted dates produce warnings.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "min_days_to_expiration": {
            "title": "Min days to expiration",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "Minimum days until expiration, inclusive, using the initial run date in UTC."
          },
          "max_days_to_expiration": {
            "title": "Max days to expiration",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "Maximum days until expiration, inclusive, using the initial run date in UTC."
          },
          "contract_type": {
            "title": "Contract type",
            "enum": [
              "both",
              "call",
              "put"
            ],
            "type": "string",
            "description": "Return both calls and puts, or only the selected type.",
            "default": "both"
          },
          "min_strike": {
            "title": "Min strike",
            "minimum": 0,
            "type": "number",
            "description": "Minimum strike price, inclusive; also sent to Yahoo to reduce response size."
          },
          "max_strike": {
            "title": "Max strike",
            "minimum": 0,
            "type": "number",
            "description": "Maximum strike price, inclusive; also sent to Yahoo to reduce response size."
          },
          "moneyness": {
            "title": "Moneyness",
            "enum": [
              "all",
              "in_the_money",
              "out_of_the_money"
            ],
            "type": "string",
            "description": "Filter using the source in-the-money flag.",
            "default": "all"
          },
          "strike_window_percent": {
            "title": "Strike window percent",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Keep strikes within this percentage above or below the underlying market price. Requires an available underlying price."
          },
          "max_results": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Total maximum number of delivered contracts across all tickers and cursor pages.",
            "default": 1000
          },
          "cursor": {
            "title": "Cursor",
            "maxLength": 8000,
            "type": "string",
            "description": "Opaque continuation token returned as next_cursor. Keep all other input fields identical. Valid for at most two UTC days."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}