{
  "openapi": "3.0.1",
  "info": {
    "title": "BlueSky Auto Follow",
    "description": null,
    "version": "0.0",
    "x-build-id": "82PDget1S8ZI9ULlU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/advantageous_subcontra~bluesky-auto-follow/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-advantageous_subcontra-bluesky-auto-follow",
        "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/advantageous_subcontra~bluesky-auto-follow/runs": {
      "post": {
        "operationId": "runs-sync-advantageous_subcontra-bluesky-auto-follow",
        "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/advantageous_subcontra~bluesky-auto-follow/run-sync": {
      "post": {
        "operationId": "run-sync-advantageous_subcontra-bluesky-auto-follow",
        "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": [
          "handle",
          "appPassword"
        ],
        "properties": {
          "handle": {
            "title": "Your Bluesky handle",
            "type": "string",
            "description": "The handle of the account the Actor acts on, e.g. `alice.bsky.social` (no leading `@`)."
          },
          "appPassword": {
            "title": "Bluesky App Password",
            "type": "string",
            "description": "Generate at https://bsky.app/settings/app-passwords. Format `xxxx-xxxx-xxxx-xxxx`. Stored encrypted and never logged."
          },
          "service": {
            "title": "PDS service URL",
            "type": "string",
            "description": "The Personal Data Server base URL. Override only if your account is on a self-hosted PDS.",
            "default": "https://bsky.social"
          },
          "maxFollowsPerDay": {
            "title": "Max follows per day",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Upper bound on how many accounts the Actor may follow in one run. Designed to be scheduled once per day. Start low (1–5) when testing a new account. The AT Protocol server also caps follows at roughly 555/hour.",
            "default": 10
          },
          "followVariation": {
            "title": "Randomize daily follow count",
            "type": "boolean",
            "description": "When on, each run's follow count is a random integer between 50% and 100% of `maxFollowsPerDay`. Makes activity look less mechanical and keeps you further from any burst detector.",
            "default": true
          },
          "unfollowDelayDays": {
            "title": "Unfollow delay (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Minimum age of a follow before the Actor will unfollow an account that hasn't followed back.",
            "default": 7
          },
          "targetListGoogleSheet": {
            "title": "Google Sheet with target handles",
            "type": "string",
            "description": "Public Google Sheet URL (shared as 'Anyone with the link'). The Actor reads a column named `blueskyHandle`, `handle`, or `username` (first matching column wins). Tried first when the backlog is empty."
          },
          "targetAccountsForFollowerExtraction": {
            "title": "Bluesky accounts to extract followers from",
            "uniqueItems": true,
            "type": "array",
            "description": "Fallback target source. When the Google Sheet is absent or exhausted and the backlog is empty, the Actor pages through the followers of the next unused handle in this list via `app.bsky.graph.getFollowers`. Accepts bare handles (`apify.com`), @-prefixed handles (`@apify.com`), DIDs (`did:plc:...`), or `https://bsky.app/profile/<handle>` URLs — the Actor normalizes them.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "accountLabel": {
            "title": "Account label",
            "pattern": "^$|^[a-z0-9][a-z0-9-]{0,30}$",
            "type": "string",
            "description": "Short identifier for the Bluesky account this run acts on. Leave blank to use the shared default state store `bluesky-auto-follow-state` (backward-compatible with existing schedules). Set to a label like `main` or `work` to pick a per-account state store `bluesky-auto-follow-state-<accountLabel>`, so two schedules on two different Bluesky accounts can safely run side-by-side without stepping on each other's backlog, followed list, or cached session. Lowercase letters, digits, and hyphens only. Keep this stable across runs of the same account — if you change it, the next run starts with an empty state.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}