Example integrations for the grapeminds Wine API, a developer-friendly API that provides structured wine data for applications, services, and AI tools.
Perfect for building wine apps, wine recommendation systems, hospitality software, and AI assistants.
The API allows developers to access detailed information about wines, producers, regions, and grape varieties. It is designed for easy integration into apps, POS systems, wine platforms, and recommendation engines.
If you are building a wine app, hospitality software, AI assistant, or e-commerce platform, the grapeminds Wine API helps you quickly integrate reliable wine data.
The API can also be used as a wine dataset API for AI and machine learning applications.
The Grapeminds API provides access to:
- wine metadata
- producers and wineries
- wine regions
- grape varieties
- structured wine information for apps and services
Typical use cases include:
- wine discovery apps
- wine cellar management software
- restaurant POS systems and digital wine lists
- wine shop integrations
- recommendation engines
- AI assistants and chatbots
https://grapeminds.eu/api/public/v1
All endpoints are relative to this base URL.
Every request requires an API key passed as a header:
Authorization: Bearer YOUR_API_KEY
Alternatively: X-API-Key: YOUR_API_KEY
Obtain your API key at https://grapeminds.eu/developers#registration.
Set the key as an environment variable before running the example scripts:
export API_KEY=your_key_hereThe fastest way to test the API is using the /ping endpoint.
GET /ping
Example request:
curl -H "Authorization: Bearer $API_KEY" \
https://grapeminds.eu/api/public/v1/pingExample response:
{
"status": "ok",
"service": "grapeminds-api"
}Health check – verifies authentication and API availability.
List wines with pagination and filtering.
GET /wines?color=red&per_page=5
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer | 1 | Page number |
per_page |
integer | 15 | Results per page (max 100) |
color |
string | — | Filter: red, white, rose |
sub_type |
string | — | Filter: still, sparkling |
producer_id |
integer | — | Filter by producer ID |
region_id |
integer | — | Filter by region ID |
Example response:
{
"data": [
{
"id": 42,
"display_name": "Barolo DOCG 2018",
"color": "red",
"sub_type": "still",
"residual_sugar": "dry",
"producer": { "id": 10, "name": "Marchesi di Barolo", "display_name": "Marchesi di Barolo" },
"region": { "id": 5, "name": "Barolo", "country": "IT" }
}
],
"meta": { "current_page": 1, "last_page": 83, "per_page": 5, "total": 415 }
}Full-text search with fuzzy matching and typo tolerance.
GET /wines/search?q=Barolo&limit=5
| Parameter | Type | Required | Description |
|---|---|---|---|
q |
string | yes | Search query (min. 3 characters) |
limit |
integer | no | Max results, max 100 (default: 20) |
Full wine details: descriptions, grape varieties, food pairings, tasting notes, and flavor profile.
GET /wines/42
Use the Accept-Language header (de, en, fr, it) for localized content. If a translation is not yet available, AI enrichment is triggered automatically in the background.
List producers with pagination and optional search.
GET /producers?search=Marchesi&per_page=10
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer | 1 | Page number |
per_page |
integer | 15 | Results per page (max 100) |
search |
string | — | Name search (min. 2 characters) |
Producer details, optionally with their wines.
GET /producers/10?include_wines=true
| Parameter | Type | Default | Description |
|---|---|---|---|
include_wines |
boolean | false | Include up to 50 wines |
List wine regions with optional country filter and search.
GET /regions?country=IT&per_page=10
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer | 1 | Page number |
per_page |
integer | 15 | Results per page (max 100) |
country |
string | — | ISO country code (e.g. IT, FR, DE) |
search |
string | — | Name search (min. 2 characters) |
Region names are localized via the Accept-Language header.
Region details, optionally with wines from that region.
GET /regions/5?include_wines=true
| Parameter | Type | Default | Description |
|---|---|---|---|
include_wines |
boolean | false | Include up to 50 wines |
AI-generated regional profile: climate, terroir, signature styles, and key grape varieties.
GET /region-insights/5?lang=en
If the insight is not yet available for the requested language, a 404 is returned with "generating": true. Retry after ~30 seconds.
Optimal drinking window for a wine: year range, young/mature assessments, and storage guidance.
GET /drinking-periods/42?lang=en
If the content is not yet available for the requested language, a 404 is returned with "generating": true. Retry after ~30 seconds.
Analyze a wine label photo using AI. Returns matched wine candidates from the database. Requires an Enterprise API subscription.
POST /photo/analyze
{ "photo": "<base64-encoded image>", "max_results": 5 }This repository provides ready-to-run scripts for calling the grapeminds Wine API in several programming languages.
examples/
curl/examples.sh – shell script using curl
node/examples.js – Node.js 18+ using built-in fetch
typescript/examples.ts – TypeScript with type definitions (Node 18+)
python/examples.py – Python using requests
ruby/examples.rb – Ruby using net/http (stdlib, no gems)
php/examples.php – PHP using cURL
swift/examples.swift – Swift 5.5+ using URLSession + async/await
dart/examples.dart – Dart / Flutter using package:http
Each script covers all documented endpoints and prints the JSON responses.
Make sure your API key is set (see Authentication above):
export API_KEY=your_key_herebash examples/curl/examples.shnode examples/node/examples.jspip install requests
python examples/python/examples.pyphp examples/php/examples.phpnpm install -g ts-node typescript
API_KEY=your_key ts-node examples/typescript/examples.tsAPI_KEY=your_key ruby examples/ruby/examples.rbAPI_KEY=your_key swift examples/swift/examples.swiftdart pub add http
API_KEY=your_key dart run examples/dart/examples.dartThe quickest way to try a single endpoint in each language (set API_KEY first):
curl
curl -H "Authorization: Bearer $API_KEY" \
https://grapeminds.eu/api/public/v1/winesNode.js
const res = await fetch("https://grapeminds.eu/api/public/v1/wines", {
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
console.log(await res.json());Python
import os, requests
headers = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
print(requests.get("https://grapeminds.eu/api/public/v1/wines", headers=headers).json())PHP
$ctx = stream_context_create(['http' => [
'header' => 'Authorization: Bearer ' . getenv('API_KEY'),
]]);
echo file_get_contents("https://grapeminds.eu/api/public/v1/wines", false, $ctx);TypeScript
const res = await fetch("https://grapeminds.eu/api/public/v1/wines", {
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
console.log(await res.json());Ruby
require "net/http"; require "json"
req = Net::HTTP::Get.new(URI("https://grapeminds.eu/api/public/v1/wines"))
req["Authorization"] = "Bearer #{ENV['API_KEY']}"
res = Net::HTTP.start("grapeminds.eu", 443, use_ssl: true) { |h| h.request(req) }
puts JSON.pretty_generate(JSON.parse(res.body))Swift
var req = URLRequest(url: URL(string: "https://grapeminds.eu/api/public/v1/wines")!)
req.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
let (data, _) = try await URLSession.shared.data(for: req)
print(String(data: data, encoding: .utf8)!)Dart / Flutter
final res = await http.get(
Uri.parse('https://grapeminds.eu/api/public/v1/wines'),
headers: {'Authorization': 'Bearer $apiKey'},
);
print(res.body);The API supports multiple languages for wine metadata and descriptions.
Supported languages include:
- English
- German
- French
- Italian
Example header:
Accept-Language: en
Full developer documentation:
https://grapeminds.eu/developers/endpoints
grapeminds is a wine intelligence and cellar management platform that provides structured wine data and AI-powered wine services.
The platform helps developers, hospitality businesses, and wine enthusiasts manage wine information and build wine-related applications.
Learn more:
Contributions, improvements, and additional examples are welcome.
Feel free to open issues or submit pull requests.
⭐ If you are building a wine app or wine-related project, consider starring this repository.