{
  "openapi": "3.0.1",
  "info": {
    "title": "Bluesky Keyword Monitor: Every Matching Post, No Login",
    "description": "Monitor Bluesky for keywords, phrases and hashtags: every new public post that matches, with author handle, text, links, hashtags, language and like/repost/reply counts. Reads the full public firehose, no search caps, and scheduled runs resume where the last stopped. Account timeline mode too.",
    "version": "0.1",
    "x-build-id": "GdhiDusEAQeDxK2Xh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yugenox~bluesky-keyword-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yugenox-bluesky-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/yugenox~bluesky-keyword-monitor/runs": {
      "post": {
        "operationId": "runs-sync-yugenox-bluesky-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/yugenox~bluesky-keyword-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-yugenox-bluesky-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": {
          "keywords": {
            "title": "🔎 Keywords",
            "type": "array",
            "description": "Words, phrases or hashtags to watch, e.g. \"bitcoin\", \"climate change\", \"#journorequest\", \"$TSLA\". A post matches when it contains ANY of them (case-insensitive, whole words for Latin text). \"#tag\" matches the hashtag.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Skip posts that contain any of these words.",
            "items": {
              "type": "string"
            }
          },
          "matchAll": {
            "title": "Require all keywords",
            "type": "boolean",
            "description": "Only keep posts that contain EVERY keyword (default: any keyword).",
            "default": false
          },
          "regex": {
            "title": "Regular expression",
            "type": "string",
            "description": "Optional JavaScript regular expression the post text must also match (case-insensitive), e.g. \"\\b(ETH|ethereum)\\b\". On its own (no keywords) every post is checked, which is slower."
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Only posts tagged with these language codes, e.g. \"en\", \"ja\", \"pt\", \"de\". Empty = all languages.",
            "items": {
              "type": "string"
            }
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Keep replies (about 40% of all posts). Turn off for top-level posts only.",
            "default": true
          },
          "searchAltText": {
            "title": "Also search image descriptions and link cards",
            "type": "boolean",
            "description": "Also match keywords in image alt text and the title/description of link previews.",
            "default": false
          },
          "handles": {
            "title": "👤 Accounts (account mode)",
            "type": "array",
            "description": "Optional: Bluesky handles or profile links (e.g. \"nytimes.com\", \"bsky.app/profile/name.bsky.social\"). When given, the run reads these accounts' timelines instead of the firehose (no per-minute fee); keywords, if set, filter their posts.",
            "items": {
              "type": "string"
            }
          },
          "includeReposts": {
            "title": "Include reposts (account mode)",
            "type": "boolean",
            "description": "Also save posts the accounts reposted.",
            "default": false
          },
          "lookbackHours": {
            "title": "First run: hours back (account mode)",
            "minimum": 1,
            "maximum": 8760,
            "type": "integer",
            "description": "On the first run of an account list, how far back to read each timeline. Later runs continue from the newest post already seen.",
            "default": 24
          },
          "lookbackMinutes": {
            "title": "First run: minutes back",
            "minimum": 1,
            "maximum": 2160,
            "type": "integer",
            "description": "Keyword mode: on the first run (no saved position yet), how many minutes of Bluesky to scan back from now. Bluesky's firehose keeps about 36 hours (2160 minutes). Later runs with the same input continue from where the last one stopped.",
            "default": 60
          },
          "since": {
            "title": "Start from (overrides resume)",
            "type": "string",
            "description": "Optional: start at this time instead of the saved position, e.g. \"2026-11-07T08:00:00Z\" or \"6 hours\". At most ~36 hours back."
          },
          "resume": {
            "title": "Continue from the last run",
            "type": "boolean",
            "description": "Scheduled runs with the same keywords pick up exactly where the previous run stopped, so no post is missed or saved twice. Turn off to always use \"First run: minutes back\".",
            "default": true
          },
          "maxReplayHours": {
            "title": "Max hours scanned per run",
            "minimum": 1,
            "maximum": 36,
            "type": "integer",
            "description": "Keyword mode: the most Bluesky time one run reads (1-36). If more is waiting, the next run continues.",
            "default": 24
          },
          "maxPosts": {
            "title": "Max posts",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum posts saved per run. 0 = no limit. When reached, the next run continues from that point.",
            "default": 1000
          },
          "maxMinutes": {
            "title": "Max run minutes",
            "minimum": 0,
            "type": "integer",
            "description": "Optional: stop after this many minutes of run time (0 = until done or the run timeout). The position is saved, so the next run catches up.",
            "default": 0
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional: a name for this monitor's saved position. By default it is tied to your keywords and filters; set a name to keep the same position after editing them."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used for Bluesky's public API (author names and like counts). Apify datacenter proxy is the default and comes with every plan.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}