# Turkey Fuel Prices Scraper (`dodoflix/fuel-prices-scraper`) Actor

Scrape fuel prices in Turkey by brand, city and district: Opet, Petrol Ofisi and Aytemiz. Gasoline, diesel and LPG in TRY. Fast HTTP scraper, no browser.

- **URL**: https://apify.com/dodoflix/fuel-prices-scraper.md
- **Developed by:** [Doğukan Metan](https://apify.com/dodoflix) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.36 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Turkey Fuel Prices Scraper

Get current pump prices for gasoline, diesel, LPG and more in Turkey, by brand, city and district, as clean JSON, CSV or Excel. It reads the price lists that **Opet**, **Petrol Ofisi** and **Aytemiz** publish on their own sites. Runs on plain HTTP, so it is fast and cheap. No code needed, and the price already includes platform usage.

### What you can do with it

- **Compare brands.** See Opet, Petrol Ofisi and Aytemiz side by side for the same city and fuel, with a dataset view built for comparison.
- **Track prices over time.** Schedule a daily run and keep the history. Every row carries the price date and the time it was scraped.
- **Cost models for fleets and logistics.** Pull diesel and LPG prices for every city and district you operate in.
- **Apps, bots and dashboards.** Feed current prices to a price-alert bot, a spreadsheet or a BI tool through the API.
- **Research.** Study price gaps between cities, between Istanbul's European and Anatolian sides, and between brands.

### Quick start

Open the Input tab and press Start. The default input returns gasoline, diesel and LPG prices for Istanbul and Ankara from all three brands. Or pick one of these:

**Diesel and gasoline in every city, one brand**

```json
{
    "brands": ["opet"],
    "products": ["gasoline", "diesel"]
}
```

**One district across all brands**

```json
{
    "cities": ["Istanbul"],
    "districts": ["Kadikoy"],
    "products": ["gasoline", "diesel", "lpg"]
}
```

**LPG prices in a few cities, by plate code**

```json
{
    "brands": ["petrolofisi", "aytemiz"],
    "cities": ["06", "35", "16"],
    "products": ["lpg"]
}
```

### Input

| Field | What it does |
|---|---|
| `brands` | `opet`, `petrolofisi`, `aytemiz`. All three by default |
| `cities` | Plate codes (`34`, `06`) or names (`Istanbul`, `İzmir`, `izmir`). Empty means all 81 cities. Istanbul returns both sides |
| `districts` | Keep only these districts. Accents are optional: `Kadikoy` matches `Kadıköy`. Empty means every district and the city-level rows |
| `products` | `gasoline`, `diesel`, `lpg`, `kerosene`, `heating_oil`, `fuel_oil`, `fuel_oil_high_sulfur`. Default: gasoline, diesel, lpg |
| `maxItems` | Stop the whole run after this many price rows |
| `maxItemsPerBrand` | Stop collecting a brand after this many rows |
| `maxConcurrency` | Parallel requests, 3 by default |
| `maxRequestsPerMinute` | Request speed limit, 120 by default |
| `proxyConfiguration` | Residential proxy with country TR by default. Opet needs it, the other two brands also work without a proxy |

### What each brand publishes

| Brand | Granularity | Products | Price date |
|---|---|---|---|
| Opet | District rows, the city centre is the district "Merkez" | Gasoline, 2 diesel grades, kerosene, heating oil, 2 fuel oils (no LPG) | Opet's "last update" date |
| Petrol Ofisi | City rows and district rows | Gasoline, diesel, kerosene, heating oil, fuel oil, LPG | Newest date in Petrol Ofisi's price history |
| Aytemiz | City rows and district rows | Gasoline, 2 diesel grades, heating oil, fuel oil (no LPG) | Not published, `date` is `null` |

City-level rows have `district: null`. Prices are pump prices in TRY with VAT.

Shell is not covered: Shell's robots.txt disallows its price page, so this Actor does not read it. Other brands (BP, TotalEnergies and smaller ones) are not covered either.

### Output

One row per brand, place and product. Download the dataset as JSON, CSV, Excel, XML or HTML, or read it through the API.

```json
{
    "brand": "Opet",
    "plateCode": 6,
    "city": "Ankara",
    "area": null,
    "district": "Akyurt",
    "product": "gasoline",
    "productName": "Kurşunsuz Benzin 95",
    "price": 72.16,
    "currency": "TRY",
    "unit": "L",
    "date": "2026-11-12",
    "scrapedAt": "2026-11-15T21:20:21.050Z",
    "url": "https://www.opet.com.tr/akaryakit-fiyatlari"
}
```

| Field | Meaning |
|---|---|
| `brand`, `plateCode`, `city` | Brand, plate code (1-81) and city name |
| `area` | `Avrupa` or `Anadolu` for Istanbul rows that belong to one side, otherwise `null` |
| `district` | District name, `null` for a city-level price |
| `product` | `gasoline`, `diesel`, `lpg`, `kerosene`, `heating_oil`, `fuel_oil`, `fuel_oil_high_sulfur` |
| `productName` | The brand's own product name, for example `Motorin UltraForce`. Brands sell several grades of one type, so compare by `product` and `productName` together |
| `price`, `currency`, `unit` | Price as a number, `TRY`, and `L` (litre) or `kg` (heating and fuel oil) |
| `date` | Date of the price as the brand publishes it, `YYYY-MM-DD`, or `null` |
| `scrapedAt` | When the row was collected, ISO timestamp in UTC |
| `url` | The page the brand shows the price on |

District names from Petrol Ofisi come without Turkish letters (`Kadikoy`), the other two brands spell them correctly (`Kadıköy`). Filtering by district works with either spelling.

### Pricing

You pay per result: **$0.40 per 1,000 price rows**. Platform usage is included, so there are no extra charges. For example, gasoline and diesel for all 81 cities from all three brands is roughly 8,000 rows, about $3.20. A run that finds nothing costs almost nothing.

You can cap spending on every run in the run options. The Actor stops cleanly when the cap is reached.

### FAQ

**How fresh are the prices?** They are read live from each brand's site on every run. Brands change prices a few times a month, and `date` tells you which day a price is from.

**Why do Opet and Petrol Ofisi show different prices?** Each brand sets its own pump prices, and the same brand varies a little between districts. Compare rows with the same `product` and `date`.

**Why is there no LPG for Opet or Aytemiz?** They do not publish LPG prices on their price pages.

**Do I need a proxy?** Opet times out from Apify's own servers, so the default input uses Apify Proxy with the RESIDENTIAL group and country TR. For Petrol Ofisi and Aytemiz alone you can switch the proxy off.

**How fast is it?** One request returns a whole city (Opet, Petrol Ofisi), so all 81 cities take a few minutes.

**Why did I get fewer rows than I expected?** The brand does not sell that product in that district, the filters matched fewer rows, or `maxItems` ended the run first. The run log names the brand and the filter when nothing matched.

**Can I use it from code?**

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('dodoflix/fuel-prices-scraper').call({
    cities: ['Istanbul', 'Ankara'],
    products: ['diesel'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

It also connects to Make, Zapier, Google Sheets, Slack and webhooks from the Integrations tab.

**Something broke or a field is missing.** Open an issue on the Issues tab with the input you used.

### Legal

This Actor collects public price lists. You are responsible for how you use the data, including the sites' terms and robots.txt.

### Türkçe özet

Opet, Petrol Ofisi ve Aytemiz akaryakıt fiyatlarını il ve ilçe bazında JSON, CSV veya Excel olarak indirin. Benzin, motorin ve LPG fiyatları TL cinsinden, güncelleme tarihiyle birlikte gelir.

# Actor input Schema

## `brands` (type: `array`):

Fuel brands to scrape. Opet publishes district prices, Petrol Ofisi and Aytemiz publish city and district prices.

## `cities` (type: `array`):

Plate codes (34, 06) or city names (Istanbul, Ankara). Leave empty for all 81 cities. Istanbul returns both the European and the Anatolian side.

## `districts` (type: `array`):

Only keep these districts, for example Kadikoy or Cankaya. Letters with and without Turkish accents both match. Leave empty for every district plus the city-level rows.

## `products` (type: `array`):

Fuel types to keep. Brands sell different grades of each type (for example Opet EcoForce and UltraForce diesel), see productName in the output.

## `maxItems` (type: `integer`):

Stop the whole run after this many price rows. Leave empty for no limit.

## `maxItemsPerBrand` (type: `integer`):

Stop collecting a brand after this many price rows. Leave empty for no limit.

## `maxConcurrency` (type: `integer`):

Parallel requests. Petrol Ofisi and Aytemiz answer slowly, so more than 3 rarely helps.

## `maxRequestsPerMinute` (type: `integer`):

Request speed limit across all brands. Each city costs about one request per brand.

## `proxyConfiguration` (type: `object`):

Opet times out from Apify's own servers, so the default is Residential proxy with country TR. Petrol Ofisi and Aytemiz also work without a proxy.

## Actor input object example

```json
{
  "brands": [
    "opet",
    "petrolofisi",
    "aytemiz"
  ],
  "cities": [
    "34",
    "06"
  ],
  "products": [
    "gasoline",
    "diesel",
    "lpg"
  ],
  "maxConcurrency": 3,
  "maxRequestsPerMinute": 120,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "TR"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "brands": [
        "opet",
        "petrolofisi",
        "aytemiz"
    ],
    "cities": [
        "34",
        "06"
    ],
    "products": [
        "gasoline",
        "diesel",
        "lpg"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "TR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dodoflix/fuel-prices-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "brands": [
        "opet",
        "petrolofisi",
        "aytemiz",
    ],
    "cities": [
        "34",
        "06",
    ],
    "products": [
        "gasoline",
        "diesel",
        "lpg",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "TR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("dodoflix/fuel-prices-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "brands": [
    "opet",
    "petrolofisi",
    "aytemiz"
  ],
  "cities": [
    "34",
    "06"
  ],
  "products": [
    "gasoline",
    "diesel",
    "lpg"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "TR"
  }
}' |
apify call dodoflix/fuel-prices-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dodoflix/fuel-prices-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/17AWcVApTfXF2LlC6/builds/6Rc3GNdQ3HlVqJmnH/openapi.json
