{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Followers With Mutual Connections Profile",
    "description": "Instagram Followers and Following Scraper 👥📸 extracts follower and following lists from public Instagram profiles, including usernames, profile URLs, bios, and account details. Ideal for audience research, influencer discovery, competitor tracking, and social network analysis. 🚀📊",
    "version": "0.1",
    "x-build-id": "WVMAe0ly0pwQPLz2U"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapio~instagram-followers-and-following-scrapper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapio-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/scrapio~instagram-followers-and-following-scrapper/runs": {
      "post": {
        "operationId": "runs-sync-scrapio-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/scrapio~instagram-followers-and-following-scrapper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapio-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 to scrape.\n\nExamples:\n• https://www.instagram.com/cristiano/\n• https://www.instagram.com/nike/\n• cristiano\n• nike\n\nAdd 2+ profiles in one run to also unlock shared-follower overlap analysis (accounts following 2+ of your input profiles).",
            "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": "Set the maximum number of items to collect per profile.\n\nRange: 0-100,000 items\nDefault: 100 items (recommended for faster results)\n\nNote: 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 API. Lower values are gentler on rate limits, higher values reduce total request count. Default 12 (Instagram's own web client default).",
            "default": 12
          },
          "fetchRelatedProfiles": {
            "title": "🔗 Fetch Related / Suggested Profiles per Seed",
            "type": "boolean",
            "description": "For EACH profile in 'Instagram Profile URLs or Usernames' (not per follower), fetch Instagram's own 'suggested accounts' graph (edge_related_profiles / edge_chaining) — exactly 1 extra request per seed profile, regardless of how many followers/following you collect. Emits rows with type='related'. Default false.",
            "default": false
          },
          "relatedProfilesLimit": {
            "title": "🔢 Max Related Profiles per Seed",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on how many related/suggested profiles to keep per seed profile (Instagram typically returns up to ~10-80 in one response). 0 = keep all returned. Default 10.",
            "default": 10
          },
          "computeMutualConnections": {
            "title": "🤝 Compute Mutual Connections & Overlap",
            "type": "boolean",
            "description": "Pure local set-intersection over already-collected rows — zero extra HTTP requests. Two analyses, run automatically when data supports them: (1) MUTUAL/FOLLOWS-BACK — this run's collected set for a profile is saved to a named key-value store; if the OPPOSITE mode (followers vs following) was already collected for that SAME profile in a prior run, the intersection is emitted as type='mutualConnection' rows (mutualFollow=true). (2) SHARED-FOLLOWER OVERLAP — when 2+ profiles are scraped in the SAME run, accounts appearing in 2+ of their result sets are emitted as type='sharedFollowerOverlap' rows. Default true.",
            "default": true
          },
          "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)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}