{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Keyword Search Scraper - Top Posts & Reels",
    "description": "[$1.5/1000] Search Instagram by keyword or #hashtag and get the top posts in full detail - likes, comments with authors, all carousel media, tagged users, music, location - plus topic descriptions and related searches. No login needed.",
    "version": "0.1",
    "x-build-id": "uppv1gWlOXDgq1Eyl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryyos~instagram-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryyos-instagram-search-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/ryyos~instagram-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ryyos-instagram-search-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/ryyos~instagram-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ryyos-instagram-search-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": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "Keywords",
            "type": "array",
            "description": "One per line, e.g. <code>iced latte</code>, <code>street food jakarta</code>, <code>coffee</code>. Hashtags (<code>#streetfood</code>) and hashtag links also work: they are searched as keywords, the same results Instagram shows logged-out. Glued tags that find nothing (<code>#erinejkt48</code>) are retried as separate words (<code>erine jkt48</code>) automatically.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerTerm": {
            "title": "Max posts per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Top posts to collect per keyword. Without a login Instagram serves around 50-60 top posts per keyword, so larger values return what is available.",
            "default": 36
          },
          "scrapePostDetails": {
            "title": "Open every post for full detail",
            "type": "boolean",
            "description": "Opens each post for exact likes and comment counts, latest comments with authors, all carousel images and videos, tagged users, collaborators, music and location. Turn off for a faster, cheaper run with search-listing data only (owner, caption, image, video, plays).",
            "default": true
          },
          "maxCommentsPerPost": {
            "title": "Comments per post",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Latest comments to include with each opened post. Without a login Instagram shows about the first 12-15.",
            "default": 5
          },
          "includeKeywordSummary": {
            "title": "Keyword summary row",
            "type": "boolean",
            "description": "Adds one row per keyword with Instagram's topic description, its sources, related searches and how many posts were found.",
            "default": true
          },
          "expandRelatedKeywords": {
            "title": "Also search related keywords",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Automatically search this many of Instagram's related keywords for each of your terms (0 = off). Great for discovering adjacent topics and creators.",
            "default": 0
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Only keep posts published after this date. YYYY-MM-DD or relative such as <code>30 days</code>. UTC."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only keep posts published before this date. Same formats as above."
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "Keep only these kinds of posts. Leave empty to keep everything.",
            "items": {
              "type": "string",
              "enum": [
                "photo",
                "video",
                "carousel",
                "reel"
              ],
              "enumTitles": [
                "Photos",
                "Videos",
                "Carousels (multiple images/videos)",
                "Reels"
              ]
            },
            "default": []
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer likes than this. 0 keeps all posts. Exact counts need the opened post, so posts are opened automatically when this is set.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer comments than this. 0 keeps all posts. Posts are opened automatically when this is set.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run in parallel.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is used by default and rotated automatically when Instagram rate-limits a session.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}