{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Followers / Following Scraper",
    "description": "Export followers and following lists from public Instagram profiles. Get usernames, user IDs, names, profile URLs, verification and privacy status, plus optional profile metrics. Process multiple source accounts and export clean JSON, CSV or Excel.",
    "version": "1.0",
    "x-build-id": "CHKYkV9CTnaHcvlw2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~instagram-followers-following-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-instagram-followers-following-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/coregent~instagram-followers-following-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-instagram-followers-following-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/coregent~instagram-followers-following-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-instagram-followers-following-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",
        "properties": {
          "profiles": {
            "title": "Instagram profiles",
            "maxItems": 100,
            "type": "array",
            "description": "Public Instagram profiles whose followers and/or following to export: usernames (natgeo), @handles (@nasa) or profile URLs (https://www.instagram.com/natgeo/). Duplicates are removed; post and Reel URLs are rejected. Up to 100 profiles per run.",
            "items": {
              "type": "string"
            },
            "default": [
              "nasa"
            ]
          },
          "relationshipType": {
            "title": "Relationship type",
            "enum": [
              "FOLLOWERS",
              "FOLLOWING",
              "BOTH"
            ],
            "type": "string",
            "description": "FOLLOWERS exports the accounts that follow each profile, FOLLOWING the accounts each profile follows, BOTH exports both lists with every row labelled FOLLOWER or FOLLOWING.",
            "default": "FOLLOWING"
          },
          "maxFollowersPerProfile": {
            "title": "Max followers per profile",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum follower rows returned for each profile. Common values: 100, 500, 1,000, 5,000, 10,000, 50,000. Instagram serves only a limited part of very large follower lists; the summary row's coverage status shows when that happened.",
            "default": 1000
          },
          "maxFollowingPerProfile": {
            "title": "Max following per profile",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum following rows returned for each profile (used when relationship type is FOLLOWING or BOTH).",
            "default": 1000
          },
          "includePrivateAccounts": {
            "title": "Include private accounts",
            "type": "boolean",
            "description": "Keep returned users whose own profile is private (public identity fields only — their content is never accessed). Turn off to drop them; dropped rows are not charged. This does not unlock private source profiles.",
            "default": true
          },
          "verifiedOnly": {
            "title": "Verified accounts only",
            "type": "boolean",
            "description": "Return only users with a verified badge.",
            "default": false
          },
          "includeProfileMetrics": {
            "title": "Include profile metrics",
            "type": "boolean",
            "description": "Look up each returned user's profile to add follower, following and post counts, bio, external URL, category and business flag. One extra lookup per user, so these rows are billed at the separate enriched-row price and the run is slower. Needed for the follower-count filters.",
            "default": false
          },
          "minFollowers": {
            "title": "Min followers of returned users",
            "minimum": 0,
            "type": "integer",
            "description": "Only return users with at least this many followers. Requires 'Include profile metrics'. 0 = no lower bound.",
            "default": 0
          },
          "maxFollowers": {
            "title": "Max followers of returned users",
            "minimum": 0,
            "type": "integer",
            "description": "Only return users with at most this many followers. Requires 'Include profile metrics'. 0 = no upper bound.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration for resolving source profiles on Instagram. Defaults to Apify Proxy (datacenter). Apify Residential is not supported — use Custom proxy URLs for your own residential provider.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of source profiles processed in parallel. Pages of one list are always fetched one after another.",
            "default": 5
          },
          "maxRetries": {
            "title": "Max retries per profile",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many times a profile is retried after rate limits or temporary errors. A list resumes at the page where it stopped. Private and nonexistent profiles are never retried.",
            "default": 4
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose logging.",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}