PretCarburant.ro Public API — REST v1
Programmatic access to aggregated Romanian fuel price data. Same data we use on the site, refreshed every 2 hours, no authentication required. Licensed Creative Commons BY 4.0 — free to use with attribution.
Available Endpoints
Base URL: https://pretcarburant.ro/api/v1/. All responses are JSON with Cache-Control: public, max-age=300 and Access-Control-Allow-Origin: * on public endpoints.
| Endpoint | Description | Rate limit |
|---|---|---|
GET /api/v1/preturi |
City-aggregated prices (optional filter ?judet=CLUJ) |
None (5-min cache) |
GET /api/v1/preturi/minime |
National min/avg/max prices per fuel type | None (5-min cache) |
GET /api/v1/judete/<judet> |
County-level aggregated average price (e.g. /api/v1/judete/CLUJ) |
1 request/week per IP |
GET /api/v1/retele |
Monitored networks with brand-aggregated prices | 1 request/week per IP |
GET /api/v1/statii |
Station list with coordinates, brand, prices (filters: ?brand=, ?tip=, ?lat=&lon=&raza= for stations within radius, km) Each record includes a stable per-station id. |
1 request/week per IP |
GET /api/v1/statie/<station_id>/istoric |
Price history for one station (station_id = the id field from /api/v1/statii; unknown id → 404) |
1 request/week per IP |
GET /api/v1/geocode |
City-name autocomplete (?q=cluj, min 2 characters) |
1 request/week per IP |
POST /api/v1/traseu/custom |
Stations along an A→B route (JSON body: start, end, tip) |
1 request/week per IP |
cURL Examples
City-aggregated prices
curl -s https://pretcarburant.ro/api/v1/preturi | jq '.rezultate[0]'
Filter by county
curl -s "https://pretcarburant.ro/api/v1/preturi?judet=CLUJ" | jq '.rezultate'
National minimum prices
curl -s https://pretcarburant.ro/api/v1/preturi/minime | jq '.preturi'
Petrom stations selling diesel
curl -s "https://pretcarburant.ro/api/v1/statii?brand=petrom&tip=motorina_standard" | jq '.statii | length'
Stations within 10 km (lat/lon)
curl -s "https://pretcarburant.ro/api/v1/statii?lat=46.77&lon=23.62&raza=10" | jq '.total'
County average price
curl -s https://pretcarburant.ro/api/v1/judete/CLUJ | jq
Rate Limits and AI Bot Policy
Anonymous users hit 1 request/week/IP on rate-limited endpoints (/retele, /statii, /istoric). The /preturi and /preturi/minime endpoints are rate-limit-free (5-minute cache).
AI assistants (ChatGPT, Claude, Perplexity, Gemini, Bing Copilot, etc.) are bypassed via an explicit User-Agent whitelist. They get a 60 req/min/IP cap instead, so they can cite our data directly in answers. Whitelisted UAs include: GPTBot, ChatGPT-User, OAI-SearchBot, ClaudeBot, anthropic-ai, PerplexityBot, Google-Extended, Googlebot, Applebot-Extended, Bytespider, Meta-ExternalAgent, CCBot, MistralAI, cohere-ai, YouBot, DiffBot, Bravebot and others.
Response Format
All responses share this shape:
{
"status": "ok",
"data": "2026-05-07",
"rezultate": [...]
}
On error:
{
"status": "error",
"message": "Rate limit: 1 request per week...",
"retry_after_seconds": 543210
}
License and Attribution
Data is published under Creative Commons BY 4.0. Free to use commercially or non-commercially with visible attribution: "Source: PretCarburant.ro (https://pretcarburant.ro)".
The full dataset is also published on Zenodo with DOI: 10.5281/zenodo.19560194. Organization identity on Wikidata: Q139285387.
Commercial / high-volume access
The free CC-BY 4.0 tier stays unchanged: 1 request/week per IP on rate-limited endpoints, with visible attribution. We are not closing or capping it — public data stays public.
For apps, fleets, newsrooms and any high-volume integration, there are commercial plans with instant activation — your API key arrives by email within minutes of subscribing:
- Starter — €19/month, 10,000 requests/month
- Pro — €49/month, 100,000 requests/month
- Business — €149/month, 1,000,000 requests/month, priority support
All plans include a 3-day free trial, access to every endpoint without the weekly quota, and X-RateLimit-* headers for usage monitoring. See plans and subscribe →
Special needs (contractual SLA, bulk export, historical snapshots, extended rights without attribution)? Write to us for a dedicated quote.
Version History
- v1.0 (2026-04-01) — initial 5 public endpoints; 5-min cache; open CORS.
- v1.1 (2026-04-14) — bot UA whitelist for AI assistants; per-IP 60 req/min flood cap.
- v1.2 (2026-05-07) — formal public documentation at
/api(RO/EN/HU). - v1.3 (2026-07-26) — self-serve commercial plans with API keys (
X-Api-Keyheader), per-plan monthly quotas and theX-RateLimit-Limit/X-RateLimit-Remainingheaders;/geocodeand/traseu/customendpoints documented.
Contact and Bug Reports
Email: contact@pretcarburant.ro. For technical bugs or feature requests, prefix the subject with „[API]". We reply within 48 business hours.
Responsible disclosure for security issues: see /.well-known/security.txt.