{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads Hashtag & Keyword Monitor - New Posts Only",
    "description": "Track Threads keywords and #hashtags on a schedule: each run returns only posts you have not received yet, newest first, with text, author, likes, replies, reposts, media and links. Optional keyword-match filter. No login needed. From $1.50 per 1,000 posts.",
    "version": "0.1",
    "x-build-id": "b09MfecItWuxQUHcf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alom~threads-keyword-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alom-threads-keyword-monitor",
        "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/alom~threads-keyword-monitor/runs": {
      "post": {
        "operationId": "runs-sync-alom-threads-keyword-monitor",
        "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/alom~threads-keyword-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-alom-threads-keyword-monitor",
        "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": {
          "searchQueries": {
            "title": "Keywords or #hashtags",
            "type": "array",
            "description": "What to track: keywords, <code>#hashtags</code>, or threads.com search / <code>/tag/</code> URLs. Without a session cookie Threads shows logged-out visitors ~20 posts per result page, so each run opens several result pages and merges them: typically <b>60-85 unique posts per keyword</b> per run.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search order",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "<b>Newest first</b> (default) is what a monitor wants. Without a session cookie Threads shows logged-out visitors no \"Recent\" tab, so the posts found on several result pages are sorted newest first; with your cookie (below) Threads' real Recent tab is used.",
            "default": "recent"
          },
          "requireKeywordMatch": {
            "title": "Only posts that contain the keyword",
            "type": "boolean",
            "description": "Threads' logged-out search also returns brand-new posts that don't mention the keyword at all. On (default): only posts whose text, hashtags, topic tag or link title contain the keyword are returned; the rest are not charged. Every row has <code>keywordMatch</code> either way.",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only new posts since my last run",
            "type": "boolean",
            "description": "Skip posts an earlier run with the same monitor name already returned (you are not charged for them). Pair with a Schedule in Apify Console. Turn off to get everything the search shows each time.",
            "default": true
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Each name keeps its own memory of delivered posts, e.g. <code>brand-mentions</code> and <code>competitor-hashtags</code>. Use a new name to start from scratch.",
            "default": "default"
          },
          "maxPosts": {
            "title": "Max posts per keyword per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper limit per keyword and run. With monitoring on, only new posts count.",
            "default": 50
          },
          "postedAfter": {
            "title": "Only posts published after",
            "type": "string",
            "description": "Date (UTC), ISO timestamp or relative like <code>7 days</code>. Older posts are skipped (not charged)."
          },
          "sessionCookie": {
            "title": "Your own Threads session cookie (optional, at your own risk)",
            "type": "string",
            "description": "<b>Optional and never required.</b> Paste the cookies of a threads.com tab where you are logged in (the <code>Cookie</code> header, or a JSON export; at least <code>sessionid</code>, ideally also <code>csrftoken</code> and <code>ds_user_id</code>). Searches then use Threads' real \"Recent\" tab and page through it like the app (about twice as many recent posts in our tests). Requests are then made <b>as your account</b> (one IP, at most 2 in parallel): Meta may rate-limit, checkpoint or ban accounts that scrape, so use a spare account. If the cookie is invalid or expired, the run says so and continues without it. Stored encrypted, never logged or returned."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Keywords processed in parallel.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The default Apify datacenter proxy works and is included in the price. If Threads starts blocking it, the run switches to residential proxies by itself (logged).",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}