{
  "openapi": "3.0.1",
  "info": {
    "title": "Moa Instagram Followers Scraper",
    "description": "Moa Instagram Followers Scraper",
    "version": "0.0",
    "x-build-id": "cYdgxQYXADBVDV4mf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/funny_kettle~moa-instagram-followers-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-funny_kettle-moa-instagram-followers-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/funny_kettle~moa-instagram-followers-scraper/runs": {
      "post": {
        "operationId": "runs-sync-funny_kettle-moa-instagram-followers-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/funny_kettle~moa-instagram-followers-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-funny_kettle-moa-instagram-followers-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": [
          "username"
        ],
        "properties": {
          "username": {
            "title": "Instagram Username or URL",
            "type": "string",
            "description": "Instagram username (e.g. 'natgeo') or profile URL (e.g. 'https://www.instagram.com/natgeo/')."
          },
          "scrape_following": {
            "title": "Scrape Following list instead of Followers",
            "type": "boolean",
            "description": "When OFF, scrapes the account's FOLLOWERS (people who follow this account). When ON, scrapes the account's FOLLOWING list (people this account follows).",
            "default": false
          },
          "max_followers": {
            "title": "Max Results",
            "minimum": 50,
            "type": "integer",
            "description": "Maximum number of followers or following to scrape. Minimum 50. One run reliably collects up to ~17000; larger requests need allow_partial=true (you will get a partial result) or should be split into multiple smaller jobs.",
            "default": 200
          },
          "max_spend_usd": {
            "title": "Max spend per run (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard ceiling on the estimated upstream scrape cost for this run. If the estimate (≈ $1 per 1000 results, doubled when Include Counts is on) exceeds this, the run aborts BEFORE scraping anything — so a large Max Results can never surprise-bill you. Default 20 covers normal jobs (a few thousand results, or ~15000 list-only) and blocks a runaway 200000-result run. Set 0 to disable the cap.",
            "default": 20
          },
          "allow_partial": {
            "title": "Allow partial result for very large requests",
            "type": "boolean",
            "description": "When OFF (default), a Max Results above the single-run safe limit (~17000) is rejected up front so you are never silently given a truncated list. Turn ON to accept a partial result (~17000 rows) from one run instead of an error.",
            "default": false
          },
          "include_counts": {
            "title": "Include Follower/Following Counts & Ratio",
            "type": "boolean",
            "description": "When enabled, runs an extra profile scrape for each result to get their follower count, following count, and ratio (followers/following). This is slower and uses more API credits.",
            "default": false
          },
          "gender_filter": {
            "title": "Gender Filter",
            "enum": [
              "any",
              "male",
              "female",
              "female_unknown"
            ],
            "type": "string",
            "description": "Filter results by inferred gender. 'any' = no filter. 'male' = confirmed male only. 'female' = confirmed female only (strict — Tier 0 heuristics + optional LLM). 'female_unknown' = confirmed female plus residual unknowns (for manual review). Gender inference: first-name dictionary + emoji/honorific/username heuristics + CJK surname reorder + optional Haiku LLM.",
            "default": "any"
          },
          "use_llm_classifier": {
            "title": "Use LLM for unknowns (extra cost — needs your own API key)",
            "type": "boolean",
            "description": "When ON, sends rows still 'unknown' after the free heuristics to an LLM for classification. You MUST supply your own Anthropic or DeepSeek API key below — the LLM call is billed to YOUR key, not to this Actor. Adds roughly $0.0001 per resolved row. Hard cap: 20 batches / $0.05 per run.",
            "default": false
          },
          "anthropic_api_key": {
            "title": "Anthropic API key (for LLM, optional)",
            "type": "string",
            "description": "Your own Anthropic API key (starts with 'sk-ant-'). Used for Claude Haiku classification of unknown profiles. Billed to YOUR Anthropic account. Only needed when 'Use LLM for unknowns' is ON. Preferred over DeepSeek when both are given. Get one at https://console.anthropic.com."
          },
          "deepseek_api_key": {
            "title": "DeepSeek API key (for LLM, optional)",
            "type": "string",
            "description": "Your own DeepSeek API key (starts with 'sk-'). Used as the LLM provider when no Anthropic key is given, or as automatic fallback if Anthropic fails. Billed to YOUR DeepSeek account. Only needed when 'Use LLM for unknowns' is ON. Get one at https://platform.deepseek.com."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}