{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/serpresult-com/json-schema/serpresult-com-me-schema.json",
  "title": "Me",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/serpresult-com-openapi.json#/components/schemas/Me",
  "type": "object",
  "required": [
    "email",
    "plan",
    "credits_available",
    "api_key"
  ],
  "properties": {
    "email": {
      "type": "string",
      "description": "The account's email address. Empty for a marketplace subscriber."
    },
    "plan": {
      "$ref": "#/$defs/PlanId",
      "description": "The plan the account is on."
    },
    "credits_available": {
      "type": "integer",
      "minimum": 0,
      "description": "Credits the account can still spend — the period's remaining quota plus the credit-pack balance."
    },
    "api_key": {
      "description": "The calling API key. `null` for a session, marketplace or demo caller.",
      "anyOf": [
        {
          "$ref": "#/$defs/MeApiKey"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "$defs": {
    "MeApiKey": {
      "type": "object",
      "description": "The API key that made the call.",
      "required": [
        "id",
        "label",
        "mode"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The key's id, as listed in the dashboard and by `GET /v1/api-keys`."
        },
        "label": {
          "type": "string",
          "description": "The name the key was given when it was created."
        },
        "mode": {
          "type": "string",
          "enum": [
            "live",
            "test"
          ],
          "description": "Whether this is an `sk_live_` or an `sk_test_` key."
        }
      }
    },
    "PlanId": {
      "type": "string",
      "enum": [
        "trial",
        "starter",
        "growth",
        "business",
        "enterprise"
      ],
      "default": "trial"
    }
  }
}