{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/twittrapi-com/json-schema/twittrapi-com-user-page-schema.json",
  "title": "UserPage",
  "description": "Simple format: a page of users",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/twittrapi-com-openapi.json#/components/schemas/UserPage",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/User"
      }
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pass as cursor for the next page; null on the last page"
    },
    "previousCursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "X's top cursor, for polling newer items"
    },
    "hasNextPage": {
      "type": "boolean"
    }
  },
  "required": [
    "data",
    "nextCursor",
    "previousCursor",
    "hasNextPage"
  ],
  "$defs": {
    "User": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "username": {
          "type": "string",
          "description": "Handle without @"
        },
        "name": {
          "type": "string",
          "description": "Display name"
        },
        "description": {
          "type": "string",
          "description": "Bio, t.co links expanded"
        },
        "location": {
          "type": "string"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Website, expanded"
        },
        "createdAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "avatarUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "bannerUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "verified": {
          "type": "boolean",
          "description": "Blue check"
        },
        "verifiedType": {
          "type": [
            "string",
            "null"
          ],
          "description": "e.g. Business or Government"
        },
        "protected": {
          "type": "boolean",
          "description": "Private account"
        },
        "counts": {
          "type": "object",
          "properties": {
            "followers": {
              "type": "integer"
            },
            "following": {
              "type": "integer"
            },
            "tweets": {
              "type": "integer"
            },
            "likes": {
              "type": "integer"
            },
            "media": {
              "type": "integer"
            },
            "listed": {
              "type": "integer"
            }
          },
          "required": [
            "followers",
            "following",
            "tweets",
            "likes",
            "media",
            "listed"
          ]
        },
        "pinnedTweetIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isAutomated": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "username",
        "name",
        "description",
        "location",
        "url",
        "createdAt",
        "avatarUrl",
        "bannerUrl",
        "verified",
        "verifiedType",
        "protected",
        "counts",
        "pinnedTweetIds",
        "isAutomated"
      ]
    }
  }
}