{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Profile, Posts & Reels Scraper",
    "description": "Scrape public Instagram profiles, posts and reels — no cookies, nothing to configure. Get followers, bio and links, plus every post's likes, comments, plays, caption, hashtags and direct image/video URLs. Add top comments, filter by date or media type, or pull single posts and reels by URL.",
    "version": "0.0",
    "x-build-id": "eQQzae86SljAAKBGP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~instagram-profile-posts-reels-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-instagram-profile-posts-reels-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/apt_marble~instagram-profile-posts-reels-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-instagram-profile-posts-reels-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/apt_marble~instagram-profile-posts-reels-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-instagram-profile-posts-reels-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 profiles",
            "type": "array",
            "description": "Profiles to scrape. Enter a username (nasa), an @handle (@nasa) or a full profile URL (https://www.instagram.com/nasa/) — any mix works. Only public profiles can be scraped.",
            "default": [
              "nasa"
            ],
            "items": {
              "type": "string"
            }
          },
          "resultsType": {
            "title": "What to get for each profile",
            "enum": [
              "details",
              "posts",
              "reels"
            ],
            "type": "string",
            "description": "Profile details only is one request per profile and the cheapest option. Profile + posts walks the whole timeline back in time. Profile + reels walks the timeline and keeps only the reels, newest first. Play counts and audio attribution come back on the newest posts, and on every post when comments are on.",
            "default": "posts"
          },
          "postUrls": {
            "title": "Single post or reel URLs",
            "type": "array",
            "description": "Individual posts to scrape, independent of the profiles above. Accepts /p/, /reel/ and /tv/ URLs, or a bare shortcode. Each one is a single request that returns the post and its top comments together.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeProfileRecord": {
            "title": "Save the profile record",
            "type": "boolean",
            "description": "Push one profile record per handle alongside the posts. Turn this off if you only want post rows in the dataset.",
            "default": true
          },
          "maxPostsPerProfile": {
            "title": "Max posts per profile",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "How many posts (or reels) to keep for each profile. Instagram serves 12 items per page, so this rounds up to whole pages. Combined with a post-type filter the scraper reads up to 60 extra pages looking for matches, so a filtered run costs more requests than the number of rows suggests. Ignored when \"Profile details only\" is selected.",
            "default": 30
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Keep only posts published on or after this date. Accepts an absolute date (2026-01-31) or a relative window such as \"3 months\", \"6 weeks\" or \"90 days\". Leave blank for no date limit.",
            "default": ""
          },
          "postType": {
            "title": "Post type",
            "enum": [
              "all",
              "image",
              "video",
              "carousel",
              "reel"
            ],
            "type": "string",
            "description": "Keep only one kind of post. \"Videos\" means standalone video posts; reels are counted separately because Instagram labels them differently.",
            "default": "all"
          },
          "includeComments": {
            "title": "Also scrape top comments",
            "type": "boolean",
            "description": "Fetch the top comments for every post and save them as separate comment records linked to the post. Instagram serves roughly 15 comments per post to logged-out clients — deeper comment paging is not available. This costs one extra request per post and is billed as a separate event.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Upper bound on the comments saved for each post. Instagram itself returns about 15, so a higher number will not produce more.",
            "default": 15
          },
          "maxConcurrency": {
            "title": "Parallel profiles",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many profiles to work on at the same time. Instagram rate limits aggressively — raise this only if your runs are slow and you are not seeing rate-limit warnings.",
            "default": 3
          },
          "proxyCountry": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code used for the requests (for example us, gb, de). Instagram serves region-specific media hosts; results were verified from the United States.",
            "default": "us"
          },
          "blockedRetryMinutes": {
            "title": "Keep retrying when blocked (minutes)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Instagram sometimes blocks every route for minutes at a time. Above 0, when a target is fully blocked the scraper waits and probes about once every 20 seconds, for up to this many minutes, instead of finishing with nothing. Each probe is one request to the scraping provider, so a 5-minute wait adds up to about 15 provider requests per blocked target. 0 (default) gives up after the normal retries, exactly like earlier versions.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}