{
  "openapi": "3.1.0",
  "info": {
    "title": "The Scramble Data API",
    "version": "1.0.0",
    "description": "Free JSON for every number published on The Scramble (the-scramble.com): national board, New York, cage-free, egg products, inventory, cold storage, HPAI tracker, retail prices, price history, US production. The shell-egg market in one screen. No key needed. Credit The Scramble (the-scramble.com) with a visible link to the page the figure came from; every record carries its page_url.",
    "license": {
      "name": "Free to use with attribution",
      "url": "https://the-scramble.com/api"
    }
  },
  "servers": [
    {
      "url": "https://the-scramble.com/api/v1"
    }
  ],
  "externalDocs": {
    "description": "Docs",
    "url": "https://the-scramble.com/api"
  },
  "paths": {
    "/index.json": {
      "get": {
        "operationId": "getIndex",
        "summary": "API index",
        "description": "What this API is, its license and attribution, the sections it covers, and every endpoint.",
        "responses": {
          "200": {
            "description": "JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/latest.json": {
      "get": {
        "operationId": "getLatest",
        "summary": "Latest readings",
        "description": "The newest reading of every data page on The Scramble (11 series): the headline value as the site shows it, the newest point of each charted line with its date, whether it is current, and links to its page and full history.",
        "responses": {
          "200": {
            "description": "JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/stats.json": {
      "get": {
        "operationId": "getStats",
        "summary": "Key statistics",
        "description": "The 16 headline numbers on the the-scramble.com/stats page, each as a quotable sentence with its data date and a ready-made citation.",
        "responses": {
          "200": {
            "description": "JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/series/{section}/{slug}.json": {
      "get": {
        "operationId": "getSeries",
        "summary": "One series, full history",
        "description": "Everything behind one data page: every charted point (date + value), the historical band where the page draws one, the page's tables exactly as shown, its source and citation. Find each series_url in latest.json.",
        "responses": {
          "200": {
            "description": "JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "section",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "national",
                "region",
                "cagefree",
                "products",
                "inventory",
                "coldstorage",
                "hpai",
                "retail-egg-prices",
                "egg-price-history",
                "us-egg-production"
              ]
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The page slug; every valid section/slug pair is listed in latest.json (id field)."
          }
        ]
      }
    }
  }
}
