Overview
The Plants API returns more than 200 built-in plants and cultivars together with the authenticated gardener’s custom plants. Browse by common name, cultivar, scientific name, or plant type, then add a plant to a plot to track its growth.
Endpoints
| Method | Path | Description | Auth Required |
|---|---|---|---|
GET | /plants | Browse plant database | Yes |
GET | /plants/:id | Get plant details | Yes |
POST | /plants | Create a custom plant | Yes |
PUT | /plants/:id | Update an owned custom plant | Yes |
DELETE | /plants/:id | Delete an owned custom plant | Yes |
POST | /plots/:id/plants | Add a plant to a plot | Yes |
Browse Plant Database
Search and filter the plant database.
GET /plants
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
per_page | integer | 20 | Items per page (max 500) |
search | string | — | Search by common name, cultivar, or scientific name |
type | string | — | Filter by type: vegetable, fruit, herb, flower, root, or legume |
Response 200 OK
{
"data": [
{
"id": "11111111-1111-1111-1111-111111111111",
"name": "Tomato",
"variety": "Cherokee Purple",
"scientific_name": "Solanum lycopersicum",
"description": "Cherokee Purple is a Tomato cultivar.",
"days_to_harvest": 85,
"days_to_germinate": 7,
"spacing_inches": 24,
"depth_inches": 0.25,
"sun": "full",
"usda_zone_min": "3",
"usda_zone_max": "11",
"perennial": false,
"plant_type": "vegetable",
"user_id": null,
"is_system_catalog": true,
"created_at": "2026-08-23T00:00:00Z",
"updated_at": "2026-08-23T00:00:00Z"
}
],
"total": 1,
"page": 1,
"per_page": 20,
"total_pages": 1
}
Examples
cURL
# Search for tomato varieties
curl -X GET "https://garden.gg/api/v1/plants?search=tomato&type=vegetable" \
-H "Authorization: Bearer gg_live_your_api_key_here"
Python
import requests
headers = {"Authorization": "Bearer gg_live_your_api_key_here"}
# Search for herbs
response = requests.get(
"https://garden.gg/api/v1/plants",
headers=headers,
params={"type": "herb", "per_page": 100},
)
plants = response.json()
for plant in plants["data"]:
print(f"{plant['name']} ({plant['variety']})")
Node.js
const params = new URLSearchParams({ search: "pepper", type: "vegetable" });
const response = await fetch(
`https://garden.gg/api/v1/plants?${params.toString()}`,
{ headers: { Authorization: "Bearer gg_live_your_api_key_here" } }
);
const { data: plants } = await response.json();
plants.forEach((p) => console.log(`${p.name} (${p.variety}) — ${p.days_to_harvest} days`));
Get Plant Details
Retrieve detailed information about a specific plant from the database.
GET /plants/:id
Response 200 OK
{
"id": "11111111-1111-1111-1111-111111111111",
"name": "Carrot",
"variety": "Purple Haze",
"scientific_name": "Daucus carota",
"days_to_harvest": 70,
"days_to_germinate": 14,
"spacing_inches": 2,
"depth_inches": 0.25,
"sun": "full",
"usda_zone_min": "3",
"usda_zone_max": "11",
"perennial": false,
"plant_type": "root",
"user_id": null,
"is_system_catalog": true
}
Built-in rows have is_system_catalog: true and are read-only. Custom rows can be updated or deleted only by the user who created them.
Add Plant to Plot
Add a plant from the database to one of your plots.
POST /plots/:plotId/plants
Path Parameters
| Parameter | Type | Description |
|---|---|---|
plotId | string | The plot’s ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
plant_id | string | Yes | ID from the plant database |
variety | string | No | Specific variety name (e.g., “Cherokee Purple”) |
planted_date | string | No | Date planted in RFC 3339 format |
quantity | integer | No | Number of plants (default: 1) |
notes | string | No | Additional notes about this planting |
Request
{
"plant_id": "plant_t0m4t0",
"variety": "Cherokee Purple",
"planted_date": "2026-04-15T00:00:00Z",
"quantity": 3,
"notes": "Started from seed indoors on March 1"
}
Response 201 Created
{
"id": "ppl_c3d4e5f6",
"plot_id": "plt_m3n4o5p6",
"plant_id": "plant_t0m4t0",
"plant_name": "Tomato",
"variety": "Cherokee Purple",
"planted_date": "2026-04-15T00:00:00Z",
"quantity": 3,
"status": "planted",
"notes": "Started from seed indoors on March 1",
"created_at": "2026-03-15T10:00:00Z",
"updated_at": "2026-03-15T10:00:00Z"
}
Examples
cURL
curl -X POST "https://garden.gg/api/v1/plots/plt_m3n4o5p6/plants" \
-H "Authorization: Bearer gg_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"plant_id": "plant_t0m4t0",
"variety": "Cherokee Purple",
"planted_date": "2026-04-15T00:00:00Z",
"quantity": 3
}'
Python
import requests
response = requests.post(
"https://garden.gg/api/v1/plots/plt_m3n4o5p6/plants",
headers={
"Authorization": "Bearer gg_live_your_api_key_here",
"Content-Type": "application/json",
},
json={
"plant_id": "plant_t0m4t0",
"variety": "Cherokee Purple",
"planted_date": "2026-04-15T00:00:00Z",
"quantity": 3,
},
)
plant = response.json()
print(f"Added {plant['variety']} to plot: {plant['id']}")
Node.js
const response = await fetch(
"https://garden.gg/api/v1/plots/plt_m3n4o5p6/plants",
{
method: "POST",
headers: {
Authorization: "Bearer gg_live_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
plant_id: "plant_t0m4t0",
variety: "Cherokee Purple",
planted_date: "2026-04-15T00:00:00Z",
quantity: 3,
}),
}
);
const plant = await response.json();
console.log(`Added ${plant.variety} to plot: ${plant.id}`);
Update Plant in Plot
Update details of a plant that has been added to a plot.
PUT /plots/:plotId/plants/:id
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
variety | string | No | Variety name |
planted_date | string | No | Date planted (RFC 3339) |
quantity | integer | No | Number of plants |
status | string | No | One of: planted, growing, flowering, fruiting, harvesting, dormant, removed |
notes | string | No | Additional notes |
Response 200 OK
Returns the full updated plant object.
Remove Plant from Plot
Remove a plant record from a plot.
DELETE /plots/:plotId/plants/:id
Response 204 No Content
No response body.
Error Responses
| Scenario | HTTP Status | Error Code |
|---|---|---|
| Plant not found in database | 404 | NOT_FOUND |
| Plot not found | 404 | NOT_FOUND |
| Plant not in this plot | 404 | NOT_FOUND |
| Invalid plant_id | 400 | VALIDATION_ERROR |
| Not your plot | 403 | FORBIDDEN |
| Not authenticated | 401 | UNAUTHORIZED |