{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Posts Scraper API - Posts, Reels, Exact Counts",
    "description": "Instagram posts, reels and carousels from any public profile in one typed dataset: exact like, comment and play counts, full captions with hashtags and mentions, every image and MP4 URL with dimensions, location, co-authors. No login, no cookies. Change-only re-runs for schedules. Failures are free.",
    "version": "1.0",
    "x-build-id": "J3fqEdiceRS4YPYUa"
  },
  "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. Instagram serves the feed 12 at a time; 24 means two pages per profile.",
            "default": 24
          },
          "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: only bill what changed",
            "type": "boolean",
            "description": "For scheduled runs. The Actor remembers every post it has delivered and the counts it saw; a post whose numbers did not move is delivered as a free row marked 'unchanged', and only new or changed posts are billed. Each profile read is billed as one feed check.",
            "default": false
          },
          "monthlyPass": {
            "title": "Monthly pass (30 days, no per-row charges)",
            "type": "boolean",
            "description": "Charge one monthly pass instead of paying per post. Charged once, after the run has read at least one profile, and only again after 30 days if you run with this on. While it is active every run you start with this on delivers rows and feed checks without per-row charges. Worth it above roughly 5,000 posts or 3,000 profile checks a month.",
            "default": false
          },
          "maxCostUsd": {
            "title": "Cost ceiling (USD)",
            "minimum": 0,
            "type": "integer",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}