{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper",
    "description": "Scrape Instagram profiles, posts, reels, comments and hashtags from any mix of profile, post and hashtag URLs, or from a search term. $1.75 per 1,000 results: 35% below the Free plan price of apify/instagram-scraper, one flat rate for every buyer.",
    "version": "1.5",
    "x-build-id": "BcR4vnhr53I9cajf0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/omaraw~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-omaraw-instagram-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/omaraw~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-omaraw-instagram-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/omaraw~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-omaraw-instagram-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",
        "properties": {
          "directUrls": {
            "title": "Instagram profiles or posts",
            "type": "array",
            "description": "The profiles and posts to collect: profile URLs (https://www.instagram.com/nasa/), bare handles (nasa), or single post and reel URLs (https://www.instagram.com/p/DCMUrLltVlM/). The two kinds may be mixed. A post URL returns that post (or its comments); it cannot be used with resultsType 'details', which asks for an account's own figures. A hashtag URL (https://www.instagram.com/explore/tags/travel/) collects that tag, like the search field below. Place, story, audio and /tagged/ URLs are refused with an explanation rather than collected.",
            "items": {
              "type": "string"
            }
          },
          "resultsType": {
            "title": "What to return",
            "enum": [
              "details",
              "posts",
              "reels",
              "comments"
            ],
            "type": "string",
            "description": "'details' is the profile row alone. 'posts' and 'reels' return one row per post, reels being the video posts alone - the results limit then counts videos, so 12 reels are the 12 newest videos, however many photos sit between them. 'comments' returns one row per comment, each carrying the post it sits under.",
            "default": "posts"
          },
          "resultsLimit": {
            "title": "Results limit",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Per profile. Posts and reels: up to 1000. Comments: up to 5000 PER POST, which is why the ceiling changes with the field above. Comments are the slow part - roughly one per second per post - so a large number here is a long run.",
            "default": 30
          },
          "commentsPostLimit": {
            "title": "Posts to read comments from",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Only used when the result type is 'comments': how many of the profile's most recent posts to walk. The total comment count is this times the results limit, so both numbers set the length of the run together.",
            "default": 12
          },
          "enrichPosts": {
            "title": "Complete every post row",
            "type": "boolean",
            "description": "Read each post's own page for the fields Instagram's profile grid does not carry: timestamp, likesCount, commentsCount, dimensions and taggedUsers (the accounts tagged IN the picture, which no caption mentions). Leave it on for complete rows. Turning it off makes a listing about ten times cheaper in requests and leaves those fields off the row (absent, not null or 0).",
            "default": true
          },
          "includeRelatedProfiles": {
            "title": "Include suggested accounts",
            "type": "boolean",
            "description": "Also collect the accounts Instagram suggests alongside each profile, published as relatedProfiles: handle, name, id, verified and private flags, avatar. It costs one extra request per profile, and the accounts in it are third parties you did not name — which is why it is off by default rather than always on.",
            "default": false
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "A date (2026-07-01, or 2026-07-01T12:00:00Z) or a relative span (\"3 days\", \"2 weeks\"). Older posts are dropped. Leave empty for no cutoff."
          },
          "search": {
            "title": "Hashtag or keyword",
            "type": "string",
            "description": "A hashtag or word to collect posts for, instead of or as well as the targets above; a leading # is fine. It reaches the same feed Instagram's own hashtag page loads for a visitor who is not signed in, and the posts do carry the tag: of those returned on 19 September 2026, 94% had #word in the caption. Two limits are Instagram's, not ours - about 60 posts is everything it keeps for a word without a login, and it opens this surface per word, so a word it keeps closed comes back empty with a row explaining why, at no charge. A more specific word usually answers where a broad one does not. The posts come back with their authors, and the author's own figures - followers, total posts - are not collected, because nobody named those accounts. Leave empty to collect only the targets above."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "hashtag",
              "profile",
              "place",
              "user"
            ],
            "type": "string",
            "description": "Which kind of thing the keyword names. Only 'hashtag' is reachable without a login, and it reaches the feed described above - the one Instagram's own hashtag page uses for a visitor who is not signed in. 'profile' and 'user' would mean searching for accounts by name, which is behind the login curtain; 'place' would mean searching for places, whose feed answers but does not paginate - measured 2026-09-03, its cursor returns the first page forever. All three are refused with that measurement rather than silently returning something else.",
            "default": "hashtag"
          },
          "searchLimit": {
            "title": "Search limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many posts one hashtag or keyword may return. About 60 is everything Instagram keeps for a word without a login (60, 60 and 64 measured on 19 September 2026), so a higher limit is not refused but will not be reached. There is no 'all' setting on purpose: these are other people's posts, selected by a word rather than by anyone naming the account.",
            "default": 24
          },
          "includeMediaUrls": {
            "title": "Include media URLs",
            "type": "boolean",
            "description": "Add the image and video URLs to each post row. They are signed by Instagram and expire within hours, so download anything you need promptly; the mediaExpired field says whether they were still valid when collected.",
            "default": false
          },
          "addParentData": {
            "title": "Repeat the profile on every row",
            "type": "boolean",
            "description": "Add ownerId and ownerFullName, the id and name of the account that published the post, to every post row. ownerUsername is on every post row whatever this says; a collab post published by another account gets no ownerId or ownerFullName, and comment rows never carry them.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}