{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper API by SocialScrape",
    "description": "Scrape Instagram profiles, posts, reels, comments, hashtags, search results, story highlights and reel transcripts as JSON. 18 endpoints in one actor, with the same field names on every platform. Pay per result: no API key and no other account needed.",
    "version": "0.1",
    "x-build-id": "zw5qf64LCNphD0pOj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/socialscrape~instagram-scraper-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-socialscrape-instagram-scraper-api",
        "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/socialscrape~instagram-scraper-api/runs": {
      "post": {
        "operationId": "runs-sync-socialscrape-instagram-scraper-api",
        "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/socialscrape~instagram-scraper-api/run-sync": {
      "post": {
        "operationId": "run-sync-socialscrape-instagram-scraper-api",
        "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": [
          "endpoint"
        ],
        "properties": {
          "endpoint": {
            "title": "Endpoint",
            "enum": [
              "profile",
              "basic_profile",
              "profile.post_count",
              "profile.posts",
              "profile.reels",
              "post",
              "post.transcript",
              "post.comments",
              "search",
              "search.popular",
              "search.hashtag",
              "search.profiles",
              "search.reels",
              "reels.trending",
              "profile.highlights",
              "highlight",
              "song.reels",
              "profile.embed"
            ],
            "type": "string",
            "description": "What to fetch. The fields below are shared by the endpoints; each endpoint uses only the ones it needs.",
            "default": "profile"
          },
          "handle": {
            "title": "Handle",
            "type": "string",
            "description": "Username, with or without the leading @. Used by: profile, profile.embed, profile.highlights, profile.post_count, profile.posts, profile.reels."
          },
          "include_post_count": {
            "title": "Include Post Count",
            "type": "boolean",
            "description": "Set false to skip the extra page read and leave `stats.posts` null. Used by: profile.",
            "default": true
          },
          "trim": {
            "title": "Trim",
            "type": "boolean",
            "description": "Smaller response: drops null fields and `extra`.",
            "default": false
          },
          "raw": {
            "title": "Raw",
            "type": "boolean",
            "description": "Also return the platform's original object as `raw`.",
            "default": false
          },
          "max_age_days": {
            "title": "Max Age Days",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Accept a cached result fetched within this many days. It answers faster."
          },
          "id": {
            "title": "ID",
            "type": "string",
            "description": "For basic_profile, profile.posts, profile.reels, profile.highlights: Numeric Instagram user id. For post, post.transcript, post.comments: Shortcode or numeric media id. For highlight: Highlight id (from profile/highlights) or a /stories/highlights/ URL. For song.reels: Audio id from the audio page URL (instagram.com/reels/audio/<id>/)."
          },
          "allow_estimated": {
            "title": "Allow Estimated",
            "type": "boolean",
            "description": "Return a scaled estimate when Instagram abbreviates the count (profiles over 10,000 posts). Without it such a profile answers an unbilled error. Used by: profile.post_count.",
            "default": false
          },
          "require_play_counts": {
            "title": "Require Play Counts",
            "type": "boolean",
            "description": "For profile.posts: Add likes, comments and video views to every row (one extra page per post), and fail rather than return a video post whose play count is missing (a real 0 is fine). For profile.reels: Fail rather than return a reel whose play count is missing.",
            "default": false
          },
          "url": {
            "title": "URL",
            "type": "string",
            "description": "Post or reel URL (/p/..., /reel/..., /tv/...). Used by: post, post.comments, post.transcript."
          },
          "include_play_count": {
            "title": "Include Play Count",
            "type": "boolean",
            "description": "Set false to skip the extra fetch for the video view count and answer faster. Used by: post.",
            "default": true
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter country code (ISO 3166-1) for results that vary by country. Used by: post."
          },
          "include_replies": {
            "title": "Include Replies",
            "type": "boolean",
            "description": "Accepted for compatibility; replies are not available, so it changes nothing. Used by: post.comments.",
            "default": false
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "For search: The word or start of a word to find hashtags for, with or without #. For search.popular: The Popular topic to look up. For search.profiles: Profile name, username or keywords. For search.reels: Search terms."
          },
          "hashtag": {
            "title": "Hashtag",
            "type": "string",
            "description": "The hashtag, with or without #. Used by: search.hashtag."
          },
          "date_posted": {
            "title": "Date Posted",
            "type": "string",
            "description": "For search.hashtag: Only posts found in this window (one of: day, week, month, year). For search.reels: Accepted for compatibility; not applied (no date filter upstream) (one of: week, month, year)."
          },
          "media_type": {
            "title": "Media Type",
            "enum": [
              "all",
              "reels"
            ],
            "type": "string",
            "description": "Posts and reels, or reels only. Used by: search.hashtag."
          },
          "enrich": {
            "title": "Enrich",
            "type": "boolean",
            "description": "For search.hashtag: Read each post for its full caption, author, media and counts (on by default). Off returns only what the search result states, much cheaper and faster. For search.profiles: Read the first 10 accounts of a page for exact counts, bio, links and picture (on by default). Off returns only what the search result states, much cheaper and faster.",
            "default": true
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Follow the cursor for up to this many pages. You pay for the results, not for the pages.",
            "default": 1
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many results. 0 means no limit other than Max pages.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}