{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Account Country & Location Scraper",
    "description": "Get 'Account based in' country, signup source, affiliate org, and verification metadata for any X (Twitter) account. No login, no API key, no cookies required.",
    "version": "0.0",
    "x-build-id": "zpcfwl8vSZoqnv6Mb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lurkapi~x-twitter-location-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lurkapi-x-twitter-location-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/lurkapi~x-twitter-location-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lurkapi-x-twitter-location-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/lurkapi~x-twitter-location-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lurkapi-x-twitter-location-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "screenNames": {
            "title": "👤 X handles",
            "type": "array",
            "description": "Usernames (e.g. elonmusk) or @-prefixed (e.g. @openai). One entry per target.",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "🔢 Numeric user IDs",
            "type": "array",
            "description": "Numeric X user IDs (e.g. 44196397). Survives handle changes.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "🔗 Full profile URLs",
            "type": "array",
            "description": "Full X URLs (https://x.com/elonmusk). Bare profile URLs only. No /followers, /status, etc.",
            "items": {
              "type": "string"
            }
          },
          "outputScreenName": {
            "title": "screen_name",
            "type": "boolean",
            "description": "Canonical @handle.",
            "default": true
          },
          "outputName": {
            "title": "name",
            "type": "boolean",
            "description": "Display name.",
            "default": true
          },
          "outputAvatarUrl": {
            "title": "avatar_url",
            "type": "boolean",
            "description": "Profile picture URL.",
            "default": true
          },
          "outputAccountBasedIn": {
            "title": "account_based_in",
            "type": "boolean",
            "description": "Country name X shows in the About panel (e.g. \"United States\").",
            "default": true
          },
          "outputAccountBasedInIso": {
            "title": "account_based_in_iso",
            "type": "boolean",
            "description": "ISO 3166-1 alpha-2 country code (e.g. \"US\").",
            "default": true
          },
          "outputAccountBasedInIsRegion": {
            "title": "account_based_in_is_region",
            "type": "boolean",
            "description": "true when X returned a multi-country region (e.g. Europe, East Asia) instead of a specific country.",
            "default": true
          },
          "outputConnectedVia": {
            "title": "connected_via",
            "type": "boolean",
            "description": "Device / store the account most recently connected from: \"Web\", \"<Country> App Store\", \"<Country> Android App\".",
            "default": true
          },
          "outputConnectedViaIso": {
            "title": "connected_via_iso",
            "type": "boolean",
            "description": "ISO code parsed from connected_via when it names a specific country. Null for \"Web\" or regional buckets.",
            "default": true
          },
          "outputAffiliateUsername": {
            "title": "affiliate_username",
            "type": "boolean",
            "description": "Handle of the parent organization the account is affiliated with (e.g. Musk → X, employees → their employer).",
            "default": true
          },
          "outputAffiliateDisplay": {
            "title": "affiliate_display",
            "type": "boolean",
            "description": "Human-readable affiliate label (e.g. \"X (@X)\").",
            "default": true
          },
          "outputVerifiedReason": {
            "title": "verified_reason",
            "type": "boolean",
            "description": "Reason string X shows for verification.",
            "default": true
          },
          "outputVerifiedSince": {
            "title": "verified_since",
            "type": "boolean",
            "description": "Date verification started (e.g. \"December 2011\").",
            "default": true
          },
          "outputIsBlueVerified": {
            "title": "is_blue_verified",
            "type": "boolean",
            "description": "Boolean: Blue verification badge.",
            "default": true
          },
          "outputIsBusinessVerified": {
            "title": "is_business_verified",
            "type": "boolean",
            "description": "Boolean: Business (organization) verification badge.",
            "default": true
          },
          "outputIsGovernmentVerified": {
            "title": "is_government_verified",
            "type": "boolean",
            "description": "Boolean: Government verification badge.",
            "default": true
          },
          "outputUsernameChangesCount": {
            "title": "username_changes_count",
            "type": "boolean",
            "description": "Number of times the handle was renamed.",
            "default": true
          },
          "outputLastUsernameChange": {
            "title": "last_username_change",
            "type": "boolean",
            "description": "Date of the most recent handle change (e.g. \"August 2017\").",
            "default": true
          },
          "outputDateJoined": {
            "title": "date_joined",
            "type": "boolean",
            "description": "Month + year the account was created (e.g. \"June 2009\").",
            "default": true
          },
          "outputProfileUrl": {
            "title": "profile_url",
            "type": "boolean",
            "description": "Canonical https://x.com/<handle> URL.",
            "default": true
          },
          "outputInputUserId": {
            "title": "input_user_id",
            "type": "boolean",
            "description": "Populated only when the row was produced from a userIds input; carries the numeric ID that was resolved.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}