{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Post Tracker — Posts, Views & Engagement History",
    "description": "Track public Threads posts from URLs, accounts or keywords. Export content, available engagement metrics and changes between runs. No login required.",
    "version": "0.1",
    "x-build-id": "VtoSHRhgDkg2CBWme"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/magenta_courser~threads-post-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-magenta_courser-threads-post-tracker",
        "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/magenta_courser~threads-post-tracker/runs": {
      "post": {
        "operationId": "runs-sync-magenta_courser-threads-post-tracker",
        "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/magenta_courser~threads-post-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-magenta_courser-threads-post-tracker",
        "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": "Collection mode",
            "enum": [
              "post_link",
              "user",
              "search",
              "user_reposts",
              "user_replies",
              "post_replies",
              "profiles"
            ],
            "type": "string",
            "description": "Public source modes. Optional bounded pagination can stop early; RUN_SUMMARY reports coverage and failures.",
            "default": "post_link"
          },
          "postUrls": {
            "title": "Post links",
            "type": "array",
            "description": "Required for post_link and post_replies. threads.com / threads.net post links or /t/ links.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Required for account modes. Public account handles or profile URLs.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Required for search and profiles. One query per entry.",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "Maximum observations per target",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on successful observations per target, including existing posts suppressed by onlyNewSinceLastRun. Public results may be fewer. The charge limit can stop collection earlier.",
            "default": 20
          },
          "searchSort": {
            "title": "Search order",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "Top public results or recent results sorted newest first. Recent results may contain gaps and do not guarantee the latest N posts; consult RUN_SUMMARY.",
            "default": "top"
          },
          "startDate": {
            "title": "Start date (UTC)",
            "type": "string",
            "description": "Inclusive UTC date, YYYY-MM-DD. Search sends this window to the public source; account pagination seeks eligible posts within the request/page limits. Search dates must fit the source Unix timestamp range (1970-01-01 through 2038-01-18)."
          },
          "endDate": {
            "title": "End date (UTC)",
            "type": "string",
            "description": "Inclusive UTC end date, YYYY-MM-DD. Native search uses next-day midnight and the output filter enforces this entire UTC day. Historical completeness depends on the public source and configured limits."
          },
          "includeThread": {
            "title": "Include author thread",
            "type": "boolean",
            "description": "Include same-author posts exposed in the linked page. Does not claim the complete conversation.",
            "default": true
          },
          "includeAuthorProfile": {
            "title": "Fetch author follower count",
            "type": "boolean",
            "description": "Extra public profile request per author when not already present. Counts remain null if unavailable.",
            "default": false
          },
          "recordHistory": {
            "title": "Compare with previous observations",
            "type": "boolean",
            "description": "Save successful post observations after dataset write and emit metric changes. Named store is scoped to your account.",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only newly observed posts",
            "type": "boolean",
            "description": "Requires history. Outputs only confirmed first observations. Rechecking confirmed existing posts is billable even if no new rows are output. Unknown history is skipped without a charge.",
            "default": false
          },
          "historyStoreName": {
            "title": "History store name",
            "type": "string",
            "description": "Reuse the same name across scheduled runs. Separate campaigns can use different names.",
            "default": "threads-observed-metrics-v1"
          },
          "maxRequests": {
            "title": "Maximum HTTP requests",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Includes bootstrap refreshes, static bundles, bounded retries and author profile requests.",
            "default": 20
          },
          "requestIntervalMillis": {
            "title": "Request interval (milliseconds)",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Sequential requests with at least one second spacing.",
            "default": 1200
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The initial paid beta uses direct public requests and rejects proxy overrides. This option is available only for unpriced validation.",
            "default": {
              "useApifyProxy": false
            }
          },
          "enablePagination": {
            "title": "Bounded public pagination",
            "type": "boolean",
            "description": "Follow public cursors for account, post-reply and search results. Recent search can also request older time windows after a window ends. Both share maxPages/maxRequests; stalled windows and later errors preserve collected rows with partial status. Profile discovery stays a single public window.",
            "default": true
          },
          "maxPages": {
            "title": "Maximum pages per target",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Bound for experimental pagination. Asset discovery also counts towards maxRequests.",
            "default": 5
          },
          "pageSize": {
            "title": "Rows requested per continuation",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Requested page size. The source may return fewer or more rows; maxPosts remains the output limit.",
            "default": 25
          },
          "maxPageRetries": {
            "title": "Retries per empty bootstrap or failed continuation",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Retry an empty initial bootstrap, transient public-view failure, or failed cursor query after refreshing public metadata. Login, challenge pages, rate limits and denied requests stop without retry. Every attempt counts toward maxRequests.",
            "default": 1
          },
          "includeViews": {
            "title": "Look up missing public post views",
            "type": "boolean",
            "description": "Read missing view counts from each public post page. Normally one extra request per unique post; transient failures can retry within maxPageRetries. All attempts count toward maxRequests. Default off for low-cost bulk collection.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}