{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper: Posts, Reels, Comments & Hashtags",
    "description": "Public Instagram data without login. Flat low prices, no charge for empty or duplicate results, free filters, monitoring mode and a coverage report for every input.",
    "version": "0.2",
    "x-build-id": "JEwisA8mNgg0ZsmPK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abdelrahman12_3~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abdelrahman12_3-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/abdelrahman12_3~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abdelrahman12_3-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/abdelrahman12_3~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abdelrahman12_3-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",
        "required": [
          "targets"
        ],
        "properties": {
          "targets": {
            "title": "What to scrape",
            "minItems": 1,
            "type": "array",
            "description": "One per line (or several separated by commas). Accepts usernames (natgeo or @natgeo), profile URLs, post and reel URLs, #hashtags, keywords in any language, and location URLs. Prefix with \"keyword:\" to force a keyword or \"location:\" with a numeric location ID. Duplicates are scraped once.",
            "items": {
              "type": "string"
            }
          },
          "profileDetails": {
            "title": "Profile details",
            "type": "boolean",
            "description": "Followers, following, bio, links, verification and computed engagement for each profile.",
            "default": true
          },
          "profilePosts": {
            "title": "Profile posts and reels",
            "type": "boolean",
            "description": "The latest posts and reels Instagram shows on a profile to logged-out visitors (up to about 24 per profile).",
            "default": true
          },
          "deepHistory": {
            "title": "Older posts from Google (beta)",
            "type": "boolean",
            "description": "Finds a profile's older posts through Google image search and opens each one for full details. Only the profile's own posts are kept; posts by other accounts are dropped and never charged. Found posts are charged like any post with full details. Google does not index every post, so this adds older posts rather than the complete history.",
            "default": false
          },
          "deepHistorySearches": {
            "title": "Google searches per profile",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Upper limit on Google searches for each profile when \"Older posts from Google\" is on. Each search finds up to about 30 posts. Searching stops early when Google runs out of results or when most results belong to other accounts.",
            "default": 8
          },
          "postDetails": {
            "title": "Full post details",
            "type": "boolean",
            "description": "Opens every post's own page for exact timestamp, likes, comment count, carousel items, music, tagged users, coauthors and location. Post URLs in \"What to scrape\" always get full details. Charged as an extra event per post.",
            "default": false
          },
          "comments": {
            "title": "Comments",
            "type": "boolean",
            "description": "Comments Instagram shows on the post page to logged-out visitors (about 15 per post). Comments come from each post's own page, so this also turns on \"Full post details\" (charged per post).",
            "default": false
          },
          "keywordExpansionDepth": {
            "title": "Related keyword expansion",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "For hashtags and keywords: 0 = only your keyword, 1 = also its related keywords, 2 = related keywords of related keywords. Each keyword adds about 12 posts on the topic.",
            "default": 0
          },
          "maxKeywords": {
            "title": "Max related keywords per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper limit on extra keywords explored for each hashtag or keyword input.",
            "default": 20
          },
          "locationTabs": {
            "title": "Location tabs",
            "enum": [
              "both",
              "ranked",
              "recent"
            ],
            "type": "string",
            "description": "Which location feed to read.",
            "default": "both"
          },
          "newerThan": {
            "title": "Posts newer than",
            "type": "string",
            "description": "Only posts from this date on. Pick a date, or switch to relative for values like 7 days or 3 months. Leave empty for no limit. Free."
          },
          "olderThan": {
            "title": "Posts older than",
            "type": "string",
            "description": "Only posts before this date. Pick a date, or switch to relative (1 day = skip the last 24 hours). Leave empty for no limit."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Posts with hidden or unknown likes are excluded when this is set. Turn on full post details for photo posts from profiles."
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Applies to videos and reels."
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "photo",
                "video",
                "reel",
                "carousel"
              ],
              "enumTitles": [
                "Photos",
                "Videos",
                "Reels",
                "Carousels"
              ]
            },
            "default": []
          },
          "skipPinned": {
            "title": "Skip pinned posts",
            "type": "boolean",
            "description": "Where Instagram marks posts as pinned.",
            "default": false
          },
          "maxItemsPerTarget": {
            "title": "Max posts per input",
            "minimum": 1,
            "type": "integer",
            "description": "Stop collecting posts for an input after this many.",
            "default": 100
          },
          "maxItems": {
            "title": "Max posts per run",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many posts.",
            "default": 1000
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Turns on monitoring: the run returns only posts this monitor has not delivered before, and you are never charged twice for the same post. Use the same name on a scheduled task. Upper or lower case and extra spaces do not matter."
          },
          "includeCommenterProfiles": {
            "title": "Include commenter usernames",
            "type": "boolean",
            "description": "Off by default for privacy: commenters get a stable anonymous ID instead of their username.",
            "default": false
          },
          "fieldCase": {
            "title": "Field names",
            "enum": [
              "camel",
              "snake"
            ],
            "type": "string",
            "description": "camelCase or snake_case keys.",
            "default": "camel"
          },
          "flatten": {
            "title": "Flat output",
            "type": "boolean",
            "description": "Turn nested objects into dotted keys (owner.username). Handy for spreadsheets.",
            "default": false
          },
          "runTag": {
            "title": "Run tag",
            "type": "string",
            "description": "Free text copied onto every record, to label batches."
          },
          "saveMedia": {
            "title": "Save media files",
            "enum": [
              "none",
              "images",
              "all"
            ],
            "type": "string",
            "description": "Copies images (and optionally videos) into this run's storage before Instagram's links expire. Charged per file.",
            "default": "none"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Instagram blocks datacenter IPs. Residential proxies are strongly recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many pages are fetched at the same time. Higher is faster but more likely to be blocked.",
            "default": 8
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "Upper limit on page requests per minute across the whole run.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}