Instagram Scraper - Profiles, Posts, Hashtags & Comments
Pricing
from $1.99 / 1,000 results
Go to Apify Store
Instagram Scraper - Profiles, Posts, Hashtags & Comments
Pricing
from $1.99 / 1,000 results
You can access the Instagram Scraper - Profiles, Posts, Hashtags & Comments programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in API & Integrations in Apify Console.
{ "openapi": "3.0.1", "info": { "version": "0.0", "x-build-id": "5hKX5wUGqEyfjLoNM" }, "servers": [ { "url": "https://api.apify.com/v2" } ], "paths": { "/acts/lanternlab318~instagram-scraper/run-sync-get-dataset-items": { "post": { "operationId": "run-sync-get-dataset-items-lanternlab318-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/lanternlab318~instagram-scraper/runs": { "post": { "operationId": "runs-sync-lanternlab318-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/lanternlab318~instagram-scraper/run-sync": { "post": { "operationId": "run-sync-lanternlab318-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": { "usernames": { "title": "Instagram usernames or profile URLs", "type": "array", "description": "One profile per line. \"nasa\", \"@nasa\" and \"https://www.instagram.com/nasa/\" are all accepted. Each one returns a profile row (name, bio, follower, following and post counts, verified badge) plus its newest posts, up to Max posts per profile. Private accounts return the profile row only and are marked partial with partialReason \"private_account\".", "items": { "type": "string" } }, "postUrls": { "title": "Post or Reel URLs", "type": "array", "description": "One post per line: https://www.instagram.com/p/<code>/ or https://www.instagram.com/reel/<code>/ (a username in front and query strings are fine). Each one returns that post and up to Max comments per post URL of its comments, read page after page.", "items": { "type": "string" } }, "hashtags": { "title": "Hashtags", "type": "array", "description": "One hashtag per line, with or without \"#\". Each one returns public posts whose own caption carries that hashtag; search results that merely mention the word are read and dropped, and never charged. Instagram's own hashtag feed requires a login, so posts are found through public web search results: they are the matching posts the public web lists, not Instagram's complete or newest-first feed.", "items": { "type": "string" } }, "maxPostsPerProfile": { "title": "Max posts per profile", "minimum": 1, "maximum": 500, "type": "integer", "description": "Upper bound on the post rows one profile may produce, newest first. Never exceeded. Up to 12 come in one request; more are read page by page.", "default": 12 }, "maxPostsPerHashtag": { "title": "Max posts per hashtag", "minimum": 1, "maximum": 100, "type": "integer", "description": "Upper bound on the post rows one hashtag may produce. Never exceeded. When the public search results run out first, the hashtag is marked partial with partialReason \"search_results_exhausted\" instead of being reported as complete.", "default": 20 }, "maxCommentsPerPost": { "title": "Max comments per post URL", "minimum": 0, "maximum": 5000, "type": "integer", "description": "Comments to collect for each post in Post or Reel URLs. Instagram shows about 14 per page; the Actor pages on until this number is reached or Instagram has no more. 0 turns comments off. When Instagram stops before its own comment count, the post is marked with commentsPartialReason \"comments_not_public\": its count includes replies and comments it does not show to logged-out visitors.", "default": 50 }, "maxCommentsPerListedPost": { "title": "Max comments per profile or hashtag post", "minimum": 0, "maximum": 5000, "type": "integer", "description": "Comments to collect for each post found through usernames or hashtags. Off (0) by default, because every post then needs its own requests.", "default": 0 }, "newerThan": { "title": "Only posts newer than", "type": "string", "description": "Leave empty for no date filter. A date (2026-10-01), a full time (2026-10-01T08:00:00Z) or a relative period (\"7 days\", \"2 weeks\", \"3 months\"). Applies to profile and hashtag posts. A profile stops reading at its first post older than this, below its pinned posts, so an old pinned post never ends the list early. Post URLs you name yourself are always collected." }, "skipPinnedPosts": { "title": "Skip pinned posts", "type": "boolean", "description": "Leave pinned posts out of profile results. Either way a pinned post is written at most once per run and carries isPinned: true, so it is never counted twice.", "default": false }, "maxUpstreamRequests": { "title": "Max requests", "minimum": 1, "type": "integer", "description": "Hard ceiling on the HTTP requests this run sends. At the ceiling collection stops: what was read is kept, unfinished inputs are written with partialReason \"upstream_request_cap\" and the run ends normally. Leave it empty and the Actor works a ceiling out from your own inputs and limits, so a run is never unbounded." }, "proxyConfiguration": { "title": "Proxy", "type": "object", "description": "The proxy requests go through. The default (Apify Proxy, datacenter) is what this Actor is measured on. A request Instagram refuses is retried once on an Apify residential IP before the input is marked partial.", "default": { "useApifyProxy": true } } } }, "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 } } } } } } } } }}OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for Instagram Scraper - Profiles, Posts, Hashtags & Comments from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients: