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.

No API keyCC0 + public domain2,782 varieties60 req/min freeOpenAPI
2,782

Grape varieties, including the 330 hybrids a direct class query silently drops

1,608

VIVC cross-references, so a record joins to the ampelography catalogue

3,381

Variety-to-wine claims — labelled as claims, never as blending rules

148

Colour contradictions reported rather than resolved, raw values kept

What this does not do, up front. It will not tell you the permitted grapes or blending percentages for an AOC or DOCG. That data is not obtainable — no Wikidata property expresses composition, and the EU register that does hold it publishes HTML under an attribution licence over per-appellation PDFs in 24 languages. What you get instead is a co-occurrence graph, labelled as claims, plus the US thresholds that actually govern a US label. The full reasoning is in the API.

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.

It is built to be wrong out loud. The upstream is crowd-sourced, so this service publishes what it knows is broken instead of hiding it: contradictions come back as 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

RouteWhat it answers
GET /grapes/v1/varietiesSearch: 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}/parentsRecorded parentage, with unresolved parents kept rather than dropped.
GET /grapes/v1/relationshipsCo-occurrence claims. Every one carries its caution.
GET /grapes/v1/composition-rules27 CFR 4.23/4.25/4.27 thresholds, quoted with citations.
GET /grapes/v1/qualityClaims known to be wrong, colour conflicts, coverage gaps.
GET /grapes/v1/sourcesEvery upstream — and everything evaluated and rejected, with reasons.
GET /grapes/v1/changesWhat moved since a date. ?dataset=varieties&since=
GET /grapes/api/v1/*.jsonThe 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.

FileContents
index.jsonIndex of everything below
varieties.jsonAll 2,782 varieties, normalised values and raw ones side by side
varieties-wellattested.jsonThe subset with corroborating cross-references · name index
relationships.json3,381 co-occurrence claims, each carrying its caution
composition-rules.json27 CFR 4.23 / 4.25 / 4.27 thresholds, quoted with citations
quality-report.jsonThe register of upstream records known to be wrong
sources.jsonEvery upstream used, and everything rejected with its reason
plans.json · versions.jsonPlan catalogue and version manifest

Access & rate limits

PlanPer minutePer dayHistoryPrice
Free (anonymous)605,00030 days$0
Free + key30050,00030 days$0
Public interest1,200500,000full$0, by application
Pro not open yet1,200500,000full$19/mo · $190/yr
Business not open yet6,0005,000,000full$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.