{
  "openapi": "3.0.1",
  "info": {
    "title": "Bluesky Community Intelligence",
    "description": "Discover and compare public Bluesky creators and communities with explainable rankings, bounded activity evidence, and portable snapshots.",
    "version": "0.1",
    "x-build-id": "WAILA7AHyNplhAWcF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xcalibur~bluesky-community-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xcalibur-bluesky-community-intelligence",
        "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/xcalibur~bluesky-community-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-xcalibur-bluesky-community-intelligence",
        "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/xcalibur~bluesky-community-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-xcalibur-bluesky-community-intelligence",
        "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": {
          "contractVersion": {
            "title": "Contract version",
            "enum": [
              "1.0",
              "2.0"
            ],
            "type": "string",
            "description": "Optional explicit contract pin. community_map requires 1.0; mature workflows require 2.0. When omitted, runtime selects the required version from analysisType."
          },
          "analysisType": {
            "title": "Analysis type",
            "enum": [
              "community_map",
              "creator_discovery",
              "competitor_analysis",
              "snapshot_compare"
            ],
            "type": "string",
            "description": "Choose one explicit workflow. All network workflows remain anonymous, public, bounded, one-hop, DID-keyed, deterministic, and AI-free. Snapshot comparison makes no Bluesky request.",
            "default": "community_map"
          },
          "seedAccounts": {
            "title": "Seed accounts",
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "Public handles or DIDs. Community Map requires 2–10 under mode caps. Mature network workflows accept optional seed-following evidence. Resolved source DIDs are excluded from member results.",
            "items": {
              "type": "string",
              "minLength": 3,
              "maxLength": 253
            }
          },
          "competitorAccounts": {
            "title": "Competitor accounts",
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "Two or more public handles or DIDs for competitor_analysis only. Outputs describe observed public set relationships and never infer loyalty, intent, endorsement, or private affiliation.",
            "items": {
              "type": "string",
              "minLength": 3,
              "maxLength": 253
            }
          },
          "topics": {
            "title": "Topics",
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "Creator discovery requires at least one explicit topic. Public profile search admits bounded candidates; recent post text is matched by published token and phrase rules, not an LLM.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "languageFilters": {
            "title": "Declared language filters",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional BCP 47-style tags such as en or fr. Matching uses only public post language declarations; missing language is excluded when a filter is active and is counted rather than inferred.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
            }
          },
          "starterPackUris": {
            "title": "Optional starter-pack AT URIs",
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "Explicit at:// URIs for public app.bsky.graph.starterpack records. The Actor resolves each public backing list and never searches for packs.",
            "items": {
              "type": "string",
              "maxLength": 2048,
              "pattern": "^at://did:[a-z0-9]+:[A-Za-z0-9._:%-]+(?::[A-Za-z0-9._:%-]+)*/app\\.bsky\\.graph\\.starterpack/[A-Za-z0-9._~:-]{1,512}$"
            }
          },
          "recentDays": {
            "title": "Recent activity window in days",
            "type": "integer",
            "description": "Mature workflows only. Evaluation clamps to 30 days and Scale to 90 days. Activity outside the explicit run window is not analyzed."
          },
          "runMode": {
            "title": "Run scale",
            "enum": [
              "evaluation",
              "scale"
            ],
            "type": "string",
            "description": "Evaluation uses smaller discovery/content caps. Scale raises reviewed ceilings. Community Map retains its v1 250/5,000 account ceilings; mature workflows use 50/500 accounts plus separate request and post-observation budgets.",
            "default": "evaluation"
          },
          "maxFollowingPerSeed": {
            "title": "Maximum following members per seed",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Per-seed collection ceiling. Evaluation clamps to 100; Scale clamps to 500. The source is lower-bound only when the limit is reached and AppView exposes an unconsumed next cursor; exact exhaustion at the limit remains exact."
          },
          "maxMembersPerStarterPack": {
            "title": "Maximum members per starter pack",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Per-pack backing-list ceiling. Evaluation clamps to 100; Scale clamps to 500. The source is lower-bound only when the limit is reached and AppView exposes an unconsumed next cursor; exact exhaustion at the limit remains exact."
          },
          "maxSearchAccountsPerTopic": {
            "title": "Maximum searched accounts per topic",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Mature workflows only. One public profile-search page per topic; Evaluation clamps to 25 and Scale to 100."
          },
          "maxPostsPerAccount": {
            "title": "Maximum recent activities per account",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Mature workflows only. One public author-feed page per admitted DID; Evaluation clamps to 10 and Scale to 25."
          },
          "maxTotalPosts": {
            "title": "Maximum total post observations",
            "minimum": 1,
            "maximum": 12500,
            "type": "integer",
            "description": "Mature workflows only. Separate global observation budget; Evaluation clamps to 500 and Scale to 12,500."
          },
          "maxUniqueAccounts": {
            "title": "Maximum unique analyzed accounts",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard ceiling shared by admitted DIDs, enrichment, member rows, and analyzed-account events. Community Map clamps to 250/5,000; mature workflows to 50/500. Remaining hosted event allowance can reduce it before client creation."
          },
          "rankingLimit": {
            "title": "Rows per ranking view",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Mature workflows only. Caps public rows in each explainable ranking view; snapshots retain full emitted-account positions. Evaluation clamps to 25 and Scale to 100."
          },
          "baselineSnapshot": {
            "title": "Optional baseline snapshot",
            "type": "object",
            "description": "Versioned portable snapshot from a comparable mature run. Required with currentSnapshot for snapshot_compare; optional on network workflows to emit observed changes."
          },
          "currentSnapshot": {
            "title": "Current snapshot",
            "type": "object",
            "description": "Versioned portable snapshot required only by snapshot_compare. Snapshot bodies are validated, fingerprinted, bounded to 2 MB each, and never copied into dataset input metadata."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}