git404hub

what is bensin-api fr?

nasgunawann/bensin-api — explained in plain English

Analysis updated 2026-05-18

12PythonAudience · developerComplexity · 2/5Setup · easy

tl;dr

A free public API serving cleaned fuel price data for every Indonesian province, sourced hourly from Pertamina, normalized to consistent types, and hosted as static JSON on GitHub Pages.

vibe map

mindmap
  root((bensin api))
    What it does
      Fuel price data
      Hourly updates
      Cleaned JSON
    Endpoints
      Per province
      National index
      Full national
    Data cleaning
      Consistent types
      Removed redundancy
      43 percent smaller
    Tech
      Python scripts
      GitHub Actions
      GitHub Pages

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Build an Indonesian fuel price comparison app using the per-province endpoint for each region.

VIBE 2

Seed a local database with all province fuel prices at once using the full national endpoint.

VIBE 3

Use the national index endpoint to build app navigation without downloading all province data upfront.

what's the stack?

PythonGitHub ActionsGitHub Pages

how it stacks up fr

nasgunawann/bensin-apiaim-uofa/reasonmatchairbone42/360-data-athlete
Stars121212
LanguagePythonPythonPython
Setup difficultyeasyhardhard
Complexity2/55/54/5
Audiencedeveloperresearchergeneral

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

No authentication required, data is served as static JSON files on GitHub Pages.

in plain english

bensin-api is a free public API that provides fuel price data from Pertamina, Indonesia's state-owned oil company. The data is served as static JSON files hosted on GitHub Pages, organized by province, and updated automatically every hour via a scheduled GitHub Actions workflow. The project exists because the official Pertamina API returns messy, inconsistent data. Prices come back as strings in some places and integers in others, product names are inconsistent, and the same timestamp is repeated redundantly on every item in the response. bensin-api fetches that raw data, cleans it, and republishes it in a normalized format where prices are plain integers, unavailable products are marked clearly, and redundant fields are removed. The cleaned files are roughly 43 percent smaller than the originals. There are three main endpoints. The per-province endpoint returns fuel products and prices for a single province, identified by a URL slug such as "dki-jakarta" or "aceh". The national index endpoint lists all provinces with their file sizes, product counts, and path references, which is useful for building navigation in an app without downloading all prices at once. The full national endpoint returns all provinces and their products in one request, suited for seeding a local database or building a price comparison dashboard. The update workflow runs on a cron schedule. GitHub Actions fetches fresh data from Pertamina, normalizes it with a Python script, validates the structure, and opens a pull request to a staging branch rather than pushing directly to main. This avoids merge conflicts and keeps the update history auditable. For developers who want to run the project locally, the README includes setup instructions for a Python virtual environment, dependency installation, running the data generator with or without a live fetch from Pertamina, and running the test suite.

prompts (copy fr)

prompt 1
Fetch fuel prices for DKI Jakarta from the bensin-api and show a table comparing all Pertamina products and their prices.
prompt 2
Build a Python script that calls the bensin-api full national endpoint and stores all province fuel prices in a SQLite database.
prompt 3
Create a Flask route that calls the bensin-api per-province endpoint and returns current fuel prices for any Indonesian province by slug.

Frequently asked questions

what is bensin-api fr?

A free public API serving cleaned fuel price data for every Indonesian province, sourced hourly from Pertamina, normalized to consistent types, and hosted as static JSON on GitHub Pages.

What language is bensin-api written in?

Mainly Python. The stack also includes Python, GitHub Actions, GitHub Pages.

How hard is bensin-api to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is bensin-api for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.