{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/publicwww-com/json-schema/publicwww-com-account-schema.json",
  "title": "Account",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/publicwww-com-openapi.json#/components/schemas/Account",
  "type": "object",
  "required": [
    "now",
    "plan",
    "plan_until",
    "full_access",
    "quota",
    "limits"
  ],
  "properties": {
    "now": {
      "type": "integer",
      "description": "Unix time on the server now; resets_at minus now is how long until the daily counters start again."
    },
    "plan": {
      "type": "string"
    },
    "plan_until": {
      "type": "integer",
      "description": "Unix time the plan is paid until; 0 without a plan."
    },
    "full_access": {
      "type": "boolean",
      "description": "Whether the API is available to this account."
    },
    "quota": {
      "type": "object",
      "required": [
        "searches",
        "snippets"
      ],
      "properties": {
        "searches": {
          "$ref": "#/$defs/QuotaCounter"
        },
        "snippets": {
          "$ref": "#/$defs/QuotaCounter"
        }
      }
    },
    "limits": {
      "type": "object",
      "required": [
        "disclosed_positions",
        "disclosed_positions_snippets",
        "max_per_page",
        "max_per_page_snippets"
      ],
      "properties": {
        "disclosed_positions": {
          "type": "integer",
          "description": "How far down the popularity ranking results are shown."
        },
        "disclosed_positions_snippets": {
          "type": "integer"
        },
        "max_per_page": {
          "type": "integer",
          "description": "Rows one query may return: the largest per_page, and the limit of page * per_page."
        },
        "max_per_page_snippets": {
          "type": "integer"
        }
      }
    },
    "clusters": {
      "type": "object",
      "description": "Clusters on the account and the extraction allowance.",
      "properties": {
        "count": {
          "type": "integer"
        },
        "max": {
          "type": "integer"
        },
        "max_size": {
          "type": "integer"
        },
        "extract_points_per_day": {
          "type": "integer"
        },
        "extract_points_left": {
          "type": "integer"
        },
        "resets_at": {
          "type": "integer",
          "description": "Unix time of the next reset (UTC midnight), the same as in the quota block."
        }
      }
    }
  },
  "$defs": {
    "QuotaCounter": {
      "type": "object",
      "required": [
        "limit",
        "used",
        "remaining",
        "resets_at"
      ],
      "properties": {
        "limit": {
          "type": "integer"
        },
        "used": {
          "type": "integer",
          "description": "Spent today: what was charged."
        },
        "remaining": {
          "type": "integer",
          "description": "limit minus used, never below 0. The same number as X-RateLimit-Remaining (searches) and X-Snippets-Remaining (snippets)."
        },
        "resets_at": {
          "type": "integer",
          "description": "Unix time of the next reset (UTC midnight). The clusters block of the account spells the same moment as an ISO 8601 string."
        }
      }
    }
  }
}