{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Followers And Following Scrapper With Profile Emails",
    "description": "📲 Instagram Followers & Following Scrapper extracts public follower/following lists, usernames, bios, and counts in seconds. 🔎 Export CSV/JSON for growth, influencer outreach, and competitive analysis. ⚡️ Fast, reliable, GDPR-aware. 🚀 Perfect for marketers & researchers.",
    "version": "0.1",
    "x-build-id": "vJiUw6eUbtJYibsOW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~instagram-followers-and-following-scrapper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-instagram-followers-and-following-scrapper",
        "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/api-empire~instagram-followers-and-following-scrapper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-instagram-followers-and-following-scrapper",
        "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/api-empire~instagram-followers-and-following-scrapper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-instagram-followers-and-following-scrapper",
        "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": [
          "scrapeMode",
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "📋 Instagram Profile URLs or Usernames",
            "type": "array",
            "description": "List of Instagram profile URLs or usernames whose followers/following you want to scrape and qualify as leads.\n\nExamples:\n• https://www.instagram.com/cristiano/\n• https://www.instagram.com/nike/\n• cristiano\n• nike",
            "items": {
              "type": "string"
            }
          },
          "scrapeMode": {
            "title": "🎯 Scrape Mode",
            "enum": [
              "followers",
              "following"
            ],
            "type": "string",
            "description": "Choose what to scrape:\n• followers - Scrape followers of the profiles\n• following - Scrape accounts that the profiles are following",
            "default": "followers"
          },
          "maxData": {
            "title": "📊 Maximum Items per Profile",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of followers/following rows to collect PER source profile, before any audience filter is applied.\n\nRange: 0-100,000. Default: 100. 0 = unlimited (collect until pagination ends).",
            "default": 100
          },
          "pageSize": {
            "title": "📄 API Page Size (Advanced)",
            "minimum": 5,
            "maximum": 50,
            "type": "integer",
            "description": "Number of users requested per pagination page from Instagram's internal friendships API. Lower = gentler on rate limits, higher = fewer total requests. Default 12 (Instagram's own web client default).",
            "default": 12
          },
          "enrichProfiles": {
            "title": "🔎 Enrich Each Profile (Lead Enrichment)",
            "type": "boolean",
            "description": "When ON, calls Instagram's web_profile_info endpoint for each collected follower/following (up to 'Max Profiles to Enrich per Source Profile' below) to fetch biography, external URL/bio links, follower/following/media counts, business-account status + category, public email/phone (when Instagram exposes them), and highlight-reel count. OFF by default — this multiplies request volume, so it is opt-in and capped.",
            "default": false
          },
          "enrichTopN": {
            "title": "🔢 Max Profiles to Enrich per Source Profile",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on how many collected rows get enriched PER source profile in 'startUrls' (not unlimited, by design — enrichment is 1 extra HTTP request per row). Only used when 'Enrich Each Profile' is ON. Range: 1-500. Default: 20.",
            "default": 20
          },
          "enrichConcurrency": {
            "title": "⚙️ Enrichment Concurrency Limit",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of enrichment requests in flight at the same time across the whole run. Higher = faster enrichment but higher block risk; lower = slower but gentler. Range: 1-10. Default: 3.",
            "default": 3
          },
          "verifiedOnly": {
            "title": "✅ Verified Accounts Only",
            "type": "boolean",
            "description": "Keep only rows where is_verified=true. Works without enrichment (verified status is already in the base followers/following payload).",
            "default": false
          },
          "businessOnly": {
            "title": "🏢 Business Accounts Only",
            "type": "boolean",
            "description": "Keep only rows where isBusinessAccount=true (requires enrichProfiles=true).",
            "default": false
          },
          "hasEmail": {
            "title": "📧 Has Public Email Only",
            "type": "boolean",
            "description": "Keep only rows with a non-empty publicEmail (requires enrichProfiles=true). Instagram only exposes this for some business accounts.",
            "default": false
          },
          "hasPhone": {
            "title": "📞 Has Public Phone Only",
            "type": "boolean",
            "description": "Keep only rows with a non-empty publicPhoneNumber (requires enrichProfiles=true). Instagram only exposes this for some business accounts.",
            "default": false
          },
          "minFollowers": {
            "title": "📈 Minimum Follower Count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only rows with followerCount >= this value (requires enrichProfiles=true). Leave empty to disable."
          },
          "maxFollowers": {
            "title": "📉 Maximum Follower Count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only rows with followerCount <= this value (requires enrichProfiles=true). Leave empty to disable."
          },
          "keywordInBio": {
            "title": "🔑 Keyword(s) In Bio",
            "type": "array",
            "description": "Keep only rows whose biography contains at least one of these keywords (case-insensitive). Matched terms are reported per-row in the 'matchedKeywords' output field. Requires enrichProfiles=true. Leave empty to disable.",
            "items": {
              "type": "string"
            }
          },
          "sessionId": {
            "title": "🍪 Instagram sessionid (recommended)",
            "type": "string",
            "description": "Optional but strongly recommended for better success rates.\n\nHow to get your Session ID:\n1. Log into Instagram in your browser\n2. Open Developer Tools (F12 or Right-click → Inspect)\n3. Go to Application/Storage → Cookies → https://www.instagram.com\n4. Find and copy the 'sessionid' value\n\nWithout a session ID, the scraper may have limited access and lower success rates."
          },
          "proxyConfiguration": {
            "title": "🔒 Proxy Configuration",
            "type": "object",
            "description": "Configure proxy settings for enhanced reliability and bypassing restrictions.\n\nSmart fallback: 1) No proxy (default, direct) 2) Datacenter proxy 3) Residential proxy (automatic fallback if blocked, with 3 retries). Also used for enrichment requests."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}