{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Posts Scraper API - Posts, Reels, Exact Counts",
    "description": "Used by social analysts, agencies and creator-tracking pipelines monitoring accounts at scale. Instagram posts scraper for posts, reels and carousels from any public profile: exact like, comment and play counts, captions, every media URL. No login, no cookies. Change-only re-runs; failures free.",
    "version": "1.0",
    "x-build-id": "7YZEk1TfBTQb2LZvr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vonsensey~instagram-posts-scraper-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vonsensey-instagram-posts-scraper-api",
        "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/vonsensey~instagram-posts-scraper-api/runs": {
      "post": {
        "operationId": "runs-sync-vonsensey-instagram-posts-scraper-api",
        "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/vonsensey~instagram-posts-scraper-api/run-sync": {
      "post": {
        "operationId": "run-sync-vonsensey-instagram-posts-scraper-api",
        "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": "Usernames or profile URLs — 'nasa', '@nasa' and 'https://www.instagram.com/nasa/' all work, one per line. Each profile's public feed is read newest first: posts, reels and carousels with exact like, comment and play counts. A profile that does not exist, is private or has no posts returns a free row saying which, never a charge.",
            "items": {
              "type": "string"
            }
          },
          "contentType": {
            "title": "What to deliver",
            "enum": [
              "all",
              "posts",
              "reels"
            ],
            "type": "string",
            "description": "Everything in the feed, only image and carousel posts, or only reels and videos. Skipped items are never billed.",
            "default": "all"
          },
          "maxPostsPerProfile": {
            "title": "Newest posts per profile",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many of each profile's newest posts to deliver, up to 12: Instagram shows a visitor who is not signed in only a profile's newest 12 posts (or 12 reels), and this Actor never signs in. Asking for more is fine; the coverage row says when a profile had more.",
            "default": 12
          },
          "sinceDays": {
            "title": "Only posts from the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Stop reading a profile once its posts are older than this many days. Combine with a schedule and Monitor to receive only what is new. Leave empty for no date limit."
          },
          "since": {
            "title": "Only posts on or after this date",
            "type": "string",
            "description": "An ISO date such as 2026-08-01. Ignored when 'last N days' is set."
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on billable rows for this run, across all profiles. Feed checks never count against it.",
            "default": 100
          },
          "includeMediaUrls": {
            "title": "Include image and video file URLs",
            "type": "boolean",
            "description": "Direct CDN URLs for every image, carousel child and reel MP4, with dimensions. They are signed by Instagram and expire after a few hours, so download what you need from the run rather than storing the links.",
            "default": true
          },
          "monitorChangesOnly": {
            "title": "Monitor: remember what was delivered",
            "type": "boolean",
            "description": "For scheduled runs. The Actor remembers every post it has delivered, per profile. 'New posts only' below decides what happens to a post you already received. Each profile read is billed as one feed check.",
            "default": false
          },
          "newPostsOnly": {
            "title": "Monitor: new posts only",
            "type": "boolean",
            "description": "Works with Monitor on. On: a post you already received is not read, delivered or billed again, even when its counts, caption or pin change; only new posts are delivered and billed. Off: a post whose counts, caption or pin changed is delivered and billed again, marked 'updated', and one that did not change comes back as a free row marked 'unchanged'.",
            "default": true
          },
          "monthlyPass": {
            "title": "Monthly pass (30 days, no per-row charges)",
            "type": "boolean",
            "description": "Charge one monthly pass instead of paying per post. Charged once, right before the first post, reel or feed check would be billed (a private or empty profile buys none), and only again after 30 days if you run with this on; a run whose spending limit cannot cover it bills per unit instead. While it is active, every run you start with this on delivers rows and feed checks without per-row charges, up to the pass's monthly volume: about 100 runs of one feed page for each dollar the pass costs, fewer with more pages a run or through residential exits. Past it, rows and feed checks bill at the normal price and one free row says so. Worth it once a month of per-post, per-reel and feed-check charges would pass the price of the pass.",
            "default": false
          },
          "maxCostUsd": {
            "title": "Cost ceiling (USD)",
            "minimum": 0.01,
            "type": "number",
            "description": "Stop the run before it spends more than this. Leave empty for no ceiling. The free summary row always reports what the run actually spent."
          },
          "useProxy": {
            "title": "Force proxy",
            "type": "boolean",
            "description": "Not normally needed — everything is handled for you and the Actor escalates automatically if Instagram refuses a request. Turn it on only if you have been asked to.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}