Bean Base API
To further our mission of driving coffee innovation, we created the Bean Base API — a powerful tool designed to make accessing our coffee datasets faster, easier, and highly flexible.
By generating an API key or querying the Bean Base endpoints, you acknowledge that you agree to the Terms of Use found at the bottom of the Documentation page.
Fuel Your Ideas
Get access to continuously updated and verified coffee data to drive your innovative and caffeinated ideas. Standard access is completely free to use and provides all currently available beans across all roasters (~5,000+), good for enthusiasts and app developers. For our commercial partners, the Patreon Supporter Dev Tier is available to access the full archive of historical coffee data tracked since 2024, as well as higher limits to ensure your complex applications are fully supported.
Custom Queries
Enjoy complete control over your queries. Use powerful filtering to extract exactly the coffee data you need based on origin, variety, processing, flavor profiles, and much more.
Public Dictionaries
Access open, public endpoints to fetch continuously updated standardized lists of coffee roasters, origins, varieties, and processing methods.
Data Science Ready
Extract payloads instantly in structured JSON format, or append ?format=csv to instantly generate spreadsheets for offline modeling.
import requests
# 1. Define the endpoint and your authentication key
url = 'https://api.loffeelabs.com/api/v2/beans'
headers = { 'Authorization': 'Bearer YOUR_API_KEY' }
# 2. Filter for Washed coffees from Ethiopia OR Colombia
# and strictly limit the fields returned to save bandwidth
params = {
'origin': 'Ethiopia,Colombia',
'process': 'Washed',
'fields': 'roaster,roast-name,price-low',
'limit': 5
}
# 3. Execute the request
response = requests.get(url, params=params, headers=headers)
if response.status_code == 200:
data = response.json()
print(f"Found {data['meta']['total']} matching coffees.")
# Iterate through the returned 'beans' array
for bean in data['beans']:
roaster = bean.get('roaster', 'Unknown')
name = bean.get('roast-name', 'Unknown')
price = bean.get('price-low', 'N/A')
print(f"- {roaster}: {name} (${price})")
else:
print(f"Error: {response.status_code} - {response.text}")