{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Post Link Scraper",
    "description": "Paste any Instagram reel or post link and get views, plays, likes, comments, caption, hashtags, mentions, music, video URL, and owner data — clean JSON for analysts, dashboards, and AI agents.",
    "version": "1.6",
    "x-build-id": "LzcDgn7UxYaTbBwwq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/social_developer~instagram-post-link-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-social_developer-instagram-post-link-scraper",
        "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/social_developer~instagram-post-link-scraper/runs": {
      "post": {
        "operationId": "runs-sync-social_developer-instagram-post-link-scraper",
        "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/social_developer~instagram-post-link-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-social_developer-instagram-post-link-scraper",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🎬 Instagram reel / post links",
            "type": "array",
            "description": "REQUIRED. Public Instagram reel or post URLs only ( /reel/ /reels/ /p/ ).",
            "default": [
              "https://www.instagram.com/reel/DbDp7T4olyC/"
            ],
            "items": {
              "type": "string"
            }
          },
          "autoScaleWorkers": {
            "title": "🧠 Auto-scale workers from batch size",
            "type": "boolean",
            "description": "ON (recommended): workers = ceil(urls / linksPerWorker), capped by maxWorkers. Example: 1000 links ÷ 20 = 50 workers, each with 1 sticky proxy.",
            "default": true
          },
          "linksPerWorker": {
            "title": "📦 Target links per worker / proxy",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many links each worker+proxy should own. Default 20 → ~50 workers for 1000 links. Set 200 for fewer workers with heavier per-proxy load.",
            "default": 20
          },
          "maxWorkers": {
            "title": "⚡ Max workers (proxy pool cap)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Hard cap on parallel workers. Default 50. Each worker gets its own sticky Apify proxy session.",
            "default": 50
          },
          "minWorkers": {
            "title": "Min workers",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Floor for auto-scaling (small batches still get at least this many workers when possible).",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Manual worker count (only if auto-scale OFF)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Legacy override. Ignored when autoScaleWorkers is ON (still raises the maxWorkers ceiling if higher).",
            "default": 50
          },
          "fastMode": {
            "title": "🚀 Fast mode (author clips cache)",
            "type": "boolean",
            "description": "Recommended ON. Pre-resolves oEmbed, groups reels by author, and caches clips pages so repeated pages are fetched once.",
            "default": true
          },
          "requestTimeout": {
            "title": "⏳ Request timeout (seconds)",
            "minimum": 4,
            "maximum": 30,
            "type": "number",
            "description": "HTTP timeout per Instagram API call. Default 8s.",
            "default": 8
          },
          "requestDelay": {
            "title": "⏱️ Request delay (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Default 0 for maximum speed. Only raise (0.2–0.5) if you hit rate limits.",
            "default": 0
          },
          "continueOnError": {
            "title": "✅ Keep going if one link fails",
            "type": "boolean",
            "description": "Recommended ON. Failed URLs become error rows; successful metrics still return.",
            "default": true
          },
          "sessionid": {
            "title": "🔐 Instagram sessionid (optional — FASTEST path)",
            "type": "string",
            "description": "Optional. With sessionid, each reel is 1 API call (much faster). Without it, public oEmbed+clips path is used."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy (1 sticky session per worker)",
            "type": "object",
            "description": "Apify Proxy ON by default. Each worker gets its own sticky proxy session and only scrapes its shard of links.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}