{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper — Posts, Reels, Hashtags, Locations & Audio",
    "description": "Scrape Instagram posts and reels from profiles, reels tabs, hashtags, keywords, locations, audio pages and post URLs. Likes, comments, plays, captions, media URLs, owner, co-authors, tagged users, location and music — no login, no cookies.",
    "version": "0.2",
    "x-build-id": "jm4ykCNo8BC8ihnEO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yugenox~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yugenox-instagram-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/yugenox~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yugenox-instagram-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/yugenox~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yugenox-instagram-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",
        "properties": {
          "startUrls": {
            "title": "🔗 Instagram URLs",
            "type": "array",
            "description": "Profiles (https://www.instagram.com/nasa/), reels tabs (/nasa/reels/), hashtags (/explore/tags/travel/), locations (/explore/locations/213131048/), audio (/reels/audio/<id>/), keyword search (/explore/search/keyword/?q=toronto), posts and reels (/p/<code>/), and /share/ links. Bare handles (nasa), #hashtags and numeric user IDs work too.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "🔍 Keywords",
            "type": "array",
            "description": "Search posts by keyword. Each keyword runs its own search.",
            "items": {
              "type": "string"
            }
          },
          "resultsType": {
            "title": "📦 What to scrape",
            "enum": [
              "posts",
              "details",
              "comments"
            ],
            "type": "string",
            "description": "Posts: posts and reels from each source. Details: one row per profile (bio, followers, category, business type, contacts, related accounts), hashtag/keyword (topic description, related keywords) or location. Comments: the comments of each post found (or of the post URLs you give).",
            "default": "posts"
          },
          "maxItems": {
            "title": "🔢 Max posts",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of posts across the whole run. Leave empty for no limit."
          },
          "maxItemsPerQuery": {
            "title": "🔢 Max items per URL / keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Cap for each individual profile, hashtag, keyword, location or audio. Leave empty for no per-source limit."
          },
          "until": {
            "title": "📅 Only posts newer than",
            "type": "string",
            "description": "A date (YYYY-MM-DD) or a period like \"7 days\", \"2 weeks\", \"3 months\". On profiles, scraping stops as soon as older posts are reached."
          },
          "skipPinnedPosts": {
            "title": "📌 Skip pinned posts",
            "type": "boolean",
            "description": "Leave out posts pinned to the top of a profile (they are often old).",
            "default": false
          },
          "commentsPerPost": {
            "title": "💬 Latest comments per post",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Attach up to this many of the newest comments (text, author, likes, date) to each post as latestComments. 0 = none. Included in the price.",
            "default": 0
          },
          "maxComments": {
            "title": "💬 Max comments per post (comments mode)",
            "minimum": 1,
            "type": "integer",
            "description": "When What to scrape = Comments: how many comments to collect per post.",
            "default": 50
          },
          "includeTranscript": {
            "title": "🗣️ Video transcripts",
            "type": "boolean",
            "description": "Transcribe the speech in every video and reel (any language, up to 15 minutes). Billed per started minute of audio ($0.004/min). Reels set to a licensed song are skipped free.",
            "default": false
          },
          "includeAiSummary": {
            "title": "🤖 Instagram AI title & summary",
            "type": "boolean",
            "description": "Add Instagram's own AI-written title and summary of each post (aiTitle, aiSummary).",
            "default": false
          },
          "includeVideoViews": {
            "title": "👁️ Video view counts",
            "type": "boolean",
            "description": "Add video.viewCount (Instagram's \"views\" metric, which differs from plays). Adds one small request per video.",
            "default": false
          },
          "includeDetails": {
            "title": "👤 Add profile / hashtag / place rows",
            "type": "boolean",
            "description": "In Posts mode, also save one details row per profile, hashtag/keyword and location. Rows carry dataType \"profile\" / \"keyword\" / \"place\"; posts carry \"post\".",
            "default": false
          },
          "includeRelatedProfiles": {
            "title": "🧭 Related profiles",
            "type": "boolean",
            "description": "Add up to 50 similar accounts Instagram suggests (relatedProfiles) to each profile row.",
            "default": false
          },
          "scrapeRelatedProfiles": {
            "title": "🕸️ Also scrape N related profiles",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "For each profile you give, also scrape up to this many of its related accounts (one level deep). Great for finding similar creators or competitors.",
            "default": 0
          },
          "expandRelatedKeywords": {
            "title": "🔁 Expand hashtags/keywords",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Instagram shows about 60 top posts per hashtag or keyword. Set this to also pull posts from up to N related keywords, for many more results.",
            "default": 0
          },
          "minFollowers": {
            "title": "Min followers",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep posts / profiles whose owner has at least this many followers."
          },
          "maxFollowers": {
            "title": "Max followers",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep posts / profiles whose owner has at most this many followers."
          },
          "verifiedOnly": {
            "title": "Verified accounts only",
            "type": "boolean",
            "description": "Only keep posts / profiles from verified accounts.",
            "default": false
          },
          "businessOnly": {
            "title": "Business & creator accounts only",
            "type": "boolean",
            "description": "Profile rows only: keep business and creator accounts.",
            "default": false
          },
          "withContactOnly": {
            "title": "Only profiles with contact info",
            "type": "boolean",
            "description": "Profile rows only: keep profiles that list an email or phone number in their bio.",
            "default": false
          },
          "customMapFunction": {
            "title": "🧩 Custom map function",
            "type": "string",
            "description": "Optional JavaScript function that transforms each post, e.g. (item) => ({ ...item, username: item.owner?.username }). For transformation only, not filtering. If the function is unusable, it is ignored with a warning and original posts are saved."
          },
          "maxConcurrency": {
            "title": "⚡ Parallel requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many requests run in parallel. Higher is faster.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Apify datacenter proxy works well and is the default. Blocked IPs are rotated automatically, with a residential fallback.",
            "default": {
              "useApifyProxy": true
            }
          },
          "getStories": {
            "title": "📖 Get stories",
            "type": "boolean",
            "description": "Stories are only visible to logged-in Instagram accounts, so they are not available in this scraper. Accepted for input compatibility; no charge.",
            "default": false
          },
          "handles": {
            "title": "Story handles",
            "type": "array",
            "description": "Accepted for input compatibility (see Get stories).",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "User IDs",
            "type": "array",
            "description": "Numeric Instagram user IDs to scrape as profiles. (Also the stories input, which is not available.)",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}