{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Related Hashtag Stats Scraper",
    "description": "Scrapes related hashtag statistics on Instagram, capturing hashtag names, post counts, growth trends, top posts, engagement metrics, and relevance clusters. Ideal for content planning, niche discovery, SEO optimization, and automated hashtag strategy research.",
    "version": "1.3",
    "x-build-id": "mtmitA7vHbSsZ8EjH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapio~instagram-related-hashtag-stats-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapio-instagram-related-hashtag-stats-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/scrapio~instagram-related-hashtag-stats-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapio-instagram-related-hashtag-stats-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/scrapio~instagram-related-hashtag-stats-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapio-instagram-related-hashtag-stats-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": [
          "urls_keywords",
          "ig_sessionid"
        ],
        "properties": {
          "urls_keywords": {
            "title": "Hashtags / URLs / Keywords 🏷️",
            "type": "array",
            "description": "Hashtags to analyze. Accepts words, #tags, or Instagram tag URLs. Example: [\"fitness\", \"#travel\", \"instagram.com/explore/tags/love\"].",
            "default": [
              "love",
              "travel"
            ],
            "items": {
              "type": "string"
            }
          },
          "ig_sessionid": {
            "title": "Instagram sessionid cookie 🔑",
            "type": "string",
            "description": "REQUIRED. Paste the value of YOUR OWN `sessionid` cookie from a logged-in instagram.com tab (DevTools → Application → Cookies → https://www.instagram.com → sessionid). Instagram only returns hashtag data to logged-in traffic. Nothing is baked in — without your cookie the run fails cleanly and you are not charged. Use a throwaway account; treat the cookie as a password."
          },
          "includeTopPosts": {
            "title": "Include top posts 🔝",
            "type": "boolean",
            "description": "Emit each hashtag's top posts (id, shortcode, caption, hashtags, mentions, likes, comments, owner, thumbnail, real timestamp) as child rows. Also powers the engagement analytics. Default: true.",
            "default": true
          },
          "includeLatestPosts": {
            "title": "Include latest posts 🆕",
            "type": "boolean",
            "description": "Emit each hashtag's most recent posts as child rows. Their real timestamps power the honest postsPerDay cadence metric. Default: true.",
            "default": true
          },
          "keywordDiscovery": {
            "title": "Keyword → hashtag discovery 🔎",
            "type": "boolean",
            "description": "Treat each input as a keyword and expand it into all matching hashtags (via Instagram tag search) before scraping. Combine with maxItems to cap the total. Default: false.",
            "default": false
          },
          "maxItems": {
            "title": "Max hashtags (top-level) 🔢",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of top-level hashtags scraped. Child rows (related tags, posts) are additional and NOT counted here. 0 = unlimited. Default: 0.",
            "default": 0
          },
          "maxRelatedPerHashtag": {
            "title": "Max related tags per hashtag 🧵",
            "minimum": 0,
            "type": "integer",
            "description": "Cap related-tag child rows per hashtag. 0 = all returned by Instagram. Default: 0.",
            "default": 0
          },
          "maxPostsPerHashtag": {
            "title": "Max posts per hashtag (each of top/latest) 🖼️",
            "minimum": 0,
            "type": "integer",
            "description": "Cap top-post and latest-post child rows per hashtag (applied to each list). 0 = all embedded. Default: 0.",
            "default": 0
          },
          "minPostsCount": {
            "title": "Min related-tag post count ⬇️",
            "minimum": 0,
            "type": "integer",
            "description": "Filter: drop related tags whose media count is below this. Example: 100000. Default: none."
          },
          "maxPostsCount": {
            "title": "Max related-tag post count ⬆️",
            "minimum": 0,
            "type": "integer",
            "description": "Filter: drop related tags whose media count is above this (find lower-competition niche tags). Default: none."
          },
          "keywords": {
            "title": "Include keywords (related tags) ✅",
            "type": "array",
            "description": "Only keep related tags whose name contains one of these substrings. Example: [\"travel\", \"wander\"]. Default: none.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords (related tags) 🚫",
            "type": "array",
            "description": "Drop related tags whose name contains any of these substrings. Default: none.",
            "items": {
              "type": "string"
            }
          },
          "difficultyTier": {
            "title": "Difficulty tier filter 🎯",
            "type": "array",
            "description": "Only keep hashtags whose REAL difficulty tier (derived from top-post engagement) is one of the selected values. Leave empty for no filtering. Note: requires top posts to be present; hashtags with no engagement data have a null tier and are dropped when this filter is set.",
            "items": {
              "type": "string",
              "enum": [
                "very_low",
                "low",
                "medium",
                "high",
                "very_high"
              ],
              "enumTitles": [
                "Very low",
                "Low",
                "Medium",
                "High",
                "Very high"
              ]
            }
          },
          "onlyFollowable": {
            "title": "Only followable tags 🛡️",
            "type": "boolean",
            "description": "Drop hashtags Instagram marks as not-followable (banned / restricted / shadow tags). Default: false.",
            "default": false
          },
          "debugDump": {
            "title": "Debug: log payload key names 🐞",
            "type": "boolean",
            "description": "Diagnostic only. Logs the top-level KEY NAMES of Instagram's web_info payload (never any values/PII) to help troubleshoot missing fields. Default: false.",
            "default": false
          },
          "proxy_configuration": {
            "title": "Proxy Configuration 🌐",
            "type": "object",
            "description": "Proxy used for all Instagram requests. Residential is strongly recommended and used by default; the actor rotates to a fresh IP on soft blocks.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}