{
  "openapi": "3.0.1",
  "info": {
    "title": "Bluesky Scraper - Profiles, Posts, Followers, Search",
    "description": "Scrape Bluesky via the official AT Protocol: profiles, posts, post search, followers, following, threads & custom feeds. No proxy required, no anti-bot — official open API. App password optional.",
    "version": "0.0",
    "x-build-id": "dcK3fie8bIr59TAlM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actorzlab~bluesky-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actorzlab-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/actorzlab~bluesky-scraper/runs": {
      "post": {
        "operationId": "runs-sync-actorzlab-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/actorzlab~bluesky-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-actorzlab-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": [
              "profile",
              "posts",
              "search",
              "followers",
              "following",
              "thread",
              "feed"
            ],
            "type": "string",
            "description": "What to scrape. Pick exactly one mode per run.\n\n• **profile** — full profile data for one or more handles/DIDs (use `handles`).\n• **posts** — recent posts by one or more accounts (use `handles` + `maxItems`).\n• **search** — posts matching a keyword query (use `searchQuery`; requires auth).\n• **followers** — accounts that follow a handle (use `handles` + `maxItems`).\n• **following** — accounts a handle follows (use `handles` + `maxItems`).\n• **thread** — full thread tree for a post URL or at:// URI (use `postUrls`).\n• **feed** — posts from a custom Bluesky feed generator (use `feedUrls`; requires auth).",
            "default": "profile"
          },
          "handles": {
            "title": "Handles / DIDs",
            "type": "array",
            "description": "Bluesky handles (e.g. `bsky.app`, `alice.bsky.social`) or DIDs (e.g. `did:plc:…`). Used by modes: **profile**, **posts**, **followers**, **following**. For profile mode all handles are fetched in a single batched request (up to 25 per call). For posts/followers/following each handle is processed individually.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword or phrase to search for (mode: **search** only). Lucene-style syntax is supported by Bluesky (e.g. `\"open source\" lang:en`). Requires authentication — set `blueskyHandle` + `blueskyAppPassword`."
          },
          "postUrls": {
            "title": "Post URLs / URIs",
            "type": "array",
            "description": "URLs or at:// URIs of posts to expand into full threads (mode: **thread** only). Accepts both `https://bsky.app/profile/<handle>/post/<rkey>` links and `at://<did>/app.bsky.feed.post/<rkey>` URIs.",
            "items": {
              "type": "string"
            }
          },
          "feedUrls": {
            "title": "Feed generator URIs",
            "type": "array",
            "description": "AT Protocol URIs of custom feed generators to scrape (mode: **feed** only). Format: `at://<did>/app.bsky.feed.generator/<name>`. Requires authentication for most feeds — set `blueskyHandle` + `blueskyAppPassword`.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items per handle / query / feed",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of records to fetch per handle (modes: posts, followers, following), per query (search), or per feed URI (feed). Not used in profile or thread modes (profile fetches all listed handles; thread expands the full thread up to `threadDepth`).",
            "default": 100
          },
          "searchSince": {
            "title": "Search: since date",
            "type": "string",
            "description": "Return posts at or after this date/time (mode: **search** only). ISO 8601 format, e.g. `2024-01-01` or `2024-01-01T00:00:00Z`."
          },
          "searchUntil": {
            "title": "Search: until date",
            "type": "string",
            "description": "Return posts before this date/time (mode: **search** only). ISO 8601 format, e.g. `2024-12-31`."
          },
          "searchLanguage": {
            "title": "Search: language filter",
            "type": "string",
            "description": "Filter search results to posts written in this language (mode: **search** only). BCP-47 code, e.g. `en`, `es`, `fr`, `ja`."
          },
          "searchSort": {
            "title": "Search: sort order",
            "enum": [
              "latest",
              "top"
            ],
            "type": "string",
            "description": "Sort order for search results (mode: **search** only). `latest` = newest first (default); `top` = highest-engagement first.",
            "default": "latest"
          },
          "threadDepth": {
            "title": "Thread: reply depth",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many levels of replies to expand below the target post (mode: **thread** only). Default 6; max 1000.",
            "default": 6
          },
          "threadParentHeight": {
            "title": "Thread: parent height",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many levels of parent posts to walk above the target post (mode: **thread** only). Default 80; max 1000.",
            "default": 80
          },
          "blueskyHandle": {
            "title": "Bluesky handle (optional auth)",
            "type": "string",
            "description": "Your Bluesky handle, e.g. `alice.bsky.social`. Optional for most modes. **Required for search and feed modes**, which the public API may block for unauthenticated callers. Pair with `blueskyAppPassword`."
          },
          "blueskyAppPassword": {
            "title": "Bluesky app password (optional auth)",
            "type": "string",
            "description": "**Use an APP PASSWORD — NOT your main Bluesky account password.** Create one at https://bsky.app/settings/app-passwords (format: `xxxx-xxxx-xxxx-xxxx`). Your main password is never needed and should never be entered here. App passwords have limited scope and can be revoked individually without affecting your account."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy for outbound requests. Bluesky's public API does not require proxies — leave empty for a direct connection. Only set this if your environment restricts outbound traffic."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}