{
  "openapi": "3.0.1",
  "info": {
    "title": "GasBuddy Scraper: Fuel Prices, Stations & Reviews",
    "description": "Scrape GasBuddy station by station across the US and Canada. Returns brand, address, coordinates, phone, amenities, open status, ratings and reviews, plus the current cash and credit price for every fuel grade with who reported it and when. Incremental mode tracks price changes between runs.",
    "version": "1.1",
    "x-build-id": "Ly8ZMnJC8OooJUSz0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~gasbuddy-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-gasbuddy-com-scraper",
        "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/abotapi~gasbuddy-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-gasbuddy-com-scraper",
        "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/abotapi~gasbuddy-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-gasbuddy-com-scraper",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What do you want to scrape?",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "Search mode looks up stations around each location you list. URL mode reads the station links you paste. Fill in the section that matches your choice, then set the filters below.",
            "default": "search"
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "One entry per area. Use a postal code (78701), a city and state (Austin, TX), a state (Texas), or a coordinate pair written as latitude,longitude (30.2672,-97.7431). A coordinate pair is what makes this a radius search: only then does GasBuddy return a distance per station, which is what Max distance filters on. Search mode only.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Station or search links",
            "type": "array",
            "description": "Paste station addresses such as https://www.gasbuddy.com/station/29330, bare station ids such as 29330, or a search address such as https://www.gasbuddy.com/home?search=78701. Append &page=2 (or &cursor=50 for an exact row offset) to a search address to start the walk deeper, which is how a big sweep is split across runs. A pasted station is always returned, even when the filters below would have excluded it. URL mode only.",
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Fuel brands",
            "type": "array",
            "description": "Return only stations of these brands, for example Shell or Costco. Names are checked against GasBuddy's own brand list, so a misspelled brand is reported by name instead of silently returning everything. Several brands return stations of ANY of them. Applies to a location search and to a pasted search link.",
            "items": {
              "type": "string"
            }
          },
          "fuelType": {
            "title": "Fuel grade",
            "enum": [
              "regular",
              "midgrade",
              "premium",
              "diesel",
              "e85",
              "unl88"
            ],
            "type": "string",
            "description": "The grade GasBuddy ranks the area by. Every grade the station sells is still returned in the prices list; this decides which grade drives the ordering and which stations qualify.",
            "default": "regular"
          },
          "maxPriceAgeHours": {
            "title": "Maximum price age (hours)",
            "enum": [
              "0",
              "4",
              "8",
              "12",
              "24",
              "36",
              "48"
            ],
            "type": "string",
            "description": "Prices on GasBuddy are reported by its members. Set a window to keep only stations whose price was confirmed recently.",
            "default": "0"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Keep stations whose cheapest reported price is at least this much. Left empty means no lower bound."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Keep stations whose cheapest reported price is at most this much. Left empty means no upper bound."
          },
          "minStarRating": {
            "title": "Minimum star rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Keep only stations rated at least this many stars by GasBuddy members. Left empty means any rating, including unrated stations."
          },
          "amenities": {
            "title": "Required amenities",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only stations that have ALL of the amenities you pick. GasBuddy publishes no amenity filter of its own, so this is applied to the stations it returns.",
            "items": {
              "type": "string",
              "enum": [
                "air",
                "atm",
                "beer",
                "c_store",
                "carwash",
                "cash_credit",
                "full_service",
                "has_diesel",
                "has_fuel",
                "has_power",
                "lotto",
                "membership_discount",
                "membership_pricing",
                "membership_required",
                "pay_at_pump",
                "payphone",
                "propane",
                "restaurant",
                "restrooms",
                "service_station",
                "truckstop",
                "wine"
              ],
              "enumTitles": [
                "Air Pump",
                "ATM",
                "Beer",
                "C-Store",
                "Car Wash",
                "Offers Cash Discount",
                "Full Service",
                "Has Diesel",
                "Has Fuel",
                "Has Power",
                "Lotto",
                "Loyalty Discount",
                "Membership Pricing",
                "Membership Required",
                "Pay at Pump",
                "Payphone",
                "Propane",
                "Restaurant",
                "Restrooms",
                "Service Station",
                "Truck Stop",
                "Wine"
              ]
            }
          },
          "openNowOnly": {
            "title": "Open right now only",
            "type": "boolean",
            "description": "Keep only stations GasBuddy currently reports as open.",
            "default": false
          },
          "withPricesOnly": {
            "title": "Only stations with a reported price",
            "type": "boolean",
            "description": "Keep only stations that have at least one grade with a real reported price. Turn this on when an unpriced station is no use to you.",
            "default": false
          },
          "maxDistanceMiles": {
            "title": "Max distance (miles)",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only stations within this many miles of the point you searched. Only a coordinate entry (latitude,longitude) makes GasBuddy return a distance, so a station with no distance is kept rather than dropped."
          },
          "fetchReviews": {
            "title": "Include member reviews",
            "type": "boolean",
            "description": "Add GasBuddy member reviews to each station. The first page of reviews comes back with the search itself and is never charged. Only asking for MORE rows than that page holds costs an extra request per station, and only that is charged.",
            "default": false
          },
          "maxReviewsPerStation": {
            "title": "Max reviews per station",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on review rows per station. Up to 10 arrive free with the search; anything above that fetches extra pages and charges the review surcharge once for that station. 0 means no reviews.",
            "default": 10
          },
          "maxStations": {
            "title": "Max stations",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many matching stations across all locations. 0 means no limit, which on a whole state can be thousands of billed rows.",
            "default": 20
          },
          "maxPages": {
            "title": "Max pages per location",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each location after this many result pages. 0 means walk to the end of that area.",
            "default": 0
          },
          "resumeFromRunId": {
            "title": "Resume from a previous run",
            "type": "string",
            "description": "Continue ONE interrupted crawl: paste that run's id (or its dataset id) and stations it already returned are skipped. For recurring monitoring use Incremental mode below instead, which remembers the previous run by itself."
          },
          "incrementalMode": {
            "title": "Incremental mode (track price changes between runs)",
            "type": "boolean",
            "description": "Run the same search on a schedule and get only what moved. Every station is labelled NEW, UPDATED, REAPPEARED or UNCHANGED, and changedFields names exactly what changed, which is how you build a price history over time. Unlike Resume from a previous run, this remembers the previous run itself.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name this monitoring campaign so several schedules can track different searches without sharing a baseline. Left empty, a key is derived from the mode, locations, links and every filter."
          },
          "emitUnchanged": {
            "title": "Also return unchanged stations",
            "type": "boolean",
            "description": "Incremental mode only. Returns stations whose prices did not move, labelled UNCHANGED. These are extra rows and they are billed like any other result.",
            "default": false
          },
          "emitExpired": {
            "title": "Also return stations that disappeared",
            "type": "boolean",
            "description": "Incremental mode only. Returns a final row labelled EXPIRED for a station that is no longer found, but only after a run that completed a full scan. These are extra rows and they are billed like any other result.",
            "default": false
          },
          "proxy": {
            "title": "Connection",
            "type": "object",
            "description": "GasBuddy only answers from a North American exit, so keep the country set to US. A US exit reaches the Canadian stations too, with prices in CAD per litre, so there is no need to pick a Canadian exit (and the standard pool does not offer one on every plan). The default pool is enough; a residential pool is only ever used if you pick it here.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}