{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Posts Scraper",
    "description": "Scrape public Instagram posts, carousels and Reels from profiles or direct URLs. Extract captions, hashtags, mentions, likes, comment counts, Reel views, timestamps, media URLs, tagged users, collaborators, locations and owner details. Export clean JSON, CSV or Excel.",
    "version": "1.0",
    "x-build-id": "iLd3NgO4SasHl7dmZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~instagram-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-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/coregent~instagram-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-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/coregent~instagram-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-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",
            "maxItems": 1000,
            "type": "array",
            "description": "Profile URLs (https://www.instagram.com/natgeo/), post URLs (/p/{shortcode}/), Reel URLs (/reel/{shortcode}/), legacy TV URLs (/tv/{shortcode}/) or bare shortcodes. The input type is detected automatically; tracking parameters are ignored. Each post/Reel URL returns at most one result.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "profiles": {
            "title": "Usernames",
            "maxItems": 1000,
            "type": "array",
            "description": "Instagram usernames or @handles (natgeo, @nasa). Merged with the URLs above; duplicates are removed. Up to 1,000 inputs per run in total.",
            "items": {
              "type": "string"
            }
          },
          "resultsLimit": {
            "title": "Max posts per profile",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of posts returned for each profile input (newest first). Carousel slides don't count — one carousel is one result. Direct post/Reel URLs always return at most one result. Common values: 20, 100, 500, 1,000, 5,000.",
            "default": 100
          },
          "postsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Return only posts published after this point. An ISO date (2026-09-01, 2026-09-01T00:00:00Z) or a relative period (24 hours, 7 days, 2 weeks, 3 months). Pagination stops as soon as older posts are reached; old pinned posts at the top of a profile don't stop it early. Leave empty for no limit.",
            "default": ""
          },
          "postsOlderThan": {
            "title": "Only posts older than",
            "type": "string",
            "description": "Return only posts published before this point (same formats as above). Newer posts are paged through and skipped without charge, so a far-back date makes a run slower. Leave empty for no limit.",
            "default": ""
          },
          "mediaTypes": {
            "title": "Media types",
            "uniqueItems": true,
            "type": "array",
            "description": "Return only these types. Leave empty for all types. Filtered-out posts are not charged.",
            "items": {
              "type": "string",
              "enum": [
                "IMAGE",
                "VIDEO",
                "CAROUSEL",
                "REEL"
              ],
              "enumTitles": [
                "Image posts",
                "Video posts",
                "Carousels (multi-slide)",
                "Reels"
              ]
            },
            "default": []
          },
          "includeCarouselChildren": {
            "title": "Include carousel slides",
            "type": "boolean",
            "description": "Return every slide of a carousel post as nested childPosts (type, image/video URL, size, alt text). Slides are never charged separately.",
            "default": true
          },
          "includeOwnerDetails": {
            "title": "Include owner details",
            "type": "boolean",
            "description": "Add the owner's full name, verified flag and follower count to each post. When off, owner keeps only ID, username and profile URL.",
            "default": true
          },
          "includeMediaUrls": {
            "title": "Include media URLs",
            "type": "boolean",
            "description": "Return image, thumbnail and video URLs. Instagram CDN URLs are signed and expire after a while — download media soon after the run if you need it.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration. Defaults to Apify Proxy (datacenter) enabled, which rotates IPs between sessions to avoid Instagram's per-IP limits. Apify Residential is not supported — use Custom proxy URLs for your own residential provider.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum number of inputs processed in parallel. Pages of one profile are always fetched one after another.",
            "default": 5
          },
          "maxRetries": {
            "title": "Max retries per input",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many times an input is retried on a fresh session/IP after rate limits, login walls or temporary Instagram errors. A profile resumes where it stopped. Content Instagram still throttles after the first retry is fetched from an alternative source instead. Not-found and private inputs are never retried.",
            "default": 4
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose logging.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}