{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Profile Scraper Pro — All-in-One Discovery & Leads",
    "description": "Five discovery modes in one Actor: expand a seed account's network up to 5 levels, enrich a specific list, export followers/following, search by keyword, or pull a post's likers and commenters. Every mode can enrich results with business contacts and a computed engagement quality score.",
    "version": "1.0",
    "x-build-id": "tYg9ZhIckuFnVfQYa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thenetaji~instagram-profile-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thenetaji-instagram-profile-scraper-pro",
        "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/thenetaji~instagram-profile-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-thenetaji-instagram-profile-scraper-pro",
        "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/thenetaji~instagram-profile-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-thenetaji-instagram-profile-scraper-pro",
        "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": [
          "scraperType"
        ],
        "properties": {
          "scraperType": {
            "title": "Discovery Mode",
            "enum": [
              "similarUsers",
              "userInfo",
              "followersFollowing",
              "searchUsers",
              "mediaInfo"
            ],
            "type": "string",
            "description": "Which discovery mode to run — pick this first. Every field below is labeled with which mode(s) it applies to; fields for other modes are simply ignored.",
            "default": "similarUsers"
          },
          "username": {
            "title": "Username(s)",
            "type": "array",
            "description": "Instagram usernames to scrape. Used by Network Expansion, Specific Accounts, and Followers/Following — ignored by Keyword Search and Post Engagement.",
            "items": {
              "type": "string"
            }
          },
          "type": {
            "title": "Scraper Type",
            "enum": [
              "followers",
              "followings"
            ],
            "type": "string",
            "description": "Followers or followings. Only used when Discovery Mode is Followers/Following.",
            "default": "followers"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Search keyword. Only used when Discovery Mode is Keyword Search."
          },
          "codes": {
            "title": "Post Code(s)",
            "type": "array",
            "description": "Instagram post/reel shortcodes. Only used when Discovery Mode is Post Engagement.",
            "items": {
              "type": "string"
            }
          },
          "maxItem": {
            "title": "Max Items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of results (0 = unlimited). Not used by Specific Accounts or Post Engagement, which always process every username/code given.",
            "default": 100
          },
          "resumeCursor": {
            "title": "Resume a stopped run",
            "type": "string",
            "description": "Optional. If an earlier run of this Actor stopped partway through, open its log, copy the code next to '📍 RESUME CURSOR', and paste it here to carry on from where it left off instead of starting over."
          },
          "enrichProfile": {
            "title": "Enrich Profiles",
            "type": "boolean",
            "description": "Fetch full profile details for each account. Only used by Network Expansion and Followers/Following.",
            "default": false
          },
          "fullProfileDetails": {
            "title": "Fetch Full Profile Details",
            "type": "boolean",
            "description": "Extend enrichment to the full profile payload (business fields included). Used together with Enrich Profiles (Network Expansion, Followers/Following) or on its own (Specific Accounts, which always fetches a profile).",
            "default": false
          },
          "addonProfile": {
            "title": "Fetch Full Profile",
            "type": "boolean",
            "description": "Fetch each hit's full public profile. Only used when Discovery Mode is Keyword Search.",
            "default": false
          },
          "computeEngagementMetrics": {
            "title": "Compute Engagement Metrics",
            "type": "boolean",
            "description": "Fetch each account's recent posts and attach average likes/comments, posting frequency, view/follower ratio, and a composite quality score. Costs an extra event per account.",
            "default": false
          },
          "addonComments": {
            "title": "Include Comments",
            "type": "boolean",
            "description": "Attach a page of comments to each result. Only used when Discovery Mode is Post Engagement.",
            "default": false
          },
          "addonLikes": {
            "title": "Include Likes",
            "type": "boolean",
            "description": "Attach the liker list to each result. Only used when Discovery Mode is Post Engagement.",
            "default": false
          },
          "commentsSortType": {
            "title": "Comments Sort",
            "enum": [
              "popular",
              "recent",
              "verified"
            ],
            "type": "string",
            "description": "Sort order for attached comments. Only used when Include Comments is on.",
            "default": "popular"
          },
          "chainDepth": {
            "title": "Chain Depth",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Discover accounts connected to your results, not just directly similar ones. Set to 1 to also find users similar to your results. Set to 2 to go one level further. Leave at 0 to skip this.",
            "default": 0
          },
          "maxItemPerLevel": {
            "title": "Max Accounts Per Step",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many similar accounts to follow at each step of the chain. Lower = faster and more focused. Higher = broader discovery.",
            "default": 5
          },
          "exportGraph": {
            "title": "Export Connection Graph",
            "type": "boolean",
            "description": "In chain mode, also push a graph edge record for every discovered connection: { from, to, depth }. Useful for network visualization.",
            "default": false
          },
          "verifiedOnly": {
            "title": "Verified Accounts Only",
            "type": "boolean",
            "description": "Only include verified accounts. Only used when Discovery Mode is Network Expansion.",
            "default": false
          },
          "skipPrivate": {
            "title": "Skip Private Accounts",
            "type": "boolean",
            "description": "Exclude private accounts. Only used when Discovery Mode is Network Expansion.",
            "default": false
          },
          "minFollowers": {
            "title": "Min Followers",
            "minimum": 0,
            "type": "integer",
            "description": "Only include accounts with at least this many followers. Only used when Discovery Mode is Network Expansion; requires Enrich Profiles.",
            "default": 0
          },
          "maxFollowers": {
            "title": "Max Followers",
            "minimum": 0,
            "type": "integer",
            "description": "Only include accounts with at most this many followers. Only used when Discovery Mode is Network Expansion; requires Enrich Profiles.",
            "default": 0
          },
          "excludePosts": {
            "title": "Remove Posts",
            "type": "boolean",
            "description": "Strip post and video timeline data from enriched profiles. Removes the largest fields — highly recommended.",
            "default": false
          },
          "excludeSavedMedia": {
            "title": "Remove Saved & Collections",
            "type": "boolean",
            "description": "Strip saved media and collections data from enriched profiles.",
            "default": false
          },
          "excludeInternalFlags": {
            "title": "Remove Internal Flags",
            "type": "boolean",
            "description": "Strip internal viewer-relationship and supervision flags rarely useful for scraping (e.g. blocked_by_viewer, is_supervised_user, ai_agent_type).",
            "default": true
          },
          "excludeBioLinkDetails": {
            "title": "Clean Up Bio Links",
            "type": "boolean",
            "description": "Remove tracking URLs from bio links and strip the duplicate biography_with_entities field.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}