{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Posts Scraper - Reels, Video URLs, Engagement",
    "description": "Reads the latest posts and reels of public Instagram profiles or post URLs, no login. Caption, exact likes and comments, views and plays, video URLs, carousel slides, location when tagged, owner followers and bio, up to 54 fields on paid plans. About 12 posts plus 12 reels per profile.",
    "version": "1.0",
    "x-build-id": "6oDsRL2DSoDdfXY6f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~instagram-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-instagram-posts-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/parseforge~instagram-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-instagram-posts-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/parseforge~instagram-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-instagram-posts-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 or Usernames",
            "type": "array",
            "description": "Usernames, profile URLs, post/reel URLs, hashtags (#cats or explore/tags URL), location URLs (explore/locations/ID) and, with a sessionid, tagged URLs (instagram.com/USER/tagged/).\n- Usernames: nike, @cristiano\n- Profile URLs: https://instagram.com/nike\n- Post URLs: https://instagram.com/p/ABC123, https://instagram.com/reel/XYZ789\n- Hashtag: #cats or https://www.instagram.com/explore/tags/cats/\n- Location: https://www.instagram.com/explore/locations/213385402/",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "#️⃣ Hashtags",
            "type": "array",
            "description": "Hashtags to read, with or without #. Without a login Instagram shows the 12 most popular reels of a tag (with views and video URL); it hides the rest.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "📍 Locations",
            "type": "array",
            "description": "Instagram location ids or explore/locations URLs. Without a login Instagram shows the 12 top posts of a place.",
            "items": {
              "type": "string"
            }
          },
          "taggedProfiles": {
            "title": "🏷️ Tagged posts of profiles",
            "type": "array",
            "description": "Usernames whose 'tagged' tab to read (posts where they are tagged). Instagram only shows this to logged-in accounts, so it needs the optional sessionid below.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "📊 Max Items Per Profile",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum posts to extract per profile/user. Free users: limited to 10 per profile. Paid users: any number; the scraper pages through the profile (12 to 50 posts per request) until it has that many, or the profile has no more posts. Leave empty to read the whole profile (paid users only). Cost and run time grow with the number of posts."
          },
          "maxItemsTotal": {
            "title": "🎯 Max Items Total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum total posts to extract across all profiles (optional). Free users: limited to 10 total. Paid users: optional. If set, the scraper stops once this limit is reached. If both maxItems and maxItemsTotal are set, both limits are respected."
          },
          "dateFilter": {
            "title": "📅 Date Filter",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Limit how far back to the history the scraper should go. The date should be in YYYY-MM-DD or full ISO absolute format (e.g., 2024-01-15 or 2024-01-15T00:00:00Z) or in relative format (e.g., 1 days, 2 months, 3 years). All time values are taken in UTC timezone."
          },
          "endDate": {
            "title": "📅 End date",
            "type": "string",
            "description": "Newest post to keep: YYYY-MM-DD (that whole day included), full ISO date-time, or relative (1 days, 2 weeks). Pair it with Date Filter (oldest post) to get a window."
          },
          "mediaTypeFilter": {
            "title": "📂 Media Type Filter",
            "enum": [
              "all",
              "image",
              "video",
              "reel",
              "carousel"
            ],
            "type": "string",
            "description": "Filter posts by content type. Use 'reel' to get only Reels, 'image' for photos only, 'carousel' for multi-image posts, or 'video' for all video content.",
            "default": "all"
          },
          "skipPinned": {
            "title": "📌 Skip pinned posts",
            "type": "boolean",
            "description": "Leave out posts pinned to the top of a profile, so the rows are the real latest posts.",
            "default": false
          },
          "includeComments": {
            "title": "💬 Include comments",
            "type": "boolean",
            "description": "Add the top comments Instagram shows on each post page (about 12 to 15, with author, text, likes and reply count) to every row. Costs one extra page request per post, so runs are slower.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "💬 Max comments per post",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Comments to keep per post when comments are on (1 to 50, default 10). Instagram shows about 12 to 15 without a login.",
            "default": 10
          },
          "sessionid": {
            "title": "🔐 Instagram sessionid (optional, advanced)",
            "type": "string",
            "description": "OPTIONAL. Leave empty for the normal logged-out run, which already reads a profile page by page. Only needed for the posts where a profile is tagged (Tagged Profiles). Paste the value of the 'sessionid' cookie of an Instagram account. Use a throwaway or secondary account, never your main one: Instagram may restrict or ban an account used for automation, and that risk is yours. To find it: log in to instagram.com in a browser, open Developer Tools (F12), Application (Chrome) or Storage (Firefox), Cookies, https://www.instagram.com, and copy the Value of 'sessionid'. The value is a secret input: it is only sent to instagram.com through one residential proxy IP for this run, and is never stored, logged or written to the dataset. The run stops at once if Instagram rejects the session or asks for a security check. Free plan limits still apply."
          },
          "proxyConfiguration": {
            "title": "⚙️ Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. If left out of the input, the actor uses Apify residential proxies (US), because Instagram throttles other IPs. Choose 'No proxy' (useApifyProxy false) only to opt out.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}