{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Related Profiles Scraper",
    "description": "Find the similar and suggested accounts Instagram shows for any public profile. Get followers, bio, links, posting activity, language and a similarity score for each related account. Bulk usernames, follower filters, no account or cookies needed.",
    "version": "1.0",
    "x-build-id": "ZjabYaJU2IGma3mFx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insights_data~instagram-related-profiles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insights_data-instagram-related-profiles-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/insights_data~instagram-related-profiles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-insights_data-instagram-related-profiles-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/insights_data~instagram-related-profiles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-insights_data-instagram-related-profiles-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": [
          "usernames"
        ],
        "properties": {
          "usernames": {
            "title": "🧬 Instagram accounts",
            "type": "array",
            "description": "Usernames, @usernames or profile links (as many as you like). You get the related accounts of each one.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🎯 Related profiles per account",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "How many related profiles to return for each account you entered. Use 0 for every related profile Instagram offers (it suggests about 50 per account, more with depth 2).",
            "default": 10
          },
          "searchDepth": {
            "title": "🕸️ Search depth",
            "enum": [
              "1",
              "2"
            ],
            "type": "string",
            "description": "Depth 2 reads the suggestions of the suggestions when an account has fewer related profiles than you asked for.",
            "default": "1"
          },
          "minFollowers": {
            "title": "📈 Minimum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profiles with at least this many followers. 0 = no minimum.",
            "default": 0
          },
          "maxFollowers": {
            "title": "📉 Maximum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profiles with at most this many followers. 0 = no maximum.",
            "default": 0
          },
          "extractEmail": {
            "title": "📧 Look for e-mails on the profile website",
            "type": "boolean",
            "description": "When the bio has no e-mail, read the e-mail from the website linked in the bio (home page and contact page). Adds about 1 second per profile with a website.",
            "default": true
          },
          "engagement": {
            "title": "🔥 Add engagement rate",
            "type": "boolean",
            "description": "Adds average likes, average comments and the engagement rate from up to 5 recent posts per profile. Slower (about 4 seconds more per profile); best effort, a post Instagram will not show is left out.",
            "default": false
          },
          "keywords": {
            "title": "🔎 Keywords to include",
            "type": "array",
            "description": "Keep profiles whose text contains any of these words (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "🚫 Keywords to exclude",
            "type": "array",
            "description": "Drop profiles whose text contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "keywordLocation": {
            "title": "📍 Where to look for keywords",
            "enum": [
              "bio_or_name",
              "bio",
              "name",
              "posts",
              "anywhere"
            ],
            "type": "string",
            "description": "Which text the keyword filters read.",
            "default": "bio_or_name"
          },
          "profileLanguage": {
            "title": "🗣️ Profile language",
            "enum": [
              "any",
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "id",
              "tr",
              "nl",
              "ja",
              "ko",
              "zh",
              "ar",
              "ru",
              "hi",
              "th",
              "he",
              "el"
            ],
            "type": "string",
            "description": "Keep profiles written in this language (guessed from the bio and recent captions; profiles with too little text are dropped).",
            "default": "any"
          },
          "mustBeVerified": {
            "title": "✔️ Only verified accounts",
            "type": "boolean",
            "description": "Keep only accounts with the verified badge.",
            "default": false
          },
          "hasWebsite": {
            "title": "🌐 Only profiles with a website",
            "type": "boolean",
            "description": "Keep only profiles that list a website in the bio.",
            "default": false
          },
          "contactInfoType": {
            "title": "📇 Contact details",
            "enum": [
              "any",
              "email",
              "phone",
              "email_or_phone",
              "email_and_phone"
            ],
            "type": "string",
            "description": "Keep only profiles with the contact details you pick (e-mails and phones come from the bio and, for e-mails, the profile website).",
            "default": "any"
          },
          "lastPostDays": {
            "title": "📅 Posted within the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profiles whose newest post is at most this many days old. 0 = off.",
            "default": 0
          },
          "minPostsInPeriod": {
            "title": "🗓️ Minimum posts in the period",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profiles with at least this many posts inside the period below. 0 = off.",
            "default": 0
          },
          "postsCheckPeriodDays": {
            "title": "⏱️ Period for the posts check",
            "enum": [
              "7",
              "14",
              "30"
            ],
            "type": "string",
            "description": "The period used by \"Minimum posts in the period\".",
            "default": "30"
          },
          "lastReelDays": {
            "title": "🎬 Posted a reel within the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profiles with a reel at most this many days old. 0 = off.",
            "default": 0
          },
          "minEngagementRate": {
            "title": "💬 Minimum engagement rate %",
            "minimum": 0,
            "type": "number",
            "description": "Keep only profiles with at least this engagement rate. Switches the engagement option on. 0 = off.",
            "default": 0
          },
          "minSeedOverlap": {
            "title": "🤝 Related to at least N of your accounts",
            "minimum": 1,
            "type": "integer",
            "description": "With several accounts: keep only profiles that Instagram lists for at least this many of them.",
            "default": 1
          },
          "excludeAccounts": {
            "title": "🙅 Never return these accounts",
            "type": "array",
            "description": "Usernames to leave out of the results.",
            "items": {
              "type": "string"
            }
          },
          "skipDatasetId": {
            "title": "♻️ Skip accounts from an earlier run",
            "type": "string",
            "description": "Pick a dataset from an earlier run of this actor. Accounts already in it are not returned again."
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Optional. The actor connects directly first and switches to a proxy by itself if Instagram refuses."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}