{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Profiles, Posts & Insights Scraper",
    "description": "Scrape Threads profiles, posts and engagement metrics with input-time filters (verified, min likes, follower threshold, language, keywords). Extract emails, phones and contact links from bios. Track follower growth across scheduled runs. Lead-gen ready.",
    "version": "1.0",
    "x-build-id": "nx8FZptgeTsWScELr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brilliant_gum~threads-insights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brilliant_gum-threads-insights-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/brilliant_gum~threads-insights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-brilliant_gum-threads-insights-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/brilliant_gum~threads-insights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-brilliant_gum-threads-insights-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": {
          "urls": {
            "title": "Threads URLs",
            "type": "array",
            "description": "Profile or post URLs from threads.net / threads.com. Accepts both full URLs and @username form. Leave empty if you use 'Usernames' or 'Post URLs' instead.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Bare usernames (without @) — convenient when you have a CSV list.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs (replies focus)",
            "type": "array",
            "description": "Specific post URLs whose replies you want to analyse. Same format as 'Threads URLs'.",
            "items": {
              "type": "string"
            }
          },
          "includePosts": {
            "title": "Include user posts",
            "type": "boolean",
            "description": "For each profile, fetch their recent posts (paginated). Disable if you only need profile metadata.",
            "default": true
          },
          "maxPostsPerProfile": {
            "title": "Max posts per profile",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard limit on posts fetched per profile.",
            "default": 50
          },
          "includeReplies": {
            "title": "Include reply tree",
            "type": "boolean",
            "description": "For posts (single-post URLs or first posts of profiles), also fetch the nested reply tree.",
            "default": false
          },
          "maxReplyDepth": {
            "title": "Max reply depth",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How deep to walk the reply tree. 0 = no replies, 1 = top-level only, 2 = nested.",
            "default": 2
          },
          "verifiedOnly": {
            "title": "Verified profiles only",
            "type": "boolean",
            "description": "Drop posts whose authors are not verified.",
            "default": false
          },
          "minAuthorFollowers": {
            "title": "Min author followers",
            "minimum": 0,
            "type": "integer",
            "description": "Skip authors with fewer than this many followers. Killer filter for lead-gen — pay only for accounts above your threshold.",
            "default": 0
          },
          "excludePrivate": {
            "title": "Exclude private accounts",
            "type": "boolean",
            "description": "Private accounts return no posts anyway — set to true to skip them entirely.",
            "default": true
          },
          "minLikes": {
            "title": "Min likes per post",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer likes than this.",
            "default": 0
          },
          "minReplies": {
            "title": "Min replies per post",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer replies than this.",
            "default": 0
          },
          "minReposts": {
            "title": "Min reposts per post",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer reposts than this.",
            "default": 0
          },
          "hasMedia": {
            "title": "Has media filter",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Keep only posts with (or without) attached image/video.",
            "default": "any"
          },
          "hasLinks": {
            "title": "Has links filter",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Keep only posts with (or without) outbound links in the text.",
            "default": "any"
          },
          "language": {
            "title": "Language allow-list",
            "type": "array",
            "description": "Two-letter language codes to keep (e.g. en, es, pt). Empty = all languages.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Earliest post date",
            "type": "string",
            "description": "ISO date or YYYY-MM-DD. Drop posts older than this."
          },
          "dateTo": {
            "title": "Latest post date",
            "type": "string",
            "description": "ISO date or YYYY-MM-DD. Drop posts newer than this."
          },
          "keywordsInclude": {
            "title": "Must contain keywords",
            "type": "array",
            "description": "Drop posts whose text doesn't contain at least one of these keywords (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "keywordsExclude": {
            "title": "Must NOT contain keywords",
            "type": "array",
            "description": "Drop posts whose text contains any of these keywords.",
            "items": {
              "type": "string"
            }
          },
          "excludeReplies": {
            "title": "Exclude reply posts",
            "type": "boolean",
            "description": "Drop posts that are replies to someone else (keep only originals).",
            "default": false
          },
          "includeContactInfo": {
            "title": "Extract contact info (lead-gen)",
            "type": "boolean",
            "description": "Parse emails, phones, payment links and categorize social/website links from bios. Lead-gen killer feature.",
            "default": true
          },
          "includeAnalytics": {
            "title": "Compute analytics block",
            "type": "boolean",
            "description": "Per-profile engagement rate, virality index, like-to-view ratio, and momentum (when history is on).",
            "default": true
          },
          "enableHistory": {
            "title": "Enable historical tracking (trends & velocity)",
            "type": "boolean",
            "description": "Persist a timestamped snapshot every run into a named store, then compute deltas (follower growth, post velocity) vs the previous run. Schedule the actor daily/weekly to build the time-series.",
            "default": false
          },
          "historyDatasetName": {
            "title": "History store name",
            "type": "string",
            "description": "Named key-value store to persist snapshots into. Reused across scheduled runs to compute trends.",
            "default": "threads-history"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Proxies are included and configured automatically — leave empty unless overriding."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel worker count. Threads is sensitive — keep low (2-4).",
            "default": 3
          },
          "minDelayMs": {
            "title": "Min delay between requests (ms)",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "Throttle to look human and avoid rate limits.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}