{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram & Threads Scraper — No Cookies Required",
    "description": "Collect public Instagram and Threads usernames, bios, follower counts, post text, engagement, media links and available replies/comments. Extract contacts published in bios. Keyword-search coverage depends on available native sessions or public search indexes.",
    "version": "0.2",
    "x-build-id": "jVbyy7Uy2vPZvlEok"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trakk~threads-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trakk-threads-profile-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/trakk~threads-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trakk-threads-profile-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/trakk~threads-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trakk-threads-profile-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": {
          "mode": {
            "title": "🌐 What to scrape",
            "enum": [
              "META_SEARCH",
              "INSTAGRAM_SEARCH",
              "THREADS_SEARCH",
              "INSTAGRAM_PROFILES",
              "THREADS_PROFILES",
              "INSTAGRAM_POSTS",
              "THREADS_POSTS",
              "PROFILE_COMPARISON",
              "ALL_CONTENT",
              "POST_DETAILS",
              "POST_REPLIES"
            ],
            "type": "string",
            "description": "Choose public profile fields, a profile timeline, exact post details, direct replies/comments, keyword search or a same-handle cross-platform comparison. Each workflow returns only fields available from its source.",
            "default": "META_SEARCH"
          },
          "queries": {
            "title": "🔎 Search queries",
            "maxItems": 50,
            "type": "array",
            "description": "One keyword or hashtag per entry for search workflows. Available accounts, hashtags, places, posts and authors depend on the selected platform and search source. Public search-index results are a sample; a query may return none.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchSort": {
            "title": "↕️ Sort search results",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "Threads: recent sorts the available native search sample by publication time. Public search uses search-engine ranking. This is not an exhaustive chronological search.",
            "default": "top"
          },
          "usernames": {
            "title": "👤 Usernames or profile URLs",
            "type": "array",
            "description": "Instagram or Threads creators to pull data for, one per row — a username, @handle, or full profile URL. Used by the profile, post, comparison and all-content modes.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "directUrls": {
            "title": "🔗 Direct URLs",
            "type": "array",
            "description": "Exact Instagram p/reel/tv and Threads post URLs keep their own post identifier. Use POST_DETAILS or POST_REPLIES. Profile URLs select creators; hashtag URLs become literal search queries.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxResults": {
            "title": "🎯 Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard stop for the number of paid rows written to the main Results dataset for the whole run.",
            "default": 100
          },
          "resultsLimit": {
            "title": "🔢 Results per profile / query",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum unique accepted posts per profile or search results per query. Duplicates and filtered records do not use this allowance. The global maxResults also applies.",
            "default": 10
          },
          "onlyPostsNewerThan": {
            "title": "📅 Only posts newer than",
            "type": "string",
            "description": "Exclusive publication cutoff: publishedAt must be strictly later. ISO date/time, Unix seconds/milliseconds (API input), or relative value such as 7 days. Unknown publication dates do not match. Future cutoffs are invalid."
          },
          "maxResultsPerQuery": {
            "title": "🔢 Results per query (override)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Advanced override of Results per profile / query for search modes only. Leave empty to use Results per profile / query."
          },
          "maxPostsPerProfile": {
            "title": "🗂️ Posts per profile (override)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Override the per-profile accepted-post cap in timeline and all-content workflows. This does not enable post collection in a profile-only workflow. Source availability and the global result cap also apply."
          },
          "maxConcurrency": {
            "title": "⚡ Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum parallel HTTP requests. Keep the default for most runs.",
            "default": 40
          },
          "maxRetries": {
            "title": "🔁 Max retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Retry budget for temporary source or connection errors.",
            "default": 1
          },
          "timeoutSecs": {
            "title": "⏱️ Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time for one HTTP request.",
            "default": 8
          },
          "rawOutput": {
            "title": "🧪 Include selected source fields",
            "type": "boolean",
            "description": "Add selected sanitized public fields in sourcePayload. This is not an untouched response dump; cookies, tokens and viewer state are excluded.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Optional HTTP connection routing. Direct requests are the default. A proxy does not guarantee access to restricted or unpublished content.",
            "default": {
              "useApifyProxy": false
            }
          },
          "includeReplies": {
            "title": "💬 Include replies / comments",
            "type": "boolean",
            "description": "Collect available direct Threads replies or Instagram comments for saved posts. Reply rows share maxResults and existing per-row pricing. Profile-only and search workflows do not expand replies.",
            "default": false
          },
          "maxRepliesPerPost": {
            "title": "💬 Replies per post",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum unique accepted direct replies/comments per parent post. Private, hidden or unavailable replies cannot be collected.",
            "default": 20
          },
          "maxPagesPerSource": {
            "title": "📄 Pages per source",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety cap for each profile timeline or parent reply connection. OUTPUT distinguishes page caps, repeated cursors and source exhaustion.",
            "default": 100
          },
          "skipPinnedPosts": {
            "title": "📌 Skip pinned posts",
            "type": "boolean",
            "description": "Skip posts explicitly marked as pinned by the source. Unknown pin state is retained.",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}