{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Post Scraper: Details by URL, No Login",
    "description": "Scrape Instagram post details from up to 2,000 post, reel or carousel links, codes or ids, no login. Each row: caption, like and comment count, date, owner, every carousel item, media links, collaborators, place, paid partnership label, sponsors, first 15 comments. JSON, CSV or API; pay per post.",
    "version": "0.1",
    "x-build-id": "24zekBhIh4Purs6xl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~instagram-post-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-instagram-post-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/automation_craft~instagram-post-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-instagram-post-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/automation_craft~instagram-post-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-instagram-post-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": {
          "postUrls": {
            "title": "Post links, codes or ids",
            "type": "array",
            "description": "Instagram post, reel, carousel or video links (instagram.com/p/<code>/, /reel/, /reels/, /tv/, also with the owner's name in front, share links /share/..., instagr.am and m.instagram.com links, tracking parameters ignored), bare post codes (2010 posts have 4 letter codes), or numeric post ids (digits only, also as <post id>_<owner id>). One full row per post, in your order. Up to 2,000 a run; each post once per run.",
            "items": {
              "type": "string"
            }
          },
          "postUrl": {
            "title": "One post link, code or id",
            "type": "string",
            "description": "A single post, as an alternative to the list: any link, code or id the list takes. Read before the list; a post named in both is read once."
          },
          "maxPosts": {
            "title": "Most posts to deliver",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop after this many posts were delivered (1 to 2,000); the entries not read get one free skipped row. Leave empty for every entry."
          },
          "postedSince": {
            "title": "Published since",
            "type": "string",
            "description": "Deliver posts published on or after this day (YYYY-MM-DD, from 00:00 UTC) or within the last N days or hours (\"30 days\", \"24 hours\", counted back from the run's start)."
          },
          "postedUntil": {
            "title": "Published until",
            "type": "string",
            "description": "Deliver posts published on or before this day (YYYY-MM-DD, up to 23:59:59 UTC)."
          },
          "postTypes": {
            "title": "Post types",
            "type": "array",
            "description": "Deliver only these kinds of post: photo, carousel, reel, video (a feed video that is not a reel) or igtv. Empty = every kind.",
            "items": {
              "type": "string",
              "enum": [
                "photo",
                "carousel",
                "reel",
                "video",
                "igtv"
              ],
              "enumTitles": [
                "Photo",
                "Carousel",
                "Reel",
                "Video (feed)",
                "IGTV video"
              ]
            }
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Deliver only posts with at least this many likes. A post whose owner hid its likes is left out."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Deliver only posts with at least this many comments."
          },
          "minPlays": {
            "title": "Minimum plays",
            "minimum": 0,
            "type": "integer",
            "description": "Deliver only reels with at least this many plays. Needs includePlayCount; a post without a play count (not a reel, or not found by the lookup) is left out."
          },
          "mustContain": {
            "title": "Must contain",
            "type": "array",
            "description": "Deliver only posts where one of these words or phrases (up to 50, case ignored) is in the caption, a hashtag, the place, the owner's username or name, a collaborator's or sponsor's username, or the music's title or artist.",
            "items": {
              "type": "string"
            }
          },
          "onlyWithLocation": {
            "title": "Only posts with a place",
            "type": "boolean",
            "description": "Deliver only posts tagged with a place (location).",
            "default": false
          },
          "collabPosts": {
            "title": "Collab posts",
            "enum": [
              "include",
              "exclude",
              "only"
            ],
            "type": "string",
            "description": "Posts with collaborators (posted with one or more co-authors): include them (default), leave them out, or deliver only them.",
            "default": "include"
          },
          "maxCommentsPerPost": {
            "title": "Comments per post",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "How many of each post's comments to deliver on its row (0 to 10,000; default 15): text, time and likes (the author with includePersonalData). The first 15 come with the post at no extra charge; each comment past 15 is a Comment event. Comments past the first page stop (commentsStatus allowance) when the add-on's unpaid work allowance is spent. 0 = no comments.",
            "default": 15
          },
          "includeOwnerDetails": {
            "title": "Owner details (add-on)",
            "type": "boolean",
            "description": "Adds each post owner's profile to their rows (ownerDetails): followers, following, post count, full name, category, account type, verified, bio and links. Charged once per owner per run as an Owner profile event; left off (ownerDetailsStatus allowance) when the add-on's work allowance is spent. Links naming an Instagram, Facebook, Messenger, Threads or WhatsApp profile are left out unless includePersonalData is on.",
            "default": false
          },
          "includePlayCount": {
            "title": "Reel play counts (add-on)",
            "type": "boolean",
            "description": "Adds each reel's play count (playCount), which Instagram does not serve on a post's own page to a visitor who is not logged in: read from the reel's own sound page when the reel made that original sound, else from the owner's Reels tab, newest first, down to the reel's date (see maxOwnerPagesPerLink). A Play count event per reel whose lookup ran to its end; photos, carousels and other videos are free (playCountStatus not_a_reel).",
            "default": false
          },
          "maxOwnerPagesPerLink": {
            "title": "Owner pages read for a play count",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For a reel's play count and for the grid check: at most this many pages of the owner's Reels tab or grid are read, 12 posts a page, newest first (1 to 100, default 10: the owner's 120 newest), shared by every post of one owner in a run. An older post says not_in_recent_reels (play count) or null (grid check)."
          },
          "checkProfileGrid": {
            "title": "Grid check",
            "type": "boolean",
            "description": "Marks whether each post shows on its owner's profile grid (isOnProfileGrid true or false; null when the grid could not be read far enough): the owner's grid is read newest first down to the post's date, within maxOwnerPagesPerLink pages. No extra charge.",
            "default": false
          },
          "downloadVideos": {
            "title": "Video files (add-on)",
            "type": "boolean",
            "description": "Stores each delivered post's video file (MP4 as Instagram serves it; photos and carousels say no_video) in the run's key-value store and puts its link on the row (videoFile). Charged per started MB of the stored file as a Video megabyte event (1 MB = 1,000,000 bytes). A file is left off its row (videoFileStatus allowance) when the add-on's work allowance is spent. Instagram's own links are free on the rows: videoUrl expires about a day and a half after the run, imageUrl about four days.",
            "default": false
          },
          "maxVideoSizeMb": {
            "title": "Largest video file (MB)",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "A video file larger than this is not stored (its row says too_large and nothing is charged for it). 1 to 25, default 25."
          },
          "includeViewCount": {
            "title": "Embed view count",
            "type": "boolean",
            "description": "Adds the view counter of each video post's embed page (videoViewCount), a counter apart from a reel's play count. One more page read per video post, no extra charge. Older feed videos also carry Instagram's own view count (viewCount) on their rows (13 of 17 measured).",
            "default": false
          },
          "compactRows": {
            "title": "Compact rows",
            "type": "boolean",
            "description": "Delivers a compact row: the post's code, link, type, owner, caption, hashtags, likes, comments, views, plays, date, length, paid partnership, image and video links, carousel size, and the add-ons asked for.",
            "default": false
          },
          "includeRawData": {
            "title": "Raw Instagram answer",
            "type": "boolean",
            "description": "Adds Instagram's own answer for each post (raw), as served. Needs includePersonalData, since the answer names the people tagged in a post.",
            "default": false
          },
          "includePersonalData": {
            "title": "Include personal data",
            "type": "boolean",
            "description": "Off by default. When on, rows also carry taggedUsers (accounts tagged in a post and its carousel items), mentions (accounts a caption mentions), comment authors (ownerUsername, ownerId, ownerIsVerified), the website and bio links of owner details naming Instagram, Facebook, Messenger, Threads or WhatsApp profiles, and the raw answer if asked. Captions and comment texts are always delivered as served. You are responsible for a lawful use of personal data, GDPR included.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel reads",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many posts are read at the same time (1 to 4, default 4). Lower it to go slower."
          },
          "maxRunSeconds": {
            "title": "Time limit (seconds)",
            "minimum": 30,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop after this many seconds (30 to 86,400), with free rows for what was not read. Leave empty to run until done or until the Apify run timeout."
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "How long one request may take (5 to 60). Default 30."
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How often a failed request is tried again (0 to 5, default 2); through a proxy each try takes a fresh exit."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Default: Apify Proxy without a group or country, which reads from the run's own address first and moves a request type to Apify's datacenter proxy after two refusals in a row there. Choose a group or a country to read only through Apify Proxy, or give your own proxy links. A residential group is read through the datacenter pool instead (no extra cost).",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}