{
  "openapi": "3.1.0",
  "info": {
    "title": "Value Grow a Garden — GAG2 Open Data API",
    "version": "2026-07-30.1",
    "description": "Free, read-only JSON access to dated Grow a Garden 2 community-source audits. This is an unofficial fan API, not a live Roblox or game-developer feed.",
    "termsOfService": "https://valuegrowagarden.com/terms-of-service",
    "contact": {
      "name": "Value Grow a Garden data corrections",
      "url": "https://valuegrowagarden.com/submit-data"
    }
  },
  "servers": [
    {
      "url": "https://valuegrowagarden.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "API documentation, provenance and usage policy",
    "url": "https://valuegrowagarden.com/grow-a-garden-2/data-api"
  },
  "tags": [
    {
      "name": "Catalog",
      "description": "Release and resource discovery"
    },
    {
      "name": "GAG2 data",
      "description": "Versioned source-audit records"
    }
  ],
  "paths": {
    "/api/gag2/v1": {
      "get": {
        "operationId": "getGag2Catalog",
        "summary": "List available GAG2 resources and releases",
        "tags": [
          "Catalog"
        ],
        "responses": {
          "200": {
            "description": "API catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                }
              }
            }
          }
        }
      }
    },
    "/api/gag2/v1/how-to-get": {
      "get": {
        "operationId": "listGag2AcquisitionRecords",
        "summary": "Search seed, pet and gear acquisition records",
        "tags": [
          "GAG2 data"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "name": "type",
            "in": "query",
            "description": "Exact item type",
            "schema": {
              "type": "string",
              "enum": [
                "seed",
                "pet",
                "gear"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RecordList"
          }
        }
      }
    },
    "/api/gag2/v1/crop-values": {
      "get": {
        "operationId": "listGag2CropValues",
        "summary": "Search dated crop Sell Stand value references",
        "tags": [
          "GAG2 data"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "name": "harvest",
            "in": "query",
            "description": "Exact harvest type",
            "schema": {
              "type": "string",
              "enum": [
                "single",
                "repeat"
              ]
            }
          },
          {
            "name": "evidence",
            "in": "query",
            "description": "Exact evidence label",
            "schema": {
              "type": "string",
              "enum": [
                "current-reference",
                "dated-conflict"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RecordList"
          }
        }
      }
    },
    "/api/gag2/v1/codes": {
      "get": {
        "operationId": "listGag2Codes",
        "summary": "Search reported-active code records",
        "tags": [
          "GAG2 data"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Exact published status",
            "schema": {
              "type": "string",
              "example": "reported-active"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/RecordList"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "Query": {
        "name": "q",
        "in": "query",
        "description": "Case-insensitive text search",
        "schema": {
          "type": "string",
          "maxLength": 200
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "description": "Maximum records returned; clamped from 1 to 100",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 50
        }
      }
    },
    "responses": {
      "RecordList": {
        "description": "Filtered records with release and manifest metadata",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RecordList"
            }
          }
        }
      }
    },
    "schemas": {
      "Catalog": {
        "type": "object",
        "required": [
          "api",
          "version",
          "resources",
          "limitations"
        ],
        "properties": {
          "api": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "game": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          },
          "openapi": {
            "type": "string",
            "format": "uri"
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RecordList": {
        "type": "object",
        "required": [
          "apiVersion",
          "resource",
          "datasetVersion",
          "releaseId",
          "matched",
          "returned",
          "records",
          "disclaimer"
        ],
        "properties": {
          "apiVersion": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "datasetVersion": {
            "type": "string"
          },
          "releaseId": {
            "type": "string"
          },
          "dataPath": {
            "type": "string",
            "format": "uri"
          },
          "manifestPath": {
            "type": "string",
            "format": "uri"
          },
          "filters": {
            "type": "object",
            "additionalProperties": true
          },
          "matched": {
            "type": "integer",
            "minimum": 0
          },
          "returned": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "records": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "disclaimer": {
            "type": "string"
          }
        }
      }
    }
  }
}
