{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper API - Profiles, Posts and Reels",
    "description": "Instagram scraper for profiles, posts and reels. A username gives the profile row plus the posts on its grid; a post or reel link gives that one item. Rows have the caption, likes, comments, views, media links, tagged users and timestamp. $0.45 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "jSwBwdFmORHWnDlW9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-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/dami_studio~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-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/dami_studio~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-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": "Profile usernames",
            "type": "array",
            "description": "Instagram usernames, with or without @. Each one returns a profile row plus the media on that account's public profile grid, in the grid's own order: pinned tiles first, then newest first.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (profiles or posts)",
            "type": "array",
            "description": "Paste Instagram URLs directly. A profile URL returns that account's public grid; a post or reel URL returns that one item, whether or not it is on the grid. That includes links with the account name in front (instagram.com/name/p/...) and the instagram.com/share/ links the app's Share button copies.",
            "items": {
              "type": "string"
            }
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Keep posts and reels published on or after this date. Pick a day in the calendar, or switch to a relative window such as 7 days or 2 weeks, which suits a scheduled run. Days are counted in UTC. Pinned tiles have to meet the date too. Leave it empty for no date limit."
          },
          "skipPinnedPosts": {
            "title": "Skip pinned posts",
            "type": "boolean",
            "description": "Drop the posts an account pinned to the top of its grid, up to three of them. Off by default; every media row carries isPinned either way. Reels pinned to the reels tab are a separate set and are not counted here, they come back at their own date."
          },
          "includeReelsTabOnly": {
            "title": "Also include reels that are not on the grid",
            "type": "boolean",
            "description": "Off by default, so a profile run returns what the profile grid shows. Turn it on to also get media that only the reels tab lists, such as trial reels and reels an account keeps off its grid."
          },
          "postTypes": {
            "title": "Only this kind of post",
            "enum": [
              "all",
              "reels",
              "photos",
              "carousels"
            ],
            "type": "string",
            "description": "Keep only reels, only photos or only carousels. Posts of another kind are left out and not charged. Applies to posts read from profiles, tagged posts, places, hashtags and search words; a post link you paste always comes back. Leave it on All for every kind."
          },
          "resultsLimit": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum rows across the run, including the profile row. The limit is applied after the grid is filtered and ordered, so pinned tiles use result slots unless Skip pinned posts is on.",
            "default": 50
          },
          "resultsPerProfile": {
            "title": "Max posts per profile",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Optional. The most posts to return for each profile, and for each tagged account, place, hashtag or search word. 0 returns only the profile row (or the place row) and reads no posts. Max results above still caps the whole run. Leave it empty for no cap per profile."
          },
          "mentionsOf": {
            "title": "Posts that tag these accounts",
            "type": "array",
            "description": "Account names or profile links. Returns public posts by other people that tag or mention each account, the posts its Tagged tab shows. Each post is one result. Their publish time is worked out from the post id, so it can be a few minutes off (timestampIsApproximate says so).",
            "items": {
              "type": "string"
            }
          },
          "places": {
            "title": "Places",
            "type": "array",
            "description": "Instagram place links (instagram.com/explore/locations/...) or place ids. Each returns one place row: name, category, address, coordinates, post count, the opening status and the phone the place lists, where Instagram's page shows them. With a paid Apify plan the run then adds recent posts tagged at the place, when the page lists any. Each row and each post is one result.",
            "items": {
              "type": "string"
            }
          },
          "storiesOf": {
            "title": "Stories of these accounts",
            "type": "array",
            "description": "Account names. Returns the stories each account has up right now, one result per story. The run first checks the account's own page, and an account with no story up gets a free row instead. Needs a paid Apify plan.",
            "items": {
              "type": "string"
            }
          },
          "commentsAsRows": {
            "title": "Comments under each post link",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Optional. For each post or reel link you paste, also return up to this many of its comments, each as its own row and its own result, in Instagram's own order. Posts with no comments are skipped. Needs a paid Apify plan. Leave it empty or at 0 for none."
          },
          "posterCountsOnLinks": {
            "title": "Poster counts on post links",
            "type": "boolean",
            "description": "Profile runs always fill ownerFollowersCount, ownerFollowsCount and ownerPostsCount from the profile row. Turn this on to fill them on post links too: the run reads each poster's profile once more, which makes a link run slower. No extra charge."
          },
          "includeFacebookCounts": {
            "title": "Add-on: Facebook plays and likes",
            "type": "boolean",
            "description": "Optional add-on, off by default. Adds Instagram plays, Facebook plays and Facebook likes for posts also shared to Facebook. It starts on 9 November 2026, at $4.94 per 1,000 posts checked on Starter and a little less on Scale and Business; before that day the run says so in a free row and adds nothing. Needs a paid Apify plan."
          },
          "includeAudioLink": {
            "title": "Add-on: link to the post's sound",
            "type": "boolean",
            "description": "Optional add-on, off by default. Adds audioUrl, the link Instagram serves for a reel's or video's sound. It is a link only; the run never downloads or keeps the file. It starts on 9 November 2026, at $4.94 per 1,000 posts checked on Starter and a little less on Scale and Business; before that day the run says so in a free row and adds nothing. Needs a paid Apify plan."
          },
          "commentsPerPost": {
            "title": "Add-on: comments on each post",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Optional add-on. Adds up to this many of each post's comments, in Instagram's own order, as topComments on the post row. Posts with only a few comments are skipped. It starts on 9 November 2026, at $0.396 per 1,000 comments on Starter and a little less on Scale and Business; before that day the run says so in a free row and adds nothing. Needs a paid Apify plan. Leave it empty for none."
          },
          "notionConnector": {
            "title": "Notion connector ID (optional)",
            "type": "string",
            "description": "Optional. Deliver the results to your connected Notion via Apify MCP connectors, no extra code."
          },
          "notionParentId": {
            "title": "Notion data-source ID (optional)",
            "type": "string",
            "description": "Optional Notion database/data-source id to create the pages in."
          },
          "sessionCookies": {
            "title": "Account cookies (not needed)",
            "type": "array",
            "description": "Optional: your own session, used only for your run. You are responsible for using it within the site's terms. Runs work without it."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Leave this alone unless you need the run to go out through a particular network. Your own proxy servers are used exactly as given."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}