{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper - All In One",
    "description": "Every mode this Instagram family offers, in one Actor: profiles, posts, reels, social graph, stories and highlights, post lookups with comments and likes, hashtags, the location directory, audio tracks, and search. The mode is chosen at run time and each fills in its own section.",
    "version": "0.1",
    "x-build-id": "5EVNUrMiqGsZhfGAr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/toolzerhub~instagram-all-in-one-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-toolzerhub-instagram-all-in-one-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/toolzerhub~instagram-all-in-one-scraper/runs": {
      "post": {
        "operationId": "runs-sync-toolzerhub-instagram-all-in-one-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/toolzerhub~instagram-all-in-one-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-toolzerhub-instagram-all-in-one-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": [
          "scraperType"
        ],
        "properties": {
          "scraperType": {
            "title": "What to collect",
            "enum": [
              "userInfo",
              "userInfoById",
              "userDetails",
              "usernameById",
              "formerUsernames",
              "userPosts",
              "userReels",
              "userTaggedPosts",
              "userReposts",
              "userFollowers",
              "userFollowing",
              "relatedProfiles",
              "similarUsers",
              "userStories",
              "userHighlights",
              "highlightStories",
              "postByUrl",
              "postById",
              "postDetails",
              "postComments",
              "commentReplies",
              "postLikes",
              "hashtagPosts",
              "locationInfo",
              "locationPosts",
              "cities",
              "locations",
              "locationSearch",
              "locationNearby",
              "musicPosts",
              "musicSearch",
              "search",
              "generalSearch",
              "searchUsers",
              "searchHashtags",
              "searchReels"
            ],
            "type": "string",
            "description": "Choose the dataset for this run, then fill in the section for that mode below.",
            "default": "userInfo"
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "One or more Instagram usernames, without the @.",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "User IDs",
            "type": "array",
            "description": "One or more numeric Instagram user IDs. Only a numeric ID works for this mode — get one from the Profile actor's \"Get profile by username\" mode, which returns it for any account.",
            "items": {
              "type": "string"
            }
          },
          "usernamesOrIds": {
            "title": "Usernames or user IDs",
            "type": "array",
            "description": "One or more Instagram usernames or numeric user IDs, mixed freely — this mode accepts either.",
            "items": {
              "type": "string"
            }
          },
          "highlightId": {
            "title": "Highlight link or ID",
            "type": "string",
            "description": "Paste the highlight's instagram.com/stories/highlights/... link, or just the number at the end of it. You can also get this from the Stories & Highlights actor's \"List highlight covers\" mode."
          },
          "postUrl": {
            "title": "Post URL",
            "type": "string",
            "description": "Full Instagram post, reel, or TV URL, copied from the address bar."
          },
          "postId": {
            "title": "Post ID",
            "type": "string",
            "description": "The post's numeric media ID. Most people won't have this on hand — paste the post's URL into \"Get post by URL\" instead, or convert a shortcode to one with the Post actor's \"Convert shortcode to media ID\" mode."
          },
          "code": {
            "title": "Post link or shortcode",
            "type": "string",
            "description": "Paste the post's Instagram link (instagram.com/p/..., /reel/..., or /tv/...), or just the code at the end of it."
          },
          "commentId": {
            "title": "Comment ID",
            "type": "string",
            "description": "The id of the comment to read replies for. Run \"List post comments\" first and copy the `id` field of the comment you want from its output."
          },
          "sortBy": {
            "title": "Comment order",
            "enum": [
              "recent",
              "popular"
            ],
            "type": "string",
            "description": "Order to read a post's comments in.",
            "default": "recent"
          },
          "hashtag": {
            "title": "Hashtag",
            "type": "string",
            "description": "A hashtag, without the leading #."
          },
          "locationId": {
            "title": "Location link or ID",
            "type": "string",
            "description": "Paste the location's instagram.com/explore/locations/... link, or just the number in it. You can also get this from the Location actor's \"Search locations by name\" mode."
          },
          "tab": {
            "title": "Post order",
            "enum": [
              "ranked",
              "recent"
            ],
            "type": "string",
            "description": "Which ranking of a location's posts to read.",
            "default": "ranked"
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Two-letter ISO country code."
          },
          "cityId": {
            "title": "City ID",
            "type": "string",
            "description": "A city id from this domain's \"List cities in a country\" mode (looks like c2753900) — Instagram doesn't show this id anywhere else."
          },
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Latitude of the point to search near."
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Longitude of the point to search near."
          },
          "musicId": {
            "title": "Audio track ID",
            "type": "string",
            "description": "An Instagram audio track's numeric ID. Only needed if you don't have the track's link — give either this or Audio track URL below, not both."
          },
          "musicUrl": {
            "title": "Audio track URL",
            "type": "string",
            "description": "The audio/reel-mix page link, copied from Instagram. Give either this or Audio track ID above, not both."
          },
          "keyword": {
            "title": "Search term",
            "type": "string",
            "description": "The word or phrase to search for."
          },
          "query": {
            "title": "Search term",
            "type": "string",
            "description": "The word or phrase to search for."
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "all",
              "users",
              "hashtags",
              "places"
            ],
            "type": "string",
            "description": "Restrict the typeahead search to one section, or leave it on All.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "The maximum number of records to save per identifier or search term. A value of 0 removes the bound and the run continues until the source has no more to give.",
            "default": 50
          },
          "cursor": {
            "title": "Resume from",
            "type": "string",
            "description": "A continuation value from an earlier run — the value the run log prints when it stops. The run continues from there instead of the top. Leave it empty to start at the top. Applies only to a single identifier or search term; a multi-account run uses it for the first one only."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}