{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper - Posts, Reels, Profiles & Comments",
    "description": "[$1.5/1000] Scrape Instagram profiles, posts, reels, comments and locations from any mix of links and usernames - auto-detected, no login. Full post detail with all carousel media, tagged users, music, comments with authors, plus profile engagement analytics and date, media-type and likes filters.",
    "version": "0.1",
    "x-build-id": "vmAH0Jtc8lVgJjCer"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryyos~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryyos-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/ryyos~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ryyos-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/ryyos~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ryyos-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",
        "required": [
          "targets"
        ],
        "properties": {
          "targets": {
            "title": "Instagram profiles, posts, reels or locations",
            "type": "array",
            "description": "One per line. Accepted: profile URLs (<code>instagram.com/natgeo</code>), usernames (<code>natgeo</code> or <code>@natgeo</code>), post links (<code>/p/...</code>), reel links (<code>/reel/...</code>) and location links (<code>/explore/locations/123/...</code>). The type of each line is detected automatically, so you can mix them freely. For hashtags and keyword search use the Instagram Search Scraper Actor.",
            "items": {
              "type": "string"
            }
          },
          "includeProfileDetails": {
            "title": "Profile details & analytics",
            "type": "boolean",
            "description": "One row per profile: bio, links, followers, following, verification, highlights, Threads handle, plus engagement analytics computed from the scraped posts (average likes and comments, engagement rate, posts per week, top hashtags, content mix).",
            "default": true
          },
          "includePosts": {
            "title": "Posts from profiles",
            "type": "boolean",
            "description": "Collect the profile's feed posts (photos, videos, carousels and reels shown in the grid), newest first.",
            "default": true
          },
          "maxPostsPerProfile": {
            "title": "Max posts per profile",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "How many feed posts to collect per profile. Higher values cost more.",
            "default": 24
          },
          "includeReels": {
            "title": "Reels tab from profiles",
            "type": "boolean",
            "description": "Also collect the profile's Reels tab, which includes play counts. Reels already collected from the feed are not duplicated.",
            "default": false
          },
          "maxReelsPerProfile": {
            "title": "Max reels per profile",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "How many reels to collect per profile when the Reels tab is enabled.",
            "default": 12
          },
          "scrapePostDetails": {
            "title": "Open every post for full detail",
            "type": "boolean",
            "description": "Opens each post to get exact likes and comment counts, the latest comments with authors, every carousel image and video in downloadable form, tagged users, collaborators, music and location. Turn off for a faster, cheaper run with listing data only. Post and reel links you paste are always opened in full.",
            "default": true
          },
          "maxCommentsPerPost": {
            "title": "Comments per post",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many of the latest comments to include with each opened post (author, text, time, likes, reply count). Without a login Instagram shows roughly the first 12-15 comments of a post, so values above that return what is available.",
            "default": 10
          },
          "maxPostsPerLocation": {
            "title": "Max posts per location",
            "minimum": 0,
            "maximum": 24,
            "type": "integer",
            "description": "Top posts to collect for each location link. Without a login Instagram shows about 20 top posts per location.",
            "default": 12
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Only keep posts published after this date. Use YYYY-MM-DD or a relative value such as <code>7 days</code>, <code>3 months</code> or <code>1 year</code>. UTC time. Feeds stop early once older posts are reached, which saves time and money."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only keep posts published before this date. Same formats as above. Combine both fields for an exact date range."
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "Keep only these kinds of posts. Leave empty to keep everything.",
            "items": {
              "type": "string",
              "enum": [
                "photo",
                "video",
                "carousel",
                "reel"
              ],
              "enumTitles": [
                "Photos",
                "Videos",
                "Carousels (multiple images/videos)",
                "Reels"
              ]
            },
            "default": []
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer likes than this. 0 keeps all posts. Exact counts need the opened post, so posts are opened automatically when this is set.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer comments than this. 0 keeps all posts. Posts are opened automatically when this is set.",
            "default": 0
          },
          "captionKeywords": {
            "title": "Caption must contain",
            "type": "array",
            "description": "Keep only posts whose caption contains at least one of these words or phrases (case-insensitive). Leave empty to keep everything.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run in parallel. The default is a safe balance between speed and Instagram rate limits.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is used by default and rotated automatically whenever Instagram rate-limits a session. Datacenter proxies work well; switch to residential only if you see many retries in the log.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}