{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Post Scraper Ultra",
    "description": "Scrape public Instagram posts, reels, carousels, captions, media URLs, engagement metrics, owner details, hashtags, mentions, and optional enrichment from profiles or direct URLs.",
    "version": "1.0",
    "x-build-id": "bZ53kqxQJ6oEalxRb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/qaseemiqbal~instagram-post-scraper-ultra/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-qaseemiqbal-instagram-post-scraper-ultra",
        "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/qaseemiqbal~instagram-post-scraper-ultra/runs": {
      "post": {
        "operationId": "runs-sync-qaseemiqbal-instagram-post-scraper-ultra",
        "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/qaseemiqbal~instagram-post-scraper-ultra/run-sync": {
      "post": {
        "operationId": "run-sync-qaseemiqbal-instagram-post-scraper-ultra",
        "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 usernames, profiles, posts, or reels",
            "type": "array",
            "description": "Add Instagram usernames, profile URLs, post URLs, or reel URLs. You can mix supported input types in one run.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "resultsLimit": {
            "title": "Max results per profile",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of posts/reels/carousels to extract from each profile input. Direct post or reel URLs are fetched individually.",
            "default": 50
          },
          "maxTotalResults": {
            "title": "Max total results",
            "minimum": 0,
            "type": "integer",
            "description": "Optional global limit across the whole run. Use 0 for no additional global limit.",
            "default": 0
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Optional date filter. Accepts relative values like '1 day', '12 hours', '2 weeks', or absolute dates like '2026-01-31' or full ISO timestamps. Interpreted in UTC.",
            "default": ""
          },
          "onlyPostsOlderThan": {
            "title": "Only posts older than",
            "type": "string",
            "description": "Optional upper date bound. Accepts the same relative or absolute date formats as the newer-than filter.",
            "default": ""
          },
          "applyFiltersToDirectUrls": {
            "title": "Apply filters to direct post/reel URLs",
            "type": "boolean",
            "description": "If enabled, date and content-type filters are applied to direct post and reel URLs. If disabled, direct URLs are always processed when public.",
            "default": false
          },
          "pinnedPostHandling": {
            "title": "Pinned post handling",
            "enum": [
              "include",
              "skip",
              "date_filter",
              "separate"
            ],
            "type": "string",
            "description": "Choose how pinned posts are handled. Use date filtering when monitoring only new content.",
            "default": "include"
          },
          "includePosts": {
            "title": "Include feed posts",
            "type": "boolean",
            "description": "Include normal feed image/video posts.",
            "default": true
          },
          "includeReels": {
            "title": "Include reels",
            "type": "boolean",
            "description": "Include Instagram reels when publicly available.",
            "default": true
          },
          "includeCarousels": {
            "title": "Include carousel posts",
            "type": "boolean",
            "description": "Include sidecar/carousel posts with multiple media children.",
            "default": true
          },
          "deduplicate": {
            "title": "Deduplicate results",
            "type": "boolean",
            "description": "Avoid emitting duplicate posts when the same post appears in multiple inputs.",
            "default": true
          },
          "commentsMode": {
            "title": "Comments extraction mode",
            "enum": [
              "none",
              "preview",
              "limited",
              "handoff"
            ],
            "type": "string",
            "description": "Choose whether to collect no comments, a lightweight comments preview, a limited number of comments, or prepare handoff input for a dedicated comments scraper. Use 'none' for the lowest cost.",
            "default": "none"
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum comments to include per post in preview or limited mode. Keep at 0 for the lowest cost.",
            "default": 0
          },
          "includeCommentReplies": {
            "title": "Include comment replies",
            "type": "boolean",
            "description": "Include replies for preview/limited comments when available. This may increase runtime.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum replies to include per comment when comment replies are enabled.",
            "default": 0
          },
          "includeOwnerProfile": {
            "title": "Include post owner info",
            "type": "boolean",
            "description": "Include public owner fields available from the post payload.",
            "default": true
          },
          "includeTaggedUsers": {
            "title": "Include tagged users",
            "type": "boolean",
            "description": "Include users tagged in the post media when publicly available. Disabled by default to keep payloads smaller.",
            "default": false
          },
          "includeCoauthors": {
            "title": "Include coauthors",
            "type": "boolean",
            "description": "Include collaborators/coauthors when publicly available. Disabled by default to keep payloads smaller.",
            "default": false
          },
          "includeMusicInfo": {
            "title": "Include music/audio info",
            "type": "boolean",
            "description": "Include public music/audio metadata for reels or videos when available. Disabled by default to keep payloads smaller.",
            "default": false
          },
          "includeMediaUrls": {
            "title": "Include media URLs",
            "type": "boolean",
            "description": "Include image, video, thumbnail, and display URLs when available.",
            "default": true
          },
          "downloadMedia": {
            "title": "Download media to key-value store",
            "type": "boolean",
            "description": "Download selected media files to Apify key-value store. This can increase runtime, storage, and data transfer costs.",
            "default": false
          },
          "mediaDownloadTypes": {
            "title": "Media types to download",
            "type": "array",
            "description": "Media file types to download when media download is enabled.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "thumbnail"
              ]
            },
            "default": [
              "image"
            ]
          },
          "mediaKeyValueStoreName": {
            "title": "Media key-value store name",
            "type": "string",
            "description": "Optional named key-value store for downloaded media. Leave empty to use the run's default key-value store.",
            "default": ""
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "normalized",
              "apifyInstagramPostScraperCompatible"
            ],
            "type": "string",
            "description": "Choose normalized output for new integrations or compatibility mode for users migrating from older Instagram post scraper outputs.",
            "default": "normalized"
          },
          "flattenOutput": {
            "title": "Flatten output",
            "type": "boolean",
            "description": "Flatten selected nested fields into CSV-friendly top-level fields.",
            "default": false
          },
          "emitSkippedRecords": {
            "title": "Emit skipped records",
            "type": "boolean",
            "description": "If enabled, private, unavailable, or unsupported inputs are written to the dataset as records with scrape.status='skipped'. Otherwise they are only included in the run summary.",
            "default": false
          },
          "saveRunSummary": {
            "title": "Save run summary",
            "type": "boolean",
            "description": "Save a structured run summary to the key-value store under OUTPUT and RUN_SUMMARY.",
            "default": true
          },
          "includeDebugFields": {
            "title": "Include hidden debug fields",
            "type": "boolean",
            "description": "Include hidden top-level #debug fields in dataset records.",
            "default": false
          },
          "saveRawResponses": {
            "title": "Save raw responses",
            "type": "boolean",
            "description": "Advanced debugging option. Saves selected raw public responses to key-value store. Disabled by default.",
            "default": false
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose logging and additional diagnostics.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of concurrent HTTP crawling tasks. The low default keeps memory and CPU usage cheap.",
            "default": 2
          },
          "requestHandlerTimeoutSecs": {
            "title": "Request handler timeout",
            "minimum": 30,
            "maximum": 600,
            "type": "integer",
            "description": "Maximum time in seconds allowed for one request handler.",
            "default": 60
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum retry attempts for failed requests.",
            "default": 2
          },
          "minDelayMillis": {
            "title": "Minimum delay",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum randomized delay between related requests in milliseconds.",
            "default": 0
          },
          "maxDelayMillis": {
            "title": "Maximum delay",
            "minimum": 0,
            "maximum": 120000,
            "type": "integer",
            "description": "Maximum randomized delay between related requests in milliseconds.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Disabled by default for the lowest possible platform cost. Enable Apify Proxy only when reliability or geolocation requires it.",
            "default": {
              "useApifyProxy": false
            }
          },
          "callbackUrl": {
            "title": "Completion callback URL",
            "type": "string",
            "description": "Optional advanced callback URL called when the run finishes. Prefer Apify webhooks for most integrations.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}