{
  "openapi": "3.0.1",
  "info": {
    "title": "GasBuddy Fuel Prices — Drop-in, No Proxy Needed",
    "description": "Drop-in compatible with memo23/gasbuddy-fuel-prices-scraper — half the cost, no CAPTCHA fee. US & Canada gas-station prices from GasBuddy: every grade incl. E85 and UNL88, cash and credit, posted time, brands, ratings, offers, phone, coordinates, area price trends. Batch many ZIPs per run. No proxy.",
    "version": "1.0",
    "x-build-id": "9tu8So8n2tBlhNlnC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/diopside~gasbuddy-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-diopside-gasbuddy-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/diopside~gasbuddy-prices/runs": {
      "post": {
        "operationId": "runs-sync-diopside-gasbuddy-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/diopside~gasbuddy-prices/run-sync": {
      "post": {
        "operationId": "run-sync-diopside-gasbuddy-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": {
          "search": {
            "title": "Search locations (ZIP / city / \"city, ST\")",
            "type": "array",
            "description": "Locations to scrape — US ZIP codes, Canadian cities, city names, or \"city, ST\". One run covers every entry. Same field name the incumbent uses, so migration is drop-in. Note that a ZIP search returns only stations inside that ZIP boundary, which for a dense urban ZIP can legitimately be zero — use \"city, ST\" for a wider net.",
            "items": {
              "type": "string"
            }
          },
          "fuel": {
            "title": "Primary fuel grade",
            "enum": [
              "Regular",
              "Midgrade",
              "Premium",
              "Diesel",
              "E85",
              "UNL88"
            ],
            "type": "string",
            "description": "Which grade drives GasBuddy's ranking and which stations it returns. Every grade a station reports is ALWAYS returned in the `prices` object regardless of this setting — there is no need to run once per grade.",
            "default": "Regular"
          },
          "brand": {
            "title": "Brand filter",
            "type": "string",
            "description": "Only return stations of one brand, e.g. \"Costco\", \"Shell\", \"Circle K\". Matched against GasBuddy's own brand table, which is read at run time, so new chains work without an update. Leave empty for every brand. Not available from the incumbent."
          },
          "maxPriceAgeHours": {
            "title": "Only prices newer than (hours)",
            "minimum": 1,
            "type": "integer",
            "description": "Drop stations whose newest price is older than this many hours. Filtered on the posted time actually read from each station, not on GasBuddy's own `maxAge` parameter — that one is accepted by their API and does not filter. Leave empty to keep every station. Skipped stations are not charged for. Not available from the incumbent."
          },
          "includeStationsWithoutPrices": {
            "title": "Include stations with no reported price",
            "type": "boolean",
            "description": "GasBuddy lists stations nobody has posted a price for. They are dropped by default — in a fuel-price run they are a charge for no price — and are never charged for when dropped. Turn this on to use the actor as a station registry (name, brand, address, phone, coordinates, rating) instead.",
            "default": false
          },
          "lat": {
            "title": "Latitude",
            "type": "number",
            "description": "Optional latitude to search by coordinate instead of, or in addition to, a text search. Provide both lat and lng. A coordinate search also fills the `distance` field on every row."
          },
          "lng": {
            "title": "Longitude",
            "type": "number",
            "description": "Optional longitude to search by coordinate. Provide both lat and lng."
          },
          "maxStationsPerSearch": {
            "title": "Max stations per search location",
            "minimum": 1,
            "type": "integer",
            "description": "Upper bound on stations collected for each search location, across cursor pages.",
            "default": 100
          },
          "maxPages": {
            "title": "Max pages per search (cursor pagination)",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on how many cursor pages to walk per search location. GasBuddy returns roughly 20-25 stations per page, ordered by proximity, so more pages means a wider radius.",
            "default": 10
          },
          "maxItems": {
            "title": "Maximum items to scrape",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on total dataset rows (stations) across all locations. Stations seen in more than one location are de-duplicated and counted once.",
            "default": 1000
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 1,
            "type": "integer",
            "description": "How many times to retry a failed request, each on a fresh connection. GasBuddy rate-limits per connection, so a rotation is free and usually enough.",
            "default": 5
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 5,
            "maximum": 240,
            "type": "integer",
            "description": "Politeness ceiling on requests to gasbuddy.com. One request returns 20-25 stations.",
            "default": 60
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many requests may be in flight at once.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. This actor does NOT need a proxy: gasbuddy.com gates on the TLS fingerprint rather than the exit IP, and its rate limit is counted per connection, which a free reconnect resets. Leave this off unless you have a reason — a proxy adds cost and no measured benefit. Also accepted under the incumbent's field name `proxy`.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}