{
  "openapi": "3.0.1",
  "info": {
    "title": "CrowdPull Instagram Scraper — Places & More",
    "description": "Scrape Instagram profiles, posts, reels, comments, hashtag search results, hashtag posts, place search results, place feeds, and tagged mentions. No login required for core profile and post modes, with diagnostics for empty or partial sources.",
    "version": "1.0",
    "x-build-id": "ippzPwJ7xizKMpg90"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crowdpull~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crowdpull-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/crowdpull~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crowdpull-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/crowdpull~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crowdpull-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "profiles",
              "posts",
              "postUrls",
              "comments",
              "searchHashtags",
              "hashtagPosts",
              "searchPlaces",
              "placePosts",
              "mentions"
            ],
            "type": "string",
            "description": "Choose what you want to scrape.",
            "default": "posts"
          },
          "usernames": {
            "title": "Instagram Usernames",
            "type": "array",
            "description": "Instagram usernames without @. Used by profiles, posts, and mentions modes.",
            "items": {
              "type": "string"
            }
          },
          "directUrls": {
            "title": "Instagram Profile URLs",
            "type": "array",
            "description": "Full Instagram profile URLs. Used by profiles, posts, and mentions modes.",
            "items": {
              "type": "object"
            }
          },
          "postUrls": {
            "title": "Instagram Post or Reel URLs",
            "type": "array",
            "description": "Full post or reel URLs. Used by postUrls and comments modes.",
            "items": {
              "type": "object"
            }
          },
          "searchTerms": {
            "title": "Hashtag Search Terms",
            "type": "array",
            "description": "Keywords used in searchHashtags mode. For example: nature, fitness, ecommerce.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags without #. Used by hashtagPosts mode.",
            "items": {
              "type": "string"
            }
          },
          "placeSearchTerms": {
            "title": "Place Search Terms",
            "type": "array",
            "description": "Keywords used in searchPlaces mode. For example: detroit, miami beach, soho.",
            "items": {
              "type": "string"
            }
          },
          "locationIds": {
            "title": "Instagram Location IDs",
            "type": "array",
            "description": "Instagram location IDs used by placePosts mode.",
            "items": {
              "type": "string"
            }
          },
          "placeUrls": {
            "title": "Instagram Place URLs",
            "type": "array",
            "description": "Full Instagram place/location URLs. Used by placePosts mode and converted into location IDs automatically.",
            "items": {
              "type": "object"
            }
          },
          "maxPosts": {
            "title": "Number of Posts",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of posts to extract per profile, hashtag, place, or mention source. Set to 0 for unlimited.",
            "default": 20
          },
          "maxComments": {
            "title": "Number of Comments",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of comments per post in comments mode. Set to 0 for unlimited.",
            "default": 50
          },
          "onlyPostsNewerThan": {
            "title": "Only Posts Newer Than",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(d|w|m|y|day|days|week|weeks|month|months|year|years)$",
            "type": "string",
            "description": "Only keep posts newer than this date. Supports ISO dates (2026-01-01) or relative durations like 7d, 30d, 8w, 6m, 1y, or '14 days'."
          },
          "includeProfile": {
            "title": "Include Profile Row",
            "type": "boolean",
            "description": "In posts mode, push the profile metadata row before the post rows.",
            "default": true
          },
          "mediaTypes": {
            "title": "Media Types Filter",
            "type": "array",
            "description": "Optional media type filter for posts mode.",
            "items": {
              "type": "string"
            }
          },
          "sessionCookie": {
            "title": "Instagram sessionid Cookie",
            "type": "string",
            "description": "Optional for core public modes. Required for comments, searchPlaces, and placePosts. Hashtag search, hashtag posts, and mentions still attempt logged-out public fallbacks when possible. Paste either the raw sessionid value or 'sessionid=...'."
          },
          "scrollDelay": {
            "title": "Delay Between Requests (ms)",
            "minimum": 250,
            "maximum": 15000,
            "type": "integer",
            "description": "Delay between page requests in milliseconds. Increase this if you hit Instagram rate limits.",
            "default": 1500
          },
          "maxEmptyPages": {
            "title": "Max Empty Pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Stop after this many consecutive empty or duplicate-heavy pages.",
            "default": 4
          },
          "enableDedup": {
            "title": "Enable Smart Scrape",
            "type": "boolean",
            "description": "Persist a per-source cache of post IDs and skip old posts in future runs.",
            "default": false
          },
          "refreshWindowDays": {
            "title": "Refresh Window (days)",
            "minimum": 0,
            "maximum": 90,
            "type": "integer",
            "description": "Re-scrape recent cached posts from the last N days so likes and comments stay fresh. Set 0 to never re-scrape cached posts.",
            "default": 0
          },
          "proxyConfig": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Residential proxies are recommended for heavier Instagram pagination.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}