API DOCS LIVE

Introduction

Public REST API for the Grow a Garden 2 stock predictor, weather forecaster, and rarest pets index. All data is derived from live in-game shop cycles. Responses are JSON. No authentication required. No rate limiting.

https://growagarden2.xnoid.studio
GET /api/data

Returns the full raw data object containing all seeds, gears, weather cycles, anchors, and metadata. This is the complete dataset used by the frontend.

Example Request
# Fetch the complete dataset
curl https://growagarden2.xnoid.studio/api/data
Response
{
  "period": 300,
  "seedAnchor": 1748121600,
  "gearAnchor": 1748121600,
  "count": 2016,
  "generatedAt": 1748227200,
  "seeds": [
    {
      "name": "Carrot",
      "price": 500,
      "rarity": "Common",
      "q": [0,0,25,0,...]
    }
  ],
  "gears": [ ... ],
  "weather": {
    "clen": 720,
    "startCycle": 0,
    "phases": [
      { "name": "Day", "offset": 0 },
      { "name": "Sunset", "offset": 450 },
      { "name": "Night", "offset": 465 }
    ],
    "seq": [ ... ]
  }
}
Key Fields
FieldTypeDescription
periodnumberShop restock period in seconds (typically 300)
seedAnchor / gearAnchornumberUnix timestamp anchor for the current cycle window
seeds / gearsarrayArray of items with name, price, rarity, and quantity history (q[])
weatherobjectWeather cycle config: cycle length (clen), phases, and sequence array
GET /api/shop/:tab

Returns the current stock status and next restock predictions for the given shop tab.

Path Parameters
ParameterTypeDescription
tabstringShop tab — seeds or gears
Example Request
# Get seed shop predictions
curl https://growagarden2.xnoid.studio/api/shop/seeds

# Get gear shop predictions
curl https://growagarden2.xnoid.studio/api/shop/gears
Response
{
  "tab": "seeds",
  "anchor": 1748121600,
  "period": 300,
  "generatedAt": 1748227200,
  "items": [
    {
      "name": "Carrot",
      "price": 500,
      "rarity": "Common",
      "inStock": 0,
      "nextRestock": {
        "timestamp": 1748227500,
        "quantity": 25,
        "in": 180
      },
      "timeUntilNext": 180
    }
  ],
  "status": {
    "label": "Restock in",
    "countdown": "3m 0s",
    "nextTimestamp": 1748227500
  }
}
Response Fields
FieldTypeDescription
items[].inStocknumberCurrent stock quantity (0 if out of stock)
items[].nextRestockobject|nullNext predicted restock with timestamp, quantity, and seconds until
items[].timeUntilNextnumber|nullSeconds until next restock
status.countdownstringFormatted countdown to next global restock (e.g. "3m 0s")
GET /api/weather

Returns the current weather phase, time remaining, and upcoming weather forecasts for the next several cycles.

Example Request
curl https://growagarden2.xnoid.studio/api/weather
Response
{
  "current": {
    "name": "Day",
    "phase": "Day",
    "secondsLeft": 225,
    "formatted": "03:45"
  },
  "upcoming": [
    { "name": "Sunset", "seconds": 225, "formatted": "4m" },
    { "name": "Night", "seconds": 240, "formatted": "4m" }
  ],
  "cycleLength": 720,
  "status": {
    "label": "Next phase in",
    "countdown": "03:45"
  }
}
Weather Names
NamePhaseDescription
DayDayClear daytime
SunsetSunsetTransition to night
MoonNightClear night with moon
GoldmoonNightGolden tinted moon
Rainbow MoonNightIridescent moon
BloodmoonNightCrimson red moon
RainDayHeavy storm
SnowfallDayBlizzard
RainbowDayPastel rainbow sky
LightningNightThunderstorm with bolts
GET /api/pets

Returns the rarest pets index, ranked by scarcity. Includes name, rarity, size, rainbow status, estimated existence count, and rarity odds.

Example Request
curl https://growagarden2.xnoid.studio/api/pets
Response (truncated)
[
  {
    "rank": "\u2726",
    "name": "Mega Rainbow Ice Serpent",
    "rarity": "Super",
    "size": "Mega",
    "rainbow": true,
    "exist": null,
    "odds": "???,???,???,???"
  },
  {
    "rank": "1",
    "name": "Mega Rainbow Bee",
    "rarity": "Legendary",
    "size": "Mega",
    "rainbow": true,
    "exist": 1,
    "odds": "50,000,000"
  }
]
Response Fields
FieldTypeDescription
rankstringRank number or "\u2726" for the top unconfirmed pet
namestringPet name
raritystringRarity tier (Common through Super)
sizestringSize variant: Normal, Big, or Mega
rainbowbooleanWhether the pet has the rainbow variant
existnumber|nullEstimated number in existence (null = unconfirmed)
oddsstringRarity odds (e.g. "50,000,000")
GET /api/restock

Returns seed restock history — when each seed was last in stock and how long ago. Useful for tracking which seeds are due to appear next.

Example Request
curl https://growagarden2.xnoid.studio/api/restock
Response (truncated)
{
  "seeds": [
    {
      "name": "Tulip",
      "slug": "tulip",
      "rarity": "Uncommon",
      "color": "#5ad15a",
      "inStock": false,
      "stockQuantity": 0,
      "status": "5h 23m ago",
      "lastSeen": 1748200800
    }
  ],
  "anchor": 1748121600,
  "period": 300
}
Response Fields
FieldTypeDescription
seeds[].inStockbooleanWhether this seed is currently in stock
seeds[].stockQuantitynumberCurrent quantity (0 if out of stock)
seeds[].statusstringHuman-readable time since last seen
seeds[].lastSeennumber|nullUnix timestamp of last stock appearance
GET /api/status/:tab

Returns the global countdown status for a given tab. Lightweight endpoint for polling the next restock or weather phase change.

Path Parameters
ParameterTypeDescription
tabstringTab — seeds, gears, or weather
Example Request
# Get seed shop countdown
curl https://growagarden2.xnoid.studio/api/status/seeds

# Get weather phase countdown
curl https://growagarden2.xnoid.studio/api/status/weather
Response
// /api/status/seeds
{
  "label": "Restock in",
  "countdown": "3m 0s",
  "nextTimestamp": 1748227500
}

// /api/status/weather
{
  "label": "Next phase in",
  "countdown": "03:45"
}
Response Fields
FieldTypeDescription
labelstringContext label ("Restock in" or "Next phase in")
countdownstringFormatted time remaining
nextTimestampnumberUnix timestamp of next event (seeds/gears only)