{
  "openapi": "3.0.1",
  "info": {
    "title": "Bluesky Posts & Profiles Scraper",
    "description": "Scrape Bluesky posts via the AT Protocol public API. Search by query or fetch posts from a list of user handles. Optional Claude-powered sentiment/topic/entity enrichment.",
    "version": "0.1",
    "x-build-id": "VgeKsKaSx6QcOUtsv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/verifiable_clamp~apify-bluesky-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-verifiable_clamp-apify-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/verifiable_clamp~apify-bluesky-scraper/runs": {
      "post": {
        "operationId": "runs-sync-verifiable_clamp-apify-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/verifiable_clamp~apify-bluesky-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-verifiable_clamp-apify-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": [
              "search",
              "author_feed"
            ],
            "type": "string",
            "description": "What to scrape.",
            "default": "search"
          },
          "search_query": {
            "title": "Search query",
            "type": "string",
            "description": "Query for Bluesky's searchPosts (supports OR, quotes, hashtags). Required when mode='search'."
          },
          "sort": {
            "title": "Sort order (search mode)",
            "enum": [
              "latest",
              "top"
            ],
            "type": "string",
            "description": "How to rank results when mode='search'. 'latest' returns newest first; 'top' returns highest-engagement first.",
            "default": "latest"
          },
          "language": {
            "title": "Language filter (BCP-47)",
            "type": "string",
            "description": "Limit search to posts in this language (e.g. 'en', 'es', 'ja'). Leave empty for all languages."
          },
          "since": {
            "title": "Posts since (ISO datetime, search mode)",
            "type": "string",
            "description": "Only include posts after this datetime, e.g. 2026-05-01T00:00:00Z"
          },
          "until": {
            "title": "Posts until (ISO datetime, search mode)",
            "type": "string",
            "description": "Only include posts before this datetime."
          },
          "actors": {
            "title": "Bluesky handles or DIDs",
            "type": "array",
            "description": "Required when mode='author_feed'. One handle per row (without @).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "author_filter": {
            "title": "Author-feed filter",
            "enum": [
              "posts_with_replies",
              "posts_no_replies",
              "posts_with_media",
              "posts_and_author_threads"
            ],
            "type": "string",
            "description": "Which posts to include when scraping an author's feed (mode='author_feed').",
            "default": "posts_with_replies"
          },
          "max_items": {
            "title": "Max posts total",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap across all queries/actors. Default 100. Set higher for bigger runs.",
            "default": 100
          },
          "max_items_per_actor": {
            "title": "Max posts per actor (author_feed mode)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Per-actor cap when scraping multiple Bluesky handles. Total run is still bounded by max_items.",
            "default": 100
          },
          "enrich_with_claude": {
            "title": "Enrich with Claude (sentiment / topics / entities / summary)",
            "type": "boolean",
            "description": "Adds a `semantic` field to each output post. Requires an Anthropic Claude API key.",
            "default": false
          },
          "claude_api_key": {
            "title": "Anthropic API key (required if enrichment ON)",
            "type": "string",
            "description": "Starts with sk-ant-... Get one at console.anthropic.com."
          },
          "claude_model": {
            "title": "Claude model",
            "enum": [
              "claude-haiku-4-5",
              "claude-sonnet-4-6",
              "claude-opus-4-7"
            ],
            "type": "string",
            "description": "Anthropic model to use for enrichment. Haiku is cheapest; Opus is most accurate.",
            "default": "claude-haiku-4-5"
          },
          "enrichment_fields": {
            "title": "Which enrichment fields to compute",
            "type": "object",
            "description": "Cost scales with fields enabled. Sentiment + topics is cheapest.",
            "default": {
              "sentiment": true,
              "topics": true,
              "entities": false,
              "summary": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}