{
  "openapi": "3.0.1",
  "info": {
    "title": "North America Fuel Prices: Mexico by Station, US & Canada",
    "description": "⛽ Find the cheapest gas in Mexico and compare it with the US and Canada. Official daily prices from 13,800 Mexican stations, plus EIA averages for US regions, states and cities and Statistics Canada averages for 18 cities, all in USD per litre. Search near any point or track price changes.",
    "version": "0.2",
    "x-build-id": "TeQymPXUKfbLlOM3D"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yodeling_november~north-america-fuel-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yodeling_november-north-america-fuel-prices",
        "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/yodeling_november~north-america-fuel-prices/runs": {
      "post": {
        "operationId": "runs-sync-yodeling_november-north-america-fuel-prices",
        "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/yodeling_november~north-america-fuel-prices/run-sync": {
      "post": {
        "operationId": "run-sync-yodeling_november-north-america-fuel-prices",
        "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": {
          "stations": {
            "title": "Mexico station prices",
            "type": "boolean",
            "description": "Include the prices at each Mexican gas station (CNE). Turn off to get only the averages below.",
            "default": true
          },
          "fuelTypes": {
            "title": "Fuel types",
            "type": "array",
            "description": "Regular and premium gasoline and diesel. Midgrade exists only in the US averages.",
            "items": {
              "type": "string",
              "enum": [
                "regular",
                "midgrade",
                "premium",
                "diesel"
              ],
              "enumTitles": [
                "Regular gasoline",
                "Midgrade gasoline (US only)",
                "Premium gasoline",
                "Diesel"
              ]
            },
            "default": [
              "regular",
              "diesel"
            ]
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Optional. Keep only stations in these states. The state is worked out from each station's coordinates.",
            "items": {
              "type": "string",
              "enum": [
                "MX-AGU",
                "MX-BCN",
                "MX-BCS",
                "MX-CAM",
                "MX-CHP",
                "MX-CHH",
                "MX-CMX",
                "MX-COA",
                "MX-COL",
                "MX-DUR",
                "MX-GUA",
                "MX-GRO",
                "MX-HID",
                "MX-JAL",
                "MX-MIC",
                "MX-MOR",
                "MX-MEX",
                "MX-NAY",
                "MX-NLE",
                "MX-OAX",
                "MX-PUE",
                "MX-QUE",
                "MX-ROO",
                "MX-SLP",
                "MX-SIN",
                "MX-SON",
                "MX-TAB",
                "MX-TAM",
                "MX-TLA",
                "MX-VER",
                "MX-YUC",
                "MX-ZAC"
              ],
              "enumTitles": [
                "Aguascalientes",
                "Baja California",
                "Baja California Sur",
                "Campeche",
                "Chiapas",
                "Chihuahua",
                "Ciudad de México",
                "Coahuila",
                "Colima",
                "Durango",
                "Guanajuato",
                "Guerrero",
                "Hidalgo",
                "Jalisco",
                "Michoacán",
                "Morelos",
                "México",
                "Nayarit",
                "Nuevo León",
                "Oaxaca",
                "Puebla",
                "Querétaro",
                "Quintana Roo",
                "San Luis Potosí",
                "Sinaloa",
                "Sonora",
                "Tabasco",
                "Tamaulipas",
                "Tlaxcala",
                "Veracruz",
                "Yucatán",
                "Zacatecas"
              ]
            }
          },
          "stationName": {
            "title": "Station name contains",
            "type": "string",
            "description": "Optional. Keep only stations whose registered name contains this text, e.g. a company name. Case and accents are ignored."
          },
          "nearLocation": {
            "title": "Near location (latitude, longitude)",
            "type": "string",
            "description": "Optional. Decimal coordinates, e.g. 19.4326, -99.1332 (Zócalo, Mexico City). Adds distanceKm to each result and keeps stations within the radius below."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Used with Near location.",
            "default": 10
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "price",
              "distance",
              "none"
            ],
            "type": "string",
            "description": "Price sorts cheapest first (averages by US dollars per litre). Distance requires Near location.",
            "default": "price"
          },
          "maxResultsPerFuel": {
            "title": "Max results per fuel type",
            "minimum": 0,
            "type": "integer",
            "description": "Cap per fuel type after sorting, so 'price' + 10 gives the 10 cheapest stations for each fuel. 0 means no cap. Averages are never capped.",
            "default": 20
          },
          "excludeOutliers": {
            "title": "Exclude implausible prices",
            "type": "boolean",
            "description": "Drops obvious data-entry errors reported by stations (for example 0.01 or 98.95 MXN/l): prices below 75% or above 150% of the national median for the same fuel.",
            "default": true
          },
          "averageAreas": {
            "title": "Average prices",
            "type": "array",
            "description": "Optional. Official average prices: the US from the EIA (weekly: national, PADD regions, 9 states, 10 cities, in USD per gallon) and Canada from Statistics Canada (monthly: national and 18 cities, in CAD per litre). MX is the median of all Mexican station prices. Every row also has pricePerLitre and priceUsdPerLitre. Station filters do not apply.",
            "items": {
              "type": "string",
              "enum": [
                "MX",
                "US",
                "US-PADD1",
                "US-PADD1A",
                "US-PADD1B",
                "US-PADD1C",
                "US-PADD2",
                "US-PADD3",
                "US-PADD4",
                "US-PADD5",
                "US-PADD5-XCA",
                "US-CA",
                "US-CO",
                "US-FL",
                "US-MA",
                "US-MN",
                "US-NY",
                "US-OH",
                "US-TX",
                "US-WA",
                "US-BOS",
                "US-CHI",
                "US-CLE",
                "US-DEN",
                "US-HOU",
                "US-LAX",
                "US-MIA",
                "US-NYC",
                "US-SFO",
                "US-SEA",
                "CA",
                "CA-YYT",
                "CA-YYG",
                "CA-YHZ",
                "CA-YSJ",
                "CA-YQB",
                "CA-YUL",
                "CA-YOW",
                "CA-YYZ",
                "CA-YQT",
                "CA-YWG",
                "CA-YQR",
                "CA-YXE",
                "CA-YEG",
                "CA-YYC",
                "CA-YVR",
                "CA-YYJ",
                "CA-YXY",
                "CA-YZF"
              ],
              "enumTitles": [
                "Mexico (median of station prices) (MX)",
                "United States (US)",
                "East Coast (PADD 1) (US-PADD1)",
                "New England (PADD 1A) (US-PADD1A)",
                "Central Atlantic (PADD 1B) (US-PADD1B)",
                "Lower Atlantic (PADD 1C) (US-PADD1C)",
                "Midwest (PADD 2) (US-PADD2)",
                "Gulf Coast (PADD 3) (US-PADD3)",
                "Rocky Mountain (PADD 4) (US-PADD4)",
                "West Coast (PADD 5) (US-PADD5)",
                "West Coast except California (US-PADD5-XCA)",
                "California (US-CA)",
                "Colorado (US-CO)",
                "Florida (US-FL)",
                "Massachusetts (US-MA)",
                "Minnesota (US-MN)",
                "New York (US-NY)",
                "Ohio (US-OH)",
                "Texas (US-TX)",
                "Washington (US-WA)",
                "Boston, MA (US-BOS)",
                "Chicago, IL (US-CHI)",
                "Cleveland, OH (US-CLE)",
                "Denver, CO (US-DEN)",
                "Houston, TX (US-HOU)",
                "Los Angeles, CA (US-LAX)",
                "Miami, FL (US-MIA)",
                "New York City, NY (US-NYC)",
                "San Francisco, CA (US-SFO)",
                "Seattle, WA (US-SEA)",
                "Canada (CA)",
                "St. John's, NL (CA-YYT)",
                "Charlottetown and Summerside, PE (CA-YYG)",
                "Halifax, NS (CA-YHZ)",
                "Saint John, NB (CA-YSJ)",
                "Québec City, QC (CA-YQB)",
                "Montréal, QC (CA-YUL)",
                "Ottawa, ON (CA-YOW)",
                "Toronto, ON (CA-YYZ)",
                "Thunder Bay, ON (CA-YQT)",
                "Winnipeg, MB (CA-YWG)",
                "Regina, SK (CA-YQR)",
                "Saskatoon, SK (CA-YXE)",
                "Edmonton, AB (CA-YEG)",
                "Calgary, AB (CA-YYC)",
                "Vancouver, BC (CA-YVR)",
                "Victoria, BC (CA-YYJ)",
                "Whitehorse, YT (CA-YXY)",
                "Yellowknife, NT (CA-YZF)"
              ]
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "snapshot",
              "changes"
            ],
            "type": "string",
            "description": "Snapshot returns current prices. Changes returns only prices that are new or changed since the previous run with the same Monitor ID, with the previous price, which suits scheduled runs. Averages are included in the changes.",
            "default": "snapshot"
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name for the saved state in Changes mode. Use a different ID for each monitored area or filter set.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}