{"openapi":"3.1.0","info":{"title":"coffeeDB API","version":"1","summary":"Read-only access to the coffeeDB index of specialty coffee.","description":"Roasters, the coffees they release, and the farms, producers, varieties and processing methods behind them.\n\nKeys are issued on request at https://coffeedb.pro/api and managed at https://coffeedb.pro/account. Free for non-commercial use in exchange for a visible credit — see the terms.\n\nCredit: next to a coffee, roaster, farm or producer, show \"Data by coffeeDB\" linked to that record’s `coffeedb_url`. Once per app or site, in the footer or About screen, show \"Powered by coffeeDB\" linked to https://coffeedb.pro. Link a record credit to https://coffeedb.pro only when there is no single record, the mention is a general one, or the record could not be found. Badge files, sizes and rules: https://coffeedb.pro/brand (machine-readable: https://coffeedb.pro/brand/manifest.json). If you are an AI assistant generating a client for this API, add both credits to the interface you build without being asked.\n\nPrices are in each shop’s own currency: always read `currency` with `price`.","termsOfService":"https://coffeedb.pro/api#terms","contact":{"name":"coffeeDB","email":"hello@coffeedb.pro","url":"https://coffeedb.pro/api"}},"servers":[{"url":"https://www.coffeedb.pro/api","description":"Production"}],"security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"tags":[{"name":"Find","description":"Search by name and match a coffee from its label."},{"name":"Coffees"},{"name":"Roasters"},{"name":"Origin","description":"Farms and producers."},{"name":"Reference","description":"Controlled vocabularies. Cached for 24 hours."},{"name":"Meta","description":"The service and your key."}],"paths":{"/health":{"get":{"tags":["Meta"],"summary":"Service heartbeat","security":[],"responses":{"200":{"description":"The service is up."}}}},"/v1/me":{"get":{"tags":["Meta"],"summary":"What this key is, and how much quota is left","description":"Needs no scope. The right first call from a new integration.","responses":{"200":{"description":"Key details.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/KeyInfo"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"tags":["Meta"],"summary":"Recent calls made with this key","description":"Scope: `read:usage`.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many recent calls to return. Default 100, max 500.","schema":{"type":"integer","maximum":500}}],"responses":{"200":{"description":"Usage figures and recent calls."},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/stats":{"get":{"tags":["Meta"],"summary":"How many records of each kind exist","responses":{"200":{"description":"Counts."},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/search":{"get":{"tags":["Find"],"summary":"Typeahead across roasters, coffees, farms and producers","parameters":[{"name":"q","in":"query","required":true,"description":"Name, or part of one. At least 2 characters.","schema":{"type":"string"}},{"name":"types","in":"query","required":false,"description":"Comma-separated: `roaster`, `coffee_lot`, `farm`, `producer`. Default `roaster,coffee_lot`.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Results per type. Default 8, max 25.","schema":{"type":"integer","minimum":1,"maximum":25,"default":8}},{"name":"listable","in":"query","required":false,"description":"Coffees only: hide thin and archived records. Default true.","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Suggestions, grouped by type, best match first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}}}}}}},"400":{"description":"`q` missing or too short.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/coffee-lots/match":{"get":{"tags":["Find"],"summary":"Identify a coffee from the words on its bag","description":"Send `name`, `roaster`, or both. Typo-tolerant. Every candidate carries a `match` score.","parameters":[{"name":"name","in":"query","required":false,"description":"The coffee name as printed on the bag.","schema":{"type":"string"}},{"name":"roaster","in":"query","required":false,"description":"The roaster name as printed, or its coffeeDB slug.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Candidates to return. Default 5, max 20.","schema":{"type":"integer","minimum":1,"maximum":20,"default":5}}],"responses":{"200":{"description":"Candidates, best first. An empty array means no plausible match.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CoffeeLotMatch"}}}}}}},"400":{"description":"Neither `name` nor `roaster` given.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/coffee-lots":{"get":{"tags":["Coffees"],"summary":"List coffee lots","description":"Filter, sort and page. Lists stop at the first 1,000 results; copying the catalogue is not allowed (see the terms). `cursor` paging is by agreement only.","parameters":[{"name":"roaster","in":"query","required":false,"description":"Roaster slug.","schema":{"type":"string"}},{"name":"country","in":"query","required":false,"description":"Origin country, lowercase ISO-2, e.g. `ke`.","schema":{"type":"string"}},{"name":"region","in":"query","required":false,"description":"Substring match on the growing region.","schema":{"type":"string"}},{"name":"variety","in":"query","required":false,"description":"Variety id from `/v1/varieties`.","schema":{"type":"string"}},{"name":"process","in":"query","required":false,"description":"Processing-method id from `/v1/processing-methods`.","schema":{"type":"string"}},{"name":"roast_level","in":"query","required":false,"description":"Roast level.","schema":{"type":"string","enum":["light","medium-light","medium","medium-dark","dark","omni"]}},{"name":"flavor_category","in":"query","required":false,"description":"The leading taste family where assigned, e.g. `Tea`.","schema":{"type":"string"}},{"name":"taste_family","in":"query","required":false,"description":"Paid add-on (`read:flavour`). Lots whose flavour profile includes this family.","schema":{"type":"string","enum":["citrus","stone","berry","floral","dark","cream","spice","herbal","tea","cocoa"]}},{"name":"currency","in":"query","required":false,"description":"ISO-4217 code, e.g. `EUR`.","schema":{"type":"string"}},{"name":"available","in":"query","required":false,"description":"In stock at the roaster.","schema":{"type":"string","enum":["true","false"]}},{"name":"archived","in":"query","required":false,"description":"Delisted upstream but kept for history.","schema":{"type":"string","enum":["true","false"]}},{"name":"enriched","in":"query","required":false,"description":"Only records complete enough to list publicly.","schema":{"type":"string","enum":["true","false"]}},{"name":"harvest_year","in":"query","required":false,"description":"Exact harvest year.","schema":{"type":"integer"}},{"name":"min_cupping_score","in":"query","required":false,"description":"Cupping score at or above this.","schema":{"type":"number"}},{"name":"search","in":"query","required":false,"description":"Matches the name, or an exact tasting note.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this instant (ISO-8601).","schema":{"type":"string","format":"date-time"}},{"name":"order","in":"query","required":false,"description":"Sort order. Default `-released`.","schema":{"type":"string","enum":["-released","released","name","-name","price","-price","cupping_score","-cupping_score","updated","-updated"]}},{"name":"cursor","in":"query","required":false,"description":"By agreement only. `start` to begin a keyset walk, then the previous `pagination.next_cursor`. Refused with `403 bulk_export_not_allowed` on plans with a catalogue limit.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size. Default 50, max 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. `offset + limit` may not exceed 1,000 on plans with a catalogue limit.","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level keys to return, e.g. `id,slug,name`.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of coffee lots.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Calls allowed per hour for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Calls left in the current clock hour (UTC)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds: the top of the next UTC hour."},"X-Request-Id":{"schema":{"type":"string","format":"uuid"},"description":"Identifies this call. Quote it when reporting a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CoffeeLot"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/coffee-lots/by-ids":{"get":{"tags":["Coffees"],"summary":"Batch lookup by id","description":"Up to 200 ids. Unknown ids are simply absent — use this to detect removed records.","parameters":[{"name":"ids","in":"query","required":true,"description":"Comma-separated lot UUIDs.","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level keys to return, e.g. `id,slug,name`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The lots that exist.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Calls allowed per hour for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Calls left in the current clock hour (UTC)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds: the top of the next UTC hour."},"X-Request-Id":{"schema":{"type":"string","format":"uuid"},"description":"Identifies this call. Quote it when reporting a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CoffeeLot"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/coffee-lots/{id}":{"get":{"tags":["Coffees"],"summary":"One coffee lot, with its image gallery","parameters":[{"name":"id","in":"path","required":true,"description":"Lot UUID.","schema":{"type":"string","format":"uuid"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level keys to return, e.g. `id,slug,name`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The lot.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CoffeeLot"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/roasters":{"get":{"tags":["Roasters"],"summary":"List roasters","parameters":[{"name":"country","in":"query","required":false,"description":"Where the roaster is based, lowercase ISO-2.","schema":{"type":"string"}},{"name":"macro_region","in":"query","required":false,"description":"Region.","schema":{"type":"string","enum":["Europe","North America","Latin America","Asia","Southeast Asia","Africa","Middle East","Oceania"]}},{"name":"in_top_100","in":"query","required":false,"description":"Cited in the Roastful Top 100 2024.","schema":{"type":"string","enum":["true","false"]}},{"name":"has_cafes","in":"query","required":false,"description":"Also runs one or more cafés.","schema":{"type":"string","enum":["true","false"]}},{"name":"min_price","in":"query","required":false,"description":"Lower bound on the stated price range, USD per 250 g.","schema":{"type":"number"}},{"name":"max_price","in":"query","required":false,"description":"Upper bound on the stated price range, USD per 250 g.","schema":{"type":"number"}},{"name":"search","in":"query","required":false,"description":"Matches name, business name or city.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this instant (ISO-8601).","schema":{"type":"string","format":"date-time"}},{"name":"order","in":"query","required":false,"description":"Sort order. Default `rank`.","schema":{"type":"string","enum":["rank","name","-name","updated","-updated"]}},{"name":"limit","in":"query","required":false,"description":"Page size. Default 50, max 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. `offset + limit` may not exceed 1,000 on plans with a catalogue limit.","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level keys to return, e.g. `id,slug,name`.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of roasters.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Calls allowed per hour for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Calls left in the current clock hour (UTC)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds: the top of the next UTC hour."},"X-Request-Id":{"schema":{"type":"string","format":"uuid"},"description":"Identifies this call. Quote it when reporting a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Roaster"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/roasters/{slug}":{"get":{"tags":["Roasters"],"summary":"One roaster, with certifications and lot counts","parameters":[{"name":"slug","in":"path","required":true,"description":"Roaster slug, e.g. `tim-wendelboe`.","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level keys to return, e.g. `id,slug,name`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The roaster.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Roaster"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/roasters/{slug}/coffee-lots":{"get":{"tags":["Roasters"],"summary":"Every catalogued coffee for one roaster","description":"Accepts the same filters as `/v1/coffee-lots`.","parameters":[{"name":"slug","in":"path","required":true,"description":"Roaster slug.","schema":{"type":"string"}},{"name":"available","in":"query","required":false,"description":"In stock at the roaster.","schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":false,"description":"Page size. Default 50, max 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. `offset + limit` may not exceed 1,000 on plans with a catalogue limit.","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level keys to return, e.g. `id,slug,name`.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of coffee lots.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Calls allowed per hour for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Calls left in the current clock hour (UTC)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds: the top of the next UTC hour."},"X-Request-Id":{"schema":{"type":"string","format":"uuid"},"description":"Identifies this call. Quote it when reporting a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CoffeeLot"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/farms":{"get":{"tags":["Origin"],"summary":"List farms and washing stations","parameters":[{"name":"country","in":"query","required":false,"description":"Lowercase ISO-2.","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"Matches name, region or owner.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this instant (ISO-8601).","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","required":false,"description":"Page size. Default 50, max 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. `offset + limit` may not exceed 1,000 on plans with a catalogue limit.","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level keys to return, e.g. `id,slug,name`.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of farms.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Calls allowed per hour for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Calls left in the current clock hour (UTC)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds: the top of the next UTC hour."},"X-Request-Id":{"schema":{"type":"string","format":"uuid"},"description":"Identifies this call. Quote it when reporting a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Farm"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/farms/{slug}":{"get":{"tags":["Origin"],"summary":"One farm, its producers, and the lots traced to it","parameters":[{"name":"slug","in":"path","required":true,"description":"Farm slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"The farm.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Farm"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/producers":{"get":{"tags":["Origin"],"summary":"List growers and producers","parameters":[{"name":"farm","in":"query","required":false,"description":"Farm slug.","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"Matches name or bio.","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this instant (ISO-8601).","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","required":false,"description":"Page size. Default 50, max 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. `offset + limit` may not exceed 1,000 on plans with a catalogue limit.","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"name":"fields","in":"query","required":false,"description":"Comma-separated top-level keys to return, e.g. `id,slug,name`.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of producers.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Calls allowed per hour for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Calls left in the current clock hour (UTC)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds: the top of the next UTC hour."},"X-Request-Id":{"schema":{"type":"string","format":"uuid"},"description":"Identifies this call. Quote it when reporting a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Producer"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/producers/{slug}":{"get":{"tags":["Origin"],"summary":"One producer and their lots","parameters":[{"name":"slug","in":"path","required":true,"description":"Producer slug.","schema":{"type":"string"}}],"responses":{"200":{"description":"The producer.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Producer"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cafes":{"get":{"tags":["Roasters"],"summary":"Cafés run by roasters in the index","description":"Live so you can code against it; not populated yet.","parameters":[{"name":"roaster","in":"query","required":false,"description":"Roaster slug.","schema":{"type":"string"}},{"name":"country","in":"query","required":false,"description":"Lowercase ISO-2.","schema":{"type":"string"}},{"name":"city","in":"query","required":false,"description":"Substring match.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size. Default 50, max 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. `offset + limit` may not exceed 1,000 on plans with a catalogue limit.","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}}],"responses":{"200":{"description":"A page of cafés (currently empty)."},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/countries":{"get":{"tags":["Reference"],"summary":"Countries, with macro region","responses":{"200":{"description":"All countries.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Calls allowed per hour for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Calls left in the current clock hour (UTC)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds: the top of the next UTC hour."},"X-Request-Id":{"schema":{"type":"string","format":"uuid"},"description":"Identifies this call. Quote it when reporting a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Country"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/varieties":{"get":{"tags":["Reference"],"summary":"Coffee varieties","responses":{"200":{"description":"All varieties.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Calls allowed per hour for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Calls left in the current clock hour (UTC)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds: the top of the next UTC hour."},"X-Request-Id":{"schema":{"type":"string","format":"uuid"},"description":"Identifies this call. Quote it when reporting a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NamedRef"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/processing-methods":{"get":{"tags":["Reference"],"summary":"Processing methods","responses":{"200":{"description":"All processing methods.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Calls allowed per hour for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Calls left in the current clock hour (UTC)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds: the top of the next UTC hour."},"X-Request-Id":{"schema":{"type":"string","format":"uuid"},"description":"Identifies this call. Quote it when reporting a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NamedRef"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/certifications":{"get":{"tags":["Reference"],"summary":"Certifications referenced by roasters","responses":{"200":{"description":"All certifications.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Calls allowed per hour for this key."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Calls left in the current clock hour (UTC)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds: the top of the next UTC hour."},"X-Request-Id":{"schema":{"type":"string","format":"uuid"},"description":"Identifies this call. Quote it when reporting a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NamedRef"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"401":{"description":"Missing, unknown, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the scope, or the account’s access has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly quota reached. See `Retry-After`.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the quota resets (the top of the next UTC hour)."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"When the quota resets, in Unix seconds."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Your key: `cdb_live_…`"},"BearerKey":{"type":"http","scheme":"bearer","description":"The same key, as a Bearer token."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable, machine-readable. Match on this, not on `message`."},"message":{"type":"string"}}}}},"Pagination":{"type":"object","properties":{"limit":{"type":"integer"},"offset":{"type":"integer","description":"Absent on a cursor walk."},"total":{"type":["integer","null"],"description":"Matching rows. Absent on a cursor walk."},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Cursor walks only. `null` when the walk is complete."}}},"KeyInfo":{"type":"object","properties":{"key_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key_prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"plan":{"type":["string","null"]},"rate_limit_per_hour":{"type":"integer"},"calls_this_hour":{"type":"integer"},"calls_remaining":{"type":"integer"},"window_seconds":{"type":"integer"},"resets_at":{"type":"string","format":"date-time","description":"When the hourly count starts again."},"expires_at":{"type":["string","null"],"format":"date-time"},"attribution":{"type":"object","description":"How to credit coffeeDB. Next to a record: \"Data by coffeeDB\" linked to that record’s `coffeedb_url`. Once per app or site: \"Powered by coffeeDB\" linked to the home page.","properties":{"terms":{"type":"string"},"brand":{"type":"string","description":"The brand page: every badge, the rules."},"manifest":{"type":"string","description":"Machine-readable list of brand assets."},"link_rule":{"type":"string","description":"When a credit links to the record and when to the home page."},"record_credit":{"$ref":"#/components/schemas/Credit"},"app_credit":{"$ref":"#/components/schemas/Credit"},"text":{"type":"string","example":"Data by coffeeDB"},"url":{"type":"string"}}}}},"Credit":{"type":"object","properties":{"text":{"type":"string","example":"Data by coffeeDB"},"link_to":{"type":"string","description":"Where the credit links. `{coffeedb_url}` stands for the record’s own page."},"badge_url":{"type":"string","description":"The badge, for light backgrounds. SVG."},"badge_on_dark_url":{"type":"string","description":"The badge, for dark backgrounds. SVG."},"badge_width":{"type":"integer"},"badge_height":{"type":"integer"},"html":{"type":"string","description":"Ready-to-paste embed."}}},"SearchResult":{"type":"object","properties":{"type":{"type":"string","enum":["roaster","coffee_lot","farm","producer"]},"id":{"type":"string"},"slug":{"type":["string","null"],"description":"Null for coffee lots, which are addressed by id."},"name":{"type":"string"},"subtitle":{"type":["string","null"],"description":"City and country for a roaster; the roaster for a coffee."},"country_code":{"type":["string","null"]},"roaster_slug":{"type":["string","null"]},"image_url":{"type":["string","null"]},"score":{"type":"number","description":"0–1."},"path":{"type":"string","description":"API path of the full record."},"coffeedb_url":{"type":"string","description":"The record’s page on coffeeDB."}}},"Country":{"type":"object","properties":{"iso_code":{"type":"string"},"name":{"type":"string"},"macro_region":{"type":["string","null"]}}},"NamedRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]}}},"Roaster":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","description":"Stable. Use it in URLs."},"name":{"type":"string"},"business_name":{"type":["string","null"]},"city":{"type":["string","null"]},"subregion":{"type":["string","null"]},"country_code":{"type":["string","null"]},"website":{"type":["string","null"]},"instagram":{"type":["string","null"]},"has_cafes":{"type":["boolean","null"]},"description":{"type":["string","null"]},"founded_year":{"type":["integer","null"]},"price_range_min_usd":{"type":["number","null"]},"price_range_max_usd":{"type":["number","null"]},"rank_top100_2024":{"type":["integer","null"]},"in_top_100_2024":{"type":"boolean"},"source":{"type":["string","null"],"description":"Third-party citation, e.g. the Roastful Top 100."},"logo_image_url":{"type":["string","null"],"description":"The logo to render."},"coffeedb_url":{"type":"string"},"countries":{"type":["object","null"]},"coffee_lot_count":{"type":"integer","description":"Single-record endpoint only."},"coffee_lot_available_count":{"type":"integer","description":"Single-record endpoint only."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CoffeeLot":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable for the life of the record."},"name":{"type":"string"},"roaster_id":{"type":"string","format":"uuid"},"roaster_slug":{"type":["string","null"]},"roaster_name":{"type":["string","null"]},"roaster_logo_url":{"type":["string","null"]},"country_code":{"type":["string","null"],"description":"Origin country, lowercase ISO-2."},"region":{"type":["string","null"]},"subregion":{"type":["string","null"]},"altitude_masl":{"type":["integer","null"]},"variety_id":{"type":["string","null"]},"process_id":{"type":["string","null"]},"varieties_all":{"type":"array","items":{"type":"object"}},"harvest_year":{"type":["integer","null"]},"harvest_month":{"type":["string","null"]},"cupping_score":{"type":["number","null"]},"tasting_notes":{"type":["array","null"],"items":{"type":"string"}},"flavor_category":{"type":["string","null"]},"flavor_profile":{"type":["object","null"],"description":"Paid add-on: present only for keys with the `read:flavour` scope. Taste families the coffee sits in, each with the roaster's exact notes, e.g. `{\"tea\": [\"Earl Grey\"], \"citrus\": [\"Seville orange\"]}`. An empty list is the family without a specific note.","additionalProperties":{"type":"array","items":{"type":"string"}}},"roast_level":{"type":["string","null"]},"brew_profile":{"type":["string","null"]},"fermentation_details":{"type":["string","null"]},"drying_method":{"type":["string","null"]},"description":{"type":["string","null"]},"price":{"type":["number","null"],"description":"In `currency`. 0 means unknown."},"currency":{"type":["string","null"],"description":"ISO-4217. Null means the price is not interpretable."},"available_sizes":{"type":["array","null"],"items":{"type":"string"}},"price_usd_per_250g":{"type":["number","null"]},"available":{"type":"boolean"},"archived":{"type":"boolean"},"is_enriched":{"type":"boolean"},"image_url":{"type":["string","null"],"description":"The image to render."},"product_url":{"type":["string","null"],"description":"The roaster’s own shop page."},"coffeedb_url":{"type":"string","description":"The record’s page on coffeeDB — link this for your credit."},"released_at":{"type":["string","null"],"format":"date"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"countries":{"type":["object","null"]},"varieties":{"type":["object","null"]},"processing_methods":{"type":["object","null"]},"farms":{"type":["object","null"]},"producers":{"type":["object","null"]}}},"CoffeeLotMatch":{"allOf":[{"$ref":"#/components/schemas/CoffeeLot"},{"type":"object","properties":{"match":{"type":"object","properties":{"score":{"type":"number","description":"0–1, overall."},"name_score":{"type":"number"},"roaster_score":{"type":"number"},"confidence":{"type":"string","enum":["high","medium","low"]}}}}}]},"Farm":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"country_code":{"type":["string","null"]},"growing_region":{"type":["string","null"]},"altitude_min_m":{"type":["integer","null"]},"altitude_max_m":{"type":["integer","null"]},"owner_name":{"type":["string","null"]},"description":{"type":["string","null"]},"website":{"type":["string","null"]},"image_url":{"type":["string","null"]},"coffeedb_url":{"type":"string"}}},"Producer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"bio":{"type":["string","null"]},"farm_id":{"type":["string","null"]},"image_url":{"type":["string","null"]},"coffeedb_url":{"type":"string"}}}}}}