Grape Variety & Appellation Reference API
2,782 grape varieties from Wikidata, joined to the US rules that decide what a bottle may be called. Free, CC0 and public domain, no key.
Grape varieties, including the 330 hybrids a direct class query silently drops
VIVC cross-references, so a record joins to the ampelography catalogue
Variety-to-wine claims — labelled as claims, never as blending rules
Colour contradictions reported rather than resolved, raw values kept
What this is
A reference layer for grape varieties: what a variety is — berry colour, species, country of origin, recorded parentage, and its Wikidata and VIVC identifiers — for 2,782 cultivars worldwide, normalised from Wikidata with every raw value preserved. Alongside it sit the US composition thresholds from 27 CFR part 4 that decide what a bottle may legally be called.
It is built for wine education tools, sommelier apps and label-design software: the questions it answers well are “what colour is this grape, is it a hybrid, and what else is it called”, and “how much of a variety must be in the bottle before the label may say so”. It is deliberately not a blending-rule database, and it says so in the payload rather than in the small print.
unknown with both raw values, ambiguous names return 409 with candidates,
and a register of specific bad records is served at /v1/quality.
Live lookup
Type a grape name or a Wikidata id. Try chardonnay, the hybrid catawba, or
albarino — which is ambiguous, and answers 409 with both candidates rather
than guessing.
Try , the hybrid , or the ambiguous .
Endpoints
| Route | What it answers |
|---|---|
GET /grapes/v1/varieties | Search: q, colour, species, origin, hasVivc, isHybrid, colourConflict, minConfidence. |
GET /grapes/v1/varieties/{id} | By slug, name or Wikidata id. An ambiguous name is a 409 with candidates, never a coin flip. |
GET /grapes/v1/varieties/{id}/parents | Recorded parentage, with unresolved parents kept rather than dropped. |
GET /grapes/v1/relationships | Co-occurrence claims. Every one carries its caution. |
GET /grapes/v1/composition-rules | 27 CFR 4.23/4.25/4.27 thresholds, quoted with citations. |
GET /grapes/v1/quality | Claims known to be wrong, colour conflicts, coverage gaps. |
GET /grapes/v1/sources | Every upstream — and everything evaluated and rejected, with reasons. |
GET /grapes/v1/changes | What moved since a date. ?dataset=varieties&since= |
GET /grapes/api/v1/*.json | The complete datasets. Free and cacheable. |
Quick start
# A grape, with its raw upstream values alongside the normalised ones
curl https://apis.allanninal.dev/grapes/v1/varieties/Q213332
# An ambiguous name refuses, with candidates
curl https://apis.allanninal.dev/grapes/v1/varieties/albarino
# What the US requires before a label may say "Cabernet Sauvignon"
curl https://apis.allanninal.dev/grapes/v1/composition-rules
Three things this API will not do
Pick a winner when upstream disagrees
148 varieties carry colours that contradict each other — Sémillon is recorded as both white and black-skinned. The answer is unknown with both raw values and the reason. A confident wrong colour is worse than an honest gap.
Guess which grape you meant
Dozens of names map to more than one variety. Ask for albarino and you get a 409 listing both entities with their origins and VIVC ids — not whichever one happened to be indexed last.
Dress a claim up as a rule
Wikidata's P186 links record that an editor associated a grape with a wine. They carry no percentages and contain demonstrable errors, which are published. Every claim says so in its own body.
The part that does not exist upstream
Wikidata keeps page history but publishes no dated snapshot of its query service, so you cannot ask
what a grape record said last month. This service captures each refresh, which is what makes
/v1/changes possible at all — and what makes a silent edit visible.
Reference data (static, free, no auth)
The complete datasets as plain files — cacheable, no key, and the same data the API serves. Nothing is held back for a paid plan.
| File | Contents |
|---|---|
| index.json | Index of everything below |
| varieties.json | All 2,782 varieties, normalised values and raw ones side by side |
| varieties-wellattested.json | The subset with corroborating cross-references · name index |
| relationships.json | 3,381 co-occurrence claims, each carrying its caution |
| composition-rules.json | 27 CFR 4.23 / 4.25 / 4.27 thresholds, quoted with citations |
| quality-report.json | The register of upstream records known to be wrong |
| sources.json | Every upstream used, and everything rejected with its reason |
| plans.json · versions.json | Plan catalogue and version manifest |
Access & rate limits
| Plan | Per minute | Per day | History | Price |
|---|---|---|---|---|
| Free (anonymous) | 60 | 5,000 | 30 days | $0 |
| Free + key | 300 | 50,000 | 30 days | $0 |
| Public interest | 1,200 | 500,000 | full | $0, by application |
| Pro not open yet | 1,200 | 500,000 | full | $19/mo · $190/yr |
| Business not open yet | 6,000 | 5,000,000 | full | $49/mo · $490/yr |
Every plan has every feature. Plans differ only in how much you may use, never in what you
may reach — nothing is behind a paywall. Limits are published on every response as
RateLimit-* headers. Pro-level access is free, on request, for educators, researchers
and nonprofits. The plan catalogue.
FAQ
Does this tell me the permitted grapes for an appellation like Chianti?
No, and it never will from these sources. No Wikidata property expresses grape composition or percentage, and the EU register that does hold them publishes HTML under an attribution licence, over per-appellation PDFs in 24 languages. What you get instead is a labelled co-occurrence graph and the US thresholds in 27 CFR part 4.
Do I need an API key?
No. Every read path is anonymous and free at 60 requests a minute and 5,000 a day. No source this service uses requires a key either.
Why is a grape's colour sometimes unknown when Wikidata has one?
Because upstream contradicts itself. 148 varieties carry colours that map to different categories,
such as white and black berry skin on the same record. Rather than pick one, the API returns
unknown, every raw value, and a note naming the disagreement.
Why does a grape name sometimes return 409 instead of a record?
Because more than one distinct variety carries that name. Rather than pick arbitrarily, the API returns the candidates with enough detail to choose between them — 51 names in this corpus are ambiguous that way.
Cost
Free, no signup: 60 requests a minute, 5,000 a day, 30 days of history. Every plan reaches every endpoint and every field; plans differ only in how much you may use. Pro-level access is free, on request, for educators, researchers and nonprofits.
👋 Want an API for your idea?
This API was designed and built by Allan Niñal, an AI & software engineer who ships friendly, well-made, developer-first APIs and data products. Tell me the problem in plain words — wine, agriculture, compliance, or anything else — and I'll turn it into something that works.