{
  "openapi": "3.1.0",
  "info": {
    "title": "Monday Diesel Data API",
    "version": "1.0.0",
    "description": "Free JSON for every number published on Monday Diesel (mondaydiesel.com): the DOE number, regions, spot, crude oil, cost per mile, price history. The Monday diesel number for people who get paid by the mile. No key needed. Credit Monday Diesel (mondaydiesel.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://mondaydiesel.com/api"
    }
  },
  "servers": [
    {
      "url": "https://mondaydiesel.com/api/v1"
    }
  ],
  "externalDocs": {
    "description": "Docs",
    "url": "https://mondaydiesel.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 Monday Diesel (14 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 9 headline numbers on the mondaydiesel.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": [
                "number",
                "region",
                "spot",
                "crude",
                "costpermile",
                "diesel-price-history"
              ]
            }
          },
          {
            "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)."
          }
        ]
      }
    }
  }
}
