{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper",
    "description": "Scrape Instagram profiles, posts, reels and comments from any mix of profile and post URLs, or from a search term. $2.025 per 1,000 results: 25% below the Free plan price of apify/instagram-scraper, and the same flat rate on every plan.",
    "version": "1.5",
    "x-build-id": "rjEnbCOuB2O9djRzf"
  },
  "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. Hashtag, place, story 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 slice of the same feed. '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, videoViewCount, 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 null.",
            "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": "Search keyword",
            "type": "string",
            "description": "A word to collect posts for, instead of or as well as the targets above. It reaches Instagram's popular-search feed, which RANKS posts for a word: this is not a hashtag page, so 'coffee' returns what Instagram ranks for coffee rather than every post carrying #coffee. 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 keyword feed described above. '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 keyword may return. Pages are 24, so a limit of 30 costs two pages. 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": "Carry the owning account's username and id on every post and comment row. Turn it off for narrower rows when you are collecting one profile at a time.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}