Skip to main content
ArrowLeftDeveloper Portal

Quickstart Guides

Get up and running in minutes with copy-paste code examples.

Get Fuel Prices in Your App

Fetch real-time fuel prices across Mexico and the US. Perfect for price comparison tools, fleet dashboards, and market intelligence.

1

Install the SDK

Add the Cantarell SDK to your project.

# No installation needed for cURL
2

Initialize the Client

Create a client instance with your API key. Use sandbox keys for testing.

# Set your API key as an environment variable
export CANTARELL_API_KEY="sk_sandbox_your_key"
3

Fetch Current Prices

Get the latest fuel prices for any region. Filter by fuel type, state, or city.

curl -X GET "https://api.cantarell-os.tech/api/v2/fuel-prices?state=TX&fuel_type=regular" \
  -H "Authorization: Bearer $CANTARELL_API_KEY"

# Response:
# {
#   "data": [
#     { "station": "Shell I-35", "price_usd": 2.89, "fuel_type": "regular", "updated_at": "2026-03-10T08:00:00Z" },
#     { "station": "Exxon 290", "price_usd": 2.95, "fuel_type": "regular", "updated_at": "2026-03-10T07:45:00Z" }
#   ],
#   "ok": true
# }