{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Profile Searcher & Analyzer",
    "description": "Find Instagram profiles by name or username, rank matches, and analyze followers, engagement, comments, and media. Bring your own Instagram login or use publisher env credentials.",
    "version": "0.3",
    "x-build-id": "cGIKHx3igqbZBnQaQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devrecated~instagram-profile-searcher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devrecated-instagram-profile-searcher",
        "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/devrecated~instagram-profile-searcher/runs": {
      "post": {
        "operationId": "runs-sync-devrecated-instagram-profile-searcher",
        "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/devrecated~instagram-profile-searcher/run-sync": {
      "post": {
        "operationId": "run-sync-devrecated-instagram-profile-searcher",
        "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": {
          "instagramUsername": {
            "title": "Instagram login username",
            "type": "string",
            "description": "Instagram account used to authenticate API calls (not a profile to scrape). Overrides INSTAGRAM_USERNAME when set. Leave empty to use the Actor owner's configured service account."
          },
          "instagramPassword": {
            "title": "Instagram login password",
            "type": "string",
            "description": "Password for instagramUsername. Stored encrypted. Keep even when a session already exists — Instagram may ask to re-login."
          },
          "instagramSessionId": {
            "title": "Instagram session ID (optional)",
            "type": "string",
            "description": "Optional alternative to password login (sessionid cookie). Stored encrypted. Overrides INSTAGRAM_SESSION_ID when set."
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Exact Instagram @handles to fetch directly (with or without @). Skips name search — one profile lookup per username.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Real names or fuzzy text to search for. Instagram search + ranking; not a direct username fetch.",
            "items": {
              "type": "string"
            }
          },
          "maxSearchResultsPerQuery": {
            "title": "Max search results per query",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum account candidates collected from Instagram search endpoints for each search query.",
            "default": 15
          },
          "maxProfilesToAnalyze": {
            "title": "Max profiles to analyze (search)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of top-ranked search matches per query to fetch full profile details and engagement stats for. Direct usernames always analyze the one matched profile.",
            "default": 5
          },
          "analyzeRecentPosts": {
            "title": "Recent posts to sample",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many recent posts to scrape for engagement + comments (0 disables post analysis).",
            "default": 12
          },
          "includeComments": {
            "title": "Include recent comments",
            "type": "boolean",
            "description": "For each recent post, scrape comment text, author, and timestamps.",
            "default": true
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Cap on comments pulled per recent post (parents + replies).",
            "default": 100
          },
          "includeLikers": {
            "title": "Include likers list",
            "type": "boolean",
            "description": "For each recent post, scrape who liked it (usernames + profile links). Instagram does not expose when each like happened.",
            "default": true
          },
          "maxLikersPerPost": {
            "title": "Max likers per post",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on likers pulled per recent post. Popular posts will be truncated.",
            "default": 100
          },
          "includeFollowers": {
            "title": "Include followers list",
            "type": "boolean",
            "description": "Scrape the full follower list (up to maxFollowers). Large accounts will be truncated.",
            "default": true
          },
          "maxFollowers": {
            "title": "Max followers to scrape",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Safety cap. Instagram blocks or rate-limits unbounded scrapes; raise carefully.",
            "default": 5000
          },
          "includeFollowing": {
            "title": "Include following list",
            "type": "boolean",
            "description": "Scrape the full following list (up to maxFollowing).",
            "default": true
          },
          "maxFollowing": {
            "title": "Max following to scrape",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Safety cap for accounts the profile follows.",
            "default": 5000
          },
          "downloadPhotos": {
            "title": "Download media",
            "type": "boolean",
            "description": "Download photo, carousel, and reel/video files per profile into storage/media/{username}/{n}_{YYYY-MM-DD}/ on disk (not the default key-value store).",
            "default": true
          },
          "maxPostsToDownload": {
            "title": "Max posts to download media for",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of posts (photo, carousel, or reel) to download media from per profile. A carousel counts as one post; all of its slides are saved.",
            "default": 50
          },
          "maxPhotosPerProfile": {
            "title": "Max posts to download (legacy)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Deprecated alias for maxPostsToDownload. Prefer maxPostsToDownload.",
            "default": 50
          },
          "minMatchScore": {
            "title": "Minimum match score (search)",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Search results below this 0–1 score are ignored (unless no full profile fetch succeeds). Does not apply to direct usernames.",
            "default": 0.35
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Pause between Instagram API calls to reduce rate limits.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}