{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper",
    "description": "Instagram scraper for profiles, posts, reels and comments in one run: profile, post or reel URLs or usernames in; posts, reels with plays and MP4 links, profiles or comments out. $0.99 per 1,000 results on Starter, over 2x cheaper than the most-used Instagram scraper, same input names.",
    "version": "0.1",
    "x-build-id": "x7hqZfDH4vIAVwyj2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-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/deepmine~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-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/deepmine~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-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": {
          "resultsType": {
            "title": "🎯 Content to scrape",
            "enum": [
              "posts",
              "reels",
              "details",
              "comments"
            ],
            "type": "string",
            "description": "What each row is. Posts: profile, post and reel URLs. Reels: profiles, reel URLs, and hashtags (reels that hold the hashtag). Details: profiles. Comments: post and reel URLs.",
            "default": "posts"
          },
          "directUrls": {
            "title": "🔗 Instagram URLs",
            "type": "array",
            "description": "Profile (instagram.com/natgeo/), post (/p/…), reel (/reel/…) or hashtag (/explore/tags/travel/) URLs, in any mix. Each is read as far as the content above allows; the rest is listed as skipped. Empty (and no usernames or hashtags) = the sample.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "resultsLimit": {
            "title": "💯 Results per input",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Posts or reels per profile or hashtag, comments per post. You pay per result, so this caps the cost of each input. A hashtag can return fewer: the run says so.",
            "default": 100
          },
          "onlyPostsNewerThan": {
            "title": "📅 Newer than",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d)?(\\.\\d+)?Z?)?$|^(\\d+)\\s*(minute|hour|day|week|month|year)s?$",
            "type": "string",
            "description": "Only posts, reels or comments after this date, e.g. 2026-10-01 or 2 weeks. Times are UTC. Pinned posts can still appear. Empty = no limit."
          },
          "usernames": {
            "title": "👤 Usernames",
            "type": "array",
            "description": "Profiles by username or @handle, e.g. natgeo. Read like profile URLs.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "hashtags": {
            "title": "#️⃣ Hashtags",
            "type": "array",
            "description": "Hashtags without or with #, e.g. travel. Content = Reels finds public reels whose caption holds that exact hashtag; only those are delivered and charged. This isn't Instagram's full top or recent hashtag feed, so a hashtag can return fewer reels than you ask for, and the run says so. Content = Posts skips hashtags.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "search": {
            "title": "🔍 Search words",
            "type": "string",
            "description": "Words to search reels for, separated by commas, e.g. home workout, yoga. Content = Reels. A topic search: rows name the words in the caption, hashtags or creator name, not always as a hashtag."
          },
          "searchType": {
            "title": "Search type",
            "type": "string",
            "description": "Search words are read as a topic search of reels (hashtag, the default). Profile and place search aren't supported yet.",
            "default": "hashtag"
          },
          "skipPinnedPosts": {
            "title": "📌 Skip pinned posts",
            "type": "boolean",
            "description": "Leave out the posts and reels a profile pinned to its top.",
            "default": false
          },
          "sortCommentsBy": {
            "title": "Sort comments by",
            "enum": [
              "NEWEST_FIRST",
              "MOST_LIKED"
            ],
            "type": "string",
            "description": "Comments: newest first (Instagram's own order) or the most liked among the newest 2,000 of each post.",
            "default": "NEWEST_FIRST"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many results in total (all inputs together). You pay per result.",
            "default": 100000
          },
          "includeNestedComments": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Instagram shows replies only to logged-in users, so replies aren't read; accepted so saved inputs run.",
            "default": false
          },
          "addParentData": {
            "title": "Add metadata",
            "type": "boolean",
            "description": "Accepted for saved inputs of apify/instagram-scraper; every row already says where it came from.",
            "default": false
          },
          "searchLimit": {
            "title": "Search results limit",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Accepted for saved inputs of apify/instagram-scraper; every search word you give is read."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: Apify Proxy (datacenter) reads everything. Where Instagram refuses a datacenter IP, the Actor retries on a little Apify residential on its own, at no extra cost to you.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}