{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Posts Scraper Pro",
    "description": "Scrape public Instagram posts, reels, and carousel posts from usernames, profile URLs, and post URLs with optional cookies, explicit diagnostics, and simple per-post pricing. Unofficial actor, not affiliated with Instagram or Meta.",
    "version": "0.1",
    "x-build-id": "LqMjCwUjBc0qYkyN1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/netdesignr~instagram-posts-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-netdesignr-instagram-posts-scraper-pro",
        "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/netdesignr~instagram-posts-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-netdesignr-instagram-posts-scraper-pro",
        "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/netdesignr~instagram-posts-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-netdesignr-instagram-posts-scraper-pro",
        "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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Instagram usernames, profile URLs, post URLs, or reel URLs to scrape. Usernames such as natgeo also work here.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerProfile": {
            "title": "Max posts per profile",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of posts, reels, or carousel posts to emit for each profile target. Direct post URLs always emit at most one item.",
            "default": 3
          },
          "skipPinnedPosts": {
            "title": "Skip pinned posts",
            "type": "boolean",
            "description": "When enabled, pinned posts are excluded before date filtering so old pinned posts do not leak into a 'recent posts only' run.",
            "default": false
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Keep only posts published on or after this value. Accepts ISO dates like 2026-03-01 or relative values like 7 days, 2 weeks, or 1 month."
          },
          "extractionMode": {
            "title": "Extraction mode",
            "enum": [
              "fast",
              "balanced",
              "full"
            ],
            "type": "string",
            "description": "Fast stays HTTP-only for lower cost, balanced adds browser fallback when Instagram degrades, and full keeps the same fallback while encouraging richer detail runs.",
            "default": "fast"
          },
          "includeRecentComments": {
            "title": "Include recent comments preview",
            "type": "boolean",
            "description": "Include the small preview of recent comments when Instagram exposes them in the source response.",
            "default": false
          },
          "recentCommentsLimit": {
            "title": "Recent comments limit",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum preview comments to keep per post when comment previews are available.",
            "default": 1
          },
          "includeProfileDetails": {
            "title": "Include profile details snapshot",
            "type": "boolean",
            "description": "Attach a profile snapshot object with biography, follower counts, and profile metadata to each emitted post.",
            "default": false
          },
          "sessionCookieHeader": {
            "title": "Session cookie header",
            "type": "string",
            "description": "Optional raw Cookie header copied from a logged-in browser session. Helps on login walls or degraded public surfaces. Example: sessionid=...; csrftoken=...;"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy configuration supplied by the user. No proxy is used by default, and the Actor never enables residential proxies automatically."
          },
          "residentialProxyFallbackMode": {
            "title": "Residential proxy fallback",
            "enum": [
              "off"
            ],
            "type": "string",
            "description": "Automatic residential proxy fallback is disabled for cost control. Existing saved tasks that send Retry are treated as Off.",
            "default": "off"
          },
          "emptyRunPolicy": {
            "title": "Empty run policy",
            "enum": [
              "retry_then_fail",
              "retry_then_succeed",
              "retry_then_warn"
            ],
            "type": "string",
            "description": "How the actor should exit when targets were reachable but no posts were emitted after retry. Runs where every target fails still exit with a failure code.",
            "default": "retry_then_warn"
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Include extra runtime warnings and low-level diagnostics for troubleshooting harder targets.",
            "default": false
          },
          "username": {
            "title": "Legacy username input",
            "type": "array",
            "description": "Compatibility field for users migrating from the official actor. Prefer Start URLs for new runs.",
            "items": {
              "type": "string"
            }
          },
          "resultsLimit": {
            "title": "Legacy results limit",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Compatibility alias for maxPostsPerProfile."
          },
          "dataDetailLevel": {
            "title": "Legacy data detail level",
            "enum": [
              "basicData",
              "detailedData"
            ],
            "type": "string",
            "description": "Compatibility alias for extraction mode. basicData maps to fast and detailedData maps to balanced."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}