{
  "openapi": "3.0.1",
  "info": {
    "title": "GasBuddy Fuel Prices Scraper",
    "description": "Collect public US GasBuddy station prices by ZIP, city and state, or exact coordinates. Look up the stations you name by station ID, page link, or street address. Get reported fuel grades, cash and credit prices, station details, and report times in structured rows.",
    "version": "1.0",
    "x-build-id": "1mjcA0sveF6vf6xnX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~gasbuddy-fuel-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-gasbuddy-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/maximedupre~gasbuddy-fuel-prices/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-gasbuddy-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/maximedupre~gasbuddy-fuel-prices/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-gasbuddy-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",
        "required": [
          "target"
        ],
        "properties": {
          "target": {
            "title": "Find stations by",
            "enum": [
              "zip",
              "cityState",
              "coordinates",
              "station",
              "streetAddress"
            ],
            "type": "string",
            "description": "Choose how to find stations. ZIP or postal codes, City and state, and Exact coordinates search an area. Station IDs or links and Exact street address return only the stations at the values you enter."
          },
          "zipCodes": {
            "title": "ZIP or postal codes",
            "minItems": 1,
            "type": "array",
            "description": "Enter one or more U.S. ZIP codes or ZIP+4 values, one per line. A ZIP+4 value searches the whole 5-digit ZIP, not a smaller area. GasBuddy returns stations outside the United States for ZIP codes such as 78706, so this field does not accept 78706. Choose City and state or Exact coordinates for another location format.",
            "items": {
              "type": "string",
              "pattern": "^(?!78706$)[0-9]{5}(?:-[0-9]{4})?$",
              "minLength": 1
            }
          },
          "cityStates": {
            "title": "City and state",
            "minItems": 1,
            "type": "array",
            "description": "Enter one or more city and state values, such as Austin, TX. Use one value per line. GasBuddy uses each value as a location search.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "coordinates": {
            "title": "Exact coordinates",
            "minItems": 1,
            "type": "array",
            "description": "Enter one or more exact locations. Each item must include a latitude and longitude.",
            "items": {
              "type": "object",
              "properties": {
                "latitude": {
                  "title": "Latitude",
                  "type": "number",
                  "description": "Latitude for the search location. Use a value from -90 to 90.",
                  "minimum": -90,
                  "maximum": 90
                },
                "longitude": {
                  "title": "Longitude",
                  "type": "number",
                  "description": "Longitude for the search location. Use a value from -180 to 180.",
                  "minimum": -180,
                  "maximum": 180
                }
              },
              "required": [
                "latitude",
                "longitude"
              ],
              "additionalProperties": false
            }
          },
          "stations": {
            "title": "Station IDs or links",
            "minItems": 1,
            "type": "array",
            "description": "Enter one GasBuddy station ID or station page link per line, such as 91019 or https://www.gasbuddy.com/station/91019. Get the ID or link from that station's GasBuddy page. The ID is the number after /station/ in its page address. Only the stations you list are returned, each once, in your order. Nearby or similarly named stations are never added. A station that cannot be returned still gets a row that explains why.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "streetAddresses": {
            "title": "Street addresses",
            "minItems": 1,
            "type": "array",
            "description": "Enter one full street address per line, such as 123 Main St, Austin, TX 78701. Each address returns only the station at that exact address. Nearby or similarly named stations are never added. If GasBuddy's address search finds the station but it has no fuel prices, the row shows it as unavailable. That row has the station's ID, and its name and full address (street, city, and state) when GasBuddy shows them. An address with no match still gets a row that explains why.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "fuelType": {
            "title": "Fuel product",
            "enum": [
              "regular",
              "midgrade",
              "premium",
              "diesel",
              "e85",
              "unleaded88"
            ],
            "type": "string",
            "description": "Used only by ZIP or postal codes, City and state, and Exact coordinates searches. Keeps only stations that list a price for this fuel product. A search returns no stations when none of its stations list the chosen fuel. For example, E85 and Unleaded 88 returned no stations in Danbury, CT and Naugatuck, CT. Regular is used unless you choose another. Each kept station still shows every grade that GasBuddy reports for it.",
            "default": "regular"
          },
          "maxReportAgeHours": {
            "title": "Maximum report age (hours)",
            "minimum": 1,
            "type": "integer",
            "description": "Used only by ZIP or postal codes, City and state, and Exact coordinates searches. Keeps only cash and credit prices reported within this many hours. A station is left out when it has no price for the chosen fuel product within the limit. Station IDs or links and Exact street address keep every report, even old ones."
          },
          "brandNames": {
            "title": "Brands",
            "minItems": 1,
            "type": "array",
            "description": "Used only by ZIP or postal codes, City and state, and Exact coordinates searches. Optionally keeps only stations whose brand name matches one of these names, ignoring capital letters. Enter one brand name per line, using a name GasBuddy lists for a station. A brand returns stations only when it appears on a search's first results page. When it does, its stations from later pages also return. Other listed brands still return.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}