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

MethodPathDescriptionAuth Required
GET/plantsBrowse plant databaseYes
GET/plants/:idGet plant detailsYes
POST/plantsCreate a custom plantYes
PUT/plants/:idUpdate an owned custom plantYes
DELETE/plants/:idDelete an owned custom plantYes
POST/plots/:id/plantsAdd a plant to a plotYes

Browse Plant Database

Search and filter the plant database.

GET /plants

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
per_pageinteger20Items per page (max 500)
searchstringSearch by common name, cultivar, or scientific name
typestringFilter 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

ParameterTypeDescription
plotIdstringThe plot’s ID

Request Body

FieldTypeRequiredDescription
plant_idstringYesID from the plant database
varietystringNoSpecific variety name (e.g., “Cherokee Purple”)
planted_datestringNoDate planted in RFC 3339 format
quantityintegerNoNumber of plants (default: 1)
notesstringNoAdditional 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

FieldTypeRequiredDescription
varietystringNoVariety name
planted_datestringNoDate planted (RFC 3339)
quantityintegerNoNumber of plants
statusstringNoOne of: planted, growing, flowering, fruiting, harvesting, dormant, removed
notesstringNoAdditional 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

ScenarioHTTP StatusError Code
Plant not found in database404NOT_FOUND
Plot not found404NOT_FOUND
Plant not in this plot404NOT_FOUND
Invalid plant_id400VALIDATION_ERROR
Not your plot403FORBIDDEN
Not authenticated401UNAUTHORIZED