{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/prismareviews/json-schema/prismareviews-usage-schema.json",
  "title": "Usage",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/prismareviews-openapi.json#/components/schemas/Usage",
  "type": "object",
  "required": [
    "plan",
    "period",
    "locations",
    "requests",
    "requests_per_minute_limit",
    "replies_published",
    "paid_reads"
  ],
  "properties": {
    "plan": {
      "type": "string",
      "enum": [
        "spark",
        "beam",
        "spectrum",
        "aurora",
        "custom"
      ]
    },
    "period": {
      "type": "string",
      "description": "The current month, `YYYY-MM` in UTC.",
      "pattern": "^\\d{4}-\\d{2}$"
    },
    "locations": {
      "type": "object",
      "required": [
        "used",
        "limit"
      ],
      "properties": {
        "used": {
          "type": "integer",
          "description": "Active live locations (test and disconnected ones are not counted)."
        },
        "limit": {
          "type": "integer",
          "description": "Locations of your plan plus the extra locations you pay for."
        }
      }
    },
    "requests": {
      "type": "integer",
      "description": "API requests this month from all of the workspace's keys, test keys included. Requests over the rate limit are not counted."
    },
    "requests_per_minute_limit": {
      "type": "integer",
      "description": "Your per-key rate limit."
    },
    "replies_published": {
      "type": "integer",
      "description": "Replies published through Prisma this month."
    },
    "paid_reads": {
      "type": "object",
      "required": [
        "used",
        "limit"
      ],
      "properties": {
        "used": {
          "type": "integer",
          "description": "Reads used this month by platforms read through paid data providers (Yelp, Tripadvisor, Booking.com…) on live connections."
        },
        "limit": {
          "type": "integer",
          "description": "Reads included this month: the plan's plus read packs."
        },
        "free_trial": {
          "type": "object",
          "description": "One-off free reads (100 per account, never renewed) to try Google Maps and Tripadvisor with real data.",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "available",
                "active",
                "used_up",
                "verify_email",
                "not_applicable"
              ],
              "description": "`verify_email`: verify the account email first. `not_applicable`: the workspace has paid reads of its own, used instead."
            },
            "reads": {
              "type": "integer"
            },
            "used": {
              "type": "integer"
            },
            "left": {
              "type": "integer"
            },
            "platforms": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}