Skip to main content

API Documentation

A free REST API for querying the Edible Plant Database. Access 27,000+ plant species with scientific names, edible uses, cultivation details, nutrition data, lookalikes, photos, and more — all as JSON.

Quick start

1

Sign in

Create a free account using just your email.

2

Generate a key

Go to your account page and click "Generate API Key".

3

Start querying

Include your key in the Authorization header.

Authentication

Include your API key in the Authorization header of every request:

curl https://edibleplantdb.org/api/v1/plants/1 \
  -H "Authorization: Bearer epdb_live_YOUR_KEY_HERE"

All API keys start with epdb_live_. Keep your key secret — anyone with it can use your quota.

Rate limits

The free tier includes 1,000 requests per day per API key. The quota resets at midnight UTC. If you hit the limit you'll get a 429 Too Many Requests response.

Every response includes these headers so you can track your usage:

  • X-RateLimit-Limit — your daily quota
  • X-RateLimit-Remaining — requests left today

Endpoints

GET /api/v1/search

Full-text search across plant names, descriptions, edible uses, and geographic distribution. Supports filtering by family, country, and edible part.

Query parameters:

  • q (required) — search query (e.g. "mango", "Brazil", "edible leaves")
  • family — filter by botanical family (e.g. "Rosaceae")
  • country — filter by ISO 3166-1 alpha-2 country code (e.g. "BR")
  • edible_part — filter by edible part: Fruit, Leaves, Seeds & Nuts, Roots & Tubers, Flowers, Shoots & Stems, Mushroom, Spice, Cereal & Grain, Seaweed, Sap & Oil
  • limit — max results (1-100, default 20)
  • offset — pagination offset (default 0)
curl "https://edibleplantdb.org/api/v1/search?q=strawberry&country=US&edible_part=Fruit" \
  -H "Authorization: Bearer epdb_live_YOUR_KEY"
GET /api/v1/plants

Browse all plants with pagination. Also supports search and filters (same parameters as /search).

Query parameters:

  • q — optional search query
  • family, country, edible_part — filters (same as /search)
  • limit — max results (1-100, default 20)
  • offset — pagination offset (default 0)
curl "https://edibleplantdb.org/api/v1/plants?family=Rosaceae&limit=10" \
  -H "Authorization: Bearer epdb_live_YOUR_KEY"
GET /api/v1/plants/:id

Full details for a single plant — every field in the database, plus images, lookalikes, nutrition data, and country distribution.

curl "https://edibleplantdb.org/api/v1/plants/200" \
  -H "Authorization: Bearer epdb_live_YOUR_KEY"
GET /api/v1/random

Get a random plant with full details. Great for "plant of the day" features or discovery.

curl "https://edibleplantdb.org/api/v1/random" \
  -H "Authorization: Bearer epdb_live_YOUR_KEY"
GET /api/v1/families

List all botanical families with plant counts.

curl "https://edibleplantdb.org/api/v1/families" \
  -H "Authorization: Bearer epdb_live_YOUR_KEY"
GET /api/v1/families/:name

Plants within a specific family. Supports pagination.

curl "https://edibleplantdb.org/api/v1/families/Rosaceae?limit=10" \
  -H "Authorization: Bearer epdb_live_YOUR_KEY"
GET /api/v1/countries/:code

Plants found in a specific country. Use ISO 3166-1 alpha-2 country codes (e.g. US, CA, AU, BR).

curl "https://edibleplantdb.org/api/v1/countries/CA?limit=20" \
  -H "Authorization: Bearer epdb_live_YOUR_KEY"

Plant detail fields

The /api/v1/plants/:id and /api/v1/random endpoints return every field stored in the database:

FieldTypeDescription
idintUnique plant ID
scientific_namestringBinomial name (e.g. "Urtica dioica")
common_namesstringComma-separated common names
familystringBotanical family (e.g. "Urticaceae")
authoritystringTaxonomic authority citation
synonymsstringTaxonomic synonyms
other_namesstringAlternative common names in various languages
edible_portionstringEdible parts (e.g. "Leaves, Fruit, Seeds")
edible_usesstringHow edible parts are prepared and eaten
medicinal_usesstringTraditional and modern medicinal applications
known_hazardsstringToxicity warnings and safety precautions
descriptionstringPhysical description and characteristics
description_wikistringSummary from Wikipedia (if available)
cultivationstringGrowing conditions, soil, climate, companions
propagationstringHow to propagate (seed, division, cuttings)
other_usesstringNon-food uses (dye, fibre, fuel, etc.)
distributionstringGeographic range description
found_instringDetailed regions/countries where found
productionstringCommercial production notes
other_infostringAdditional information
usestringGeneral use category
notesstringAdditional notes
referencesstringSource references
wiki_urlstringWikipedia article URL
base_speciesstringParent species (for subspecies/varieties)
inat_observationsintiNaturalist observation count (popularity signal)
countriesstring[]ISO 3166-1 alpha-2 country codes where found
nutritionobject[]Per-part nutrition: energy, protein, vitamins, minerals
imagesobject[]Photos with URL, source, attribution, and CC license
lookalikesobject[]Dangerous lookalikes with toxicity and identifying features
urlstringCanonical URL on edibleplantdb.org

Nutrition object

Each entry in the nutrition array contains per-100g values for a specific plant part:

FieldUnit
partPlant part (e.g. "Leaves", "Fruit")
moisture_pct%
energy_kj / energy_kcalkJ / kcal
protein_ggrams per 100g
provitamin_a_ugmicrograms
vitamin_c_mgmilligrams
iron_mg / zinc_mgmilligrams

Error responses

All errors return JSON with an error field:

StatusMeaning
400Invalid request (bad parameters)
401Missing or invalid API key
404Resource not found
429Rate limit exceeded (resets at midnight UTC)
503Search index temporarily unavailable

Terms of use

  • Non-commercial use — the API is free for personal projects, research, and educational use. For commercial applications, please get in touch.
  • Attribution required — if you build something public, please credit Edible Plant Database and note that plant data is sourced from Food Plants International by Bruce French.
  • Don't bulk-copy the database — the rate limit is designed to support real applications, not wholesale scraping. If you need the full dataset, download the ZIM file.
  • Content license — all plant data returned by the API is licensed under CC BY-NC-SA 4.0. Individual images may have different licenses — see each image's license field.
  • No warranty — this API is provided as-is. Data may contain errors. Never use this API as the sole source of truth for determining if a plant is safe to eat.

Ready to start?

Sign in and generate your free API key.

Sign in