{
  "openapi": "3.0.1",
  "info": {
    "title": "Bluesky Scraper - Posts, Profiles, Search & Monitor",
    "description": "Scrape Bluesky posts, profiles, keyword/hashtag search, threads, followers, likes, reposts, and custom feeds via the public AT Protocol AppView API. Incremental monitor mode for schedules. No login for public data. Fast async JSON on Apify.",
    "version": "0.1",
    "x-build-id": "unEvfP4rBbUo77j4F"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~bluesky-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-bluesky-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/crawloop~bluesky-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-bluesky-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/crawloop~bluesky-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-bluesky-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "user_posts",
              "user_profiles",
              "search",
              "search_users",
              "post_threads",
              "followers",
              "following",
              "custom_feed",
              "likes",
              "reposts",
              "monitor"
            ],
            "type": "string",
            "description": "What to scrape from Bluesky public AppView (AT Protocol XRPC).",
            "default": "user_posts"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Bluesky profile, post, or custom feed URLs (or raw at:// URIs). Used by most modes.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "handles": {
            "title": "Handles / DIDs",
            "type": "array",
            "description": "Bluesky handles (alice.bsky.social) or DIDs. Used for profiles, posts, and graph modes.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Full-text or hashtag query for search / search_users / monitor(search) (e.g. python, #ai).",
            "default": ""
          },
          "searchQueries": {
            "title": "Search Queries (multi)",
            "type": "array",
            "description": "Optional list of queries for search or monitor(search). Merged with Search Query.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "monitorSource": {
            "title": "Monitor Source",
            "enum": [
              "user_posts",
              "search",
              "custom_feed"
            ],
            "type": "string",
            "description": "For mode=monitor: track author feeds, keyword search, or a custom feed. Only posts newer than the last run are emitted.",
            "default": "user_posts"
          },
          "monitorStoreName": {
            "title": "Monitor State Store Name",
            "type": "string",
            "description": "Named Apify key-value store holding per-target watermarks across runs. Use a distinct name per schedule/job.",
            "default": "bluesky-monitor-state"
          },
          "monitorBaselineOnly": {
            "title": "Monitor Baseline Only (first run)",
            "type": "boolean",
            "description": "If true and no watermark exists yet, set the watermark from the newest posts without pushing results. Next scheduled run emits only truly new posts.",
            "default": false
          },
          "resetMonitorState": {
            "title": "Reset Monitor State",
            "type": "boolean",
            "description": "Clear watermarks in the monitor store before this run.",
            "default": false
          },
          "searchSort": {
            "title": "Search Sort",
            "enum": [
              "latest",
              "top"
            ],
            "type": "string",
            "description": "Sort for post search.",
            "default": "latest"
          },
          "authorFilter": {
            "title": "Search Author Filter",
            "type": "string",
            "description": "Optional author handle/DID to restrict post search.",
            "default": ""
          },
          "lang": {
            "title": "Language",
            "type": "string",
            "description": "Optional language code filter for post search (e.g. en).",
            "default": ""
          },
          "since": {
            "title": "Since (ISO date)",
            "type": "string",
            "description": "Optional lower bound for post search (ISO date/datetime).",
            "default": ""
          },
          "until": {
            "title": "Until (ISO date)",
            "type": "string",
            "description": "Optional upper bound for post search (ISO date/datetime).",
            "default": ""
          },
          "feedUri": {
            "title": "Custom Feed AT-URI",
            "type": "string",
            "description": "Feed generator AT-URI for custom_feed mode (or pass a bsky.app feed URL in Start URLs).",
            "default": ""
          },
          "includeReplies": {
            "title": "Include Replies",
            "type": "boolean",
            "description": "In user_posts mode, include reply posts from the author feed.",
            "default": true
          },
          "includeReposts": {
            "title": "Include Reposts",
            "type": "boolean",
            "description": "In user_posts mode, include reposts from the author feed.",
            "default": true
          },
          "threadDepth": {
            "title": "Thread Depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Max reply depth for post_threads mode.",
            "default": 6
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum dataset rows to push. 0 = unlimited.",
            "default": 100
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Parallel streams (authors / posts). Cursor pages within one stream stay sequential.",
            "default": 8
          },
          "maxRequestsPerSecond": {
            "title": "Max Requests / Second",
            "minimum": 0.5,
            "maximum": 100,
            "type": "number",
            "description": "Client-side rate limit per run (shared across workers). Raise carefully; use proxies for higher throughput.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional. Public AppView usually works without a proxy; enable Datacenter proxies for large parallel jobs.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}