{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter Lead Scraper",
    "description": "Collect public X profiles from handles, profile URLs, or one keyword or niche query. Get structured lead fields such as bios, audience counts, public emails, websites, and links, or collect follower and following account identifiers. No X login or API key is needed.",
    "version": "0.0",
    "x-build-id": "UfN6SDmIjgXD3WTsy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~twitter-lead-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-twitter-lead-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/maximedupre~twitter-lead-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-twitter-lead-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/maximedupre~twitter-lead-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-twitter-lead-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",
        "required": [
          "resultType"
        ],
        "properties": {
          "resultType": {
            "title": "Result type",
            "enum": [
              "leadProfiles",
              "relationshipAccounts"
            ],
            "type": "string",
            "description": "Choose the kind of records to return. Lead profiles come from account references or one keyword or niche query. Relationship accounts come from followers or following."
          },
          "profileSearch": {
            "title": "Lead profile search",
            "type": "object",
            "description": "Use Find profiles by to choose submitted account references or one keyword or niche query. The unused input is ignored when you run the other discovery method.",
            "properties": {
              "findProfilesBy": {
                "title": "Find profiles by",
                "type": "string",
                "description": "Choose submitted account references or one keyword or niche query.",
                "editor": "select",
                "enum": [
                  "accountReferences",
                  "keywordQuery"
                ],
                "enumTitles": [
                  "Account handles or URLs",
                  "Keyword or niche"
                ],
                "default": "accountReferences",
                "prefill": "accountReferences"
              },
              "accountReferences": {
                "title": "Account handles or profile URLs",
                "type": "array",
                "description": "Add one or more public X handles, @handles, or profile URLs to enrich. Each account becomes a contact-ready lead record.",
                "editor": "stringList",
                "items": {
                  "type": "string"
                },
                "prefill": [
                  "@apify"
                ]
              },
              "keywordQuery": {
                "title": "Keyword or niche query",
                "type": "string",
                "description": "Enter one keyword or niche query to find relevant public X accounts or influencers. The found profiles receive the same lead enrichment as submitted accounts.",
                "editor": "textfield"
              },
              "maxCandidates": {
                "title": "Candidate limit",
                "type": "integer",
                "description": "Set an optional cap for profiles found by the one keyword or niche query. Leave it empty to return all available results until the source is exhausted.",
                "editor": "number",
                "minimum": 1
              }
            },
            "default": {
              "findProfilesBy": "accountReferences",
              "accountReferences": [
                "@apify"
              ]
            }
          },
          "relationshipSearch": {
            "title": "Relationship account search",
            "type": "object",
            "description": "Use Collect accounts by to choose followers or following, then add public usernames or numeric user IDs as targets.",
            "properties": {
              "collectAccountsBy": {
                "title": "Collect accounts by",
                "type": "string",
                "description": "Choose whether to collect the public accounts that a target follows or the public accounts that follow the target.",
                "editor": "select",
                "enum": [
                  "followers",
                  "following"
                ],
                "enumTitles": [
                  "Followers",
                  "Following"
                ],
                "default": "followers"
              },
              "relationshipTargets": {
                "title": "Relationship usernames or IDs",
                "type": "array",
                "description": "Add one or more public X usernames or numeric public user IDs as relationship targets. Usernames may include or omit @.",
                "editor": "stringList",
                "items": {
                  "type": "string"
                }
              },
              "maxRelationshipAccounts": {
                "title": "Accounts per target",
                "type": "integer",
                "description": "Set an optional cap for relationship accounts collected for each target. Leave it empty to return all available results until the source is exhausted.",
                "editor": "number",
                "minimum": 1
              },
              "relationshipResultFormat": {
                "title": "Return relationship accounts as",
                "type": "string",
                "description": "Choose whether relationship results use usernames or numeric public user IDs.",
                "editor": "select",
                "enum": [
                  "username",
                  "userId"
                ],
                "enumTitles": [
                  "Usernames",
                  "Numeric user IDs"
                ],
                "default": "username"
              }
            }
          },
          "requireEmail": {
            "title": "Only profiles with an email",
            "type": "boolean",
            "description": "For lead profiles, keep only accounts that publish an email address. Leave this off to keep profiles with or without an email.",
            "default": false
          },
          "requireWebsite": {
            "title": "Only profiles with a website",
            "type": "boolean",
            "description": "For lead profiles, keep only accounts that publish a website. Leave this off to keep profiles with or without a website.",
            "default": false
          },
          "minFollowers": {
            "title": "Minimum followers",
            "minimum": 0,
            "type": "integer",
            "description": "For lead profiles, keep accounts with at least this many followers. Leave it empty to set no minimum."
          },
          "maxFollowers": {
            "title": "Maximum followers",
            "minimum": 0,
            "type": "integer",
            "description": "For lead profiles, keep accounts with no more than this many followers. Leave it empty to set no maximum."
          },
          "bioIncludeTerms": {
            "title": "Bio must mention",
            "type": "array",
            "description": "For lead profiles, keep accounts whose bio mentions at least one of these terms.",
            "items": {
              "type": "string"
            }
          },
          "bioExcludeTerms": {
            "title": "Bio must not mention",
            "type": "array",
            "description": "For lead profiles, remove accounts whose bio mentions at least one of these terms.",
            "items": {
              "type": "string"
            }
          },
          "locationContains": {
            "title": "Location contains",
            "type": "string",
            "description": "For lead profiles, keep accounts whose public location contains this text. Leave it empty to set no location filter."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}