{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Profile, Posts & Comments Scraper [No Cookies 🍪🚫]",
    "description": "Scrape Instagram profiles, posts, reels and comments in one run — no cookies, no login. Rich post objects (90+ fields: caption, media URLs, video/image versions, author, counts), full comment pagination with sort order, plus optional media download. $0.80/1k posts, $0.40/1k comments. JSON or CSV.",
    "version": "0.0",
    "x-build-id": "7BNUroYYXZF06vNm9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~apify-instagram-profile-scraper-ppe/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-apify-instagram-profile-scraper-ppe",
        "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/memo23~apify-instagram-profile-scraper-ppe/runs": {
      "post": {
        "operationId": "runs-sync-memo23-apify-instagram-profile-scraper-ppe",
        "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/memo23~apify-instagram-profile-scraper-ppe/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-apify-instagram-profile-scraper-ppe",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Instagram URLs",
            "type": "array",
            "description": "Profile, post, or reel URLs to scrape. Profile URL (`https://www.instagram.com/username/`) → profile + posts (+ comments). Direct post / reel URL (`.../p/{code}/` or `.../reel/{code}/`) → that post's full data + comments (or comments-only, see below).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max posts per profile",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of posts to scrape from each profile URL.",
            "default": 12
          },
          "includePosts": {
            "title": "Include posts",
            "type": "boolean",
            "description": "Scrape the profile's posts (rich post objects: caption, media URLs, counts, author, video/image versions). Off = profile info only.",
            "default": false
          },
          "downloadMediaUrls": {
            "title": "Download media files",
            "type": "boolean",
            "description": "Download each post's images/videos to the Key-Value Store (cookieless). Off = media URLs only.",
            "default": false
          },
          "extractAudio": {
            "title": "Extract audio (MP3)",
            "type": "boolean",
            "description": "For direct post/reel URLs: extract the audio track to an MP3 in the Key-Value Store (output field 'audioFile'). Cookieless. Skipped for silent videos.",
            "default": false
          },
          "monitoringMode": {
            "title": "Monitoring mode (only new posts)",
            "type": "boolean",
            "description": "Only scrape posts that are new compared to previous runs. Requires 'Include posts'.",
            "default": false
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Also scrape comments for each post (requires 'Include posts'). Fully cookieless — all top-level comments up to your limit, attached to each post in a 'comments' array.",
            "default": false
          },
          "maxComments": {
            "title": "Max comments per post",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of top-level comments to scrape per post.",
            "default": 100
          },
          "commentsSortOrder": {
            "title": "Comments sort order",
            "enum": [
              "popular",
              "recent"
            ],
            "type": "string",
            "description": "'Popular' = most-liked first (cookieless: ranks the fetched comments by like count). 'Recent' = newest first.",
            "default": "popular"
          },
          "commentsOnly": {
            "title": "Comments only (direct post/reel URLs)",
            "type": "boolean",
            "description": "Only applies to direct post/reel URLs. ON → output flat comment rows (one per comment), like a dedicated comment scraper. OFF (default) → the full post object with its comments attached. No effect on profile URLs.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "type": "integer",
            "description": "Maximum number of pages processed at the same time.",
            "default": 10
          },
          "minConcurrency": {
            "title": "Min concurrency",
            "type": "integer",
            "description": "Minimum number of pages processed at the same time.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "type": "integer",
            "description": "How many times to retry a failed request before giving up.",
            "default": 100
          },
          "storeName": {
            "title": "Key-Value Store name for downloaded media (optional)",
            "pattern": "^[a-z0-9-]+$",
            "type": "string",
            "description": "Custom name for the Key-Value Store holding downloaded media, so it persists beyond default retention and can be reused. Lowercase letters, digits, and hyphens only (e.g. 'my-store-1'). Leave blank to use the default store."
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy servers used to route requests. Residential is recommended for Instagram.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}