{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Hashtag Scraper: Content Planner",
    "description": "Collect real-time Instagram hashtag data fast. Scrape posts, reels, media links, captions, and analytics from public hashtags. Built for brands, researchers, and developers needing reliable datasets for content analysis, trend tracking, or reporting.",
    "version": "0.1",
    "x-build-id": "6c0PdPM2DlBTycdom"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~instagram-hashtag-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-instagram-hashtag-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/simpleapi~instagram-hashtag-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-instagram-hashtag-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/simpleapi~instagram-hashtag-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-instagram-hashtag-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": [
          "sessionid"
        ],
        "properties": {
          "hashtags": {
            "title": "🗓️ Hashtags / Keywords to plan around",
            "type": "array",
            "description": "🎯 One or more planning targets: 🔤 `webscraping` • #️⃣ `#webscraping` • 🔗 an Instagram hashtag URL • 🔎 a keyword (turn Keyword Search ON). Each becomes one planned section with its own best-time + topic report. (Base `startUrls` / `queries` are also accepted.)",
            "items": {
              "type": "string"
            }
          },
          "sessionid": {
            "title": "🔐 Instagram Session ID (Required) ⚡",
            "type": "string",
            "description": "🍪 **Required.** DevTools (F12) → Application → Cookies → `instagram.com` → copy `sessionid`. The hashtag feed is login-walled, so a valid cookie is mandatory. 🔒 Stored securely."
          },
          "contentFormat": {
            "title": "🎞️ Content Format to plan",
            "enum": [
              "posts",
              "reels"
            ],
            "type": "string",
            "description": "📷 **posts** (photos/videos/carousels) or 🎥 **reels** (short videos). (Accepts the base `contentType` key too.)",
            "default": "posts"
          },
          "keywordSearch": {
            "title": "🔎 Keyword → Hashtag Search",
            "type": "boolean",
            "description": "🪄 ON: auto-resolve a keyword to its matching hashtag. OFF: treat each input as a literal hashtag.",
            "default": false
          },
          "postsToAnalyze": {
            "title": "🔢 Posts to analyze per hashtag",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "📊 How many recent posts to pull and feed into the best-time + topic analysis, per hashtag. More posts = a sharper histogram. (Accepts the base `resultsLimit` key too.)",
            "default": 30
          },
          "audienceTimezoneOffset": {
            "title": "🕒 Audience timezone offset (hours from UTC)",
            "minimum": -12,
            "maximum": 14,
            "type": "integer",
            "description": "🌍 Shift the posting-hour histogram into your audience's timezone. e.g. `-5` = US-East, `0` = UTC, `1` = Central Europe, `5` = Pakistan. Weekday/hour peaks are reported in this timezone.",
            "default": 0
          },
          "extractCaptionTopics": {
            "title": "🏷️ Extract caption keywords & hashtags",
            "type": "boolean",
            "description": "🧠 Keyless term & hashtag frequency over the captions (always free, no API key). Produces `topKeywords` + `topHashtags` in the content-plan row. Turn OFF to skip topic extraction.",
            "default": true
          },
          "excludeHashtags": {
            "title": "🚫 Exclude hashtags from topics",
            "type": "array",
            "description": "🧹 Hashtags to drop from the topic/keyword frequency (with or without `#`). Handy to remove the seed tag and generic noise so the real recurring themes surface, e.g. `webscraping`, `ad`, `sponsored`.",
            "items": {
              "type": "string"
            }
          },
          "aiThemeLabeling": {
            "title": "🤖 AI content-theme labelling (optional)",
            "type": "boolean",
            "description": "OFF by default. When ON **and** an API key is supplied, an LLM names the high-level content THEMES across the captions (e.g. tutorials, product launches, behind-the-scenes) as `aiThemes`. Keyless keyword extraction always runs regardless. On any failure `aiThemes` is null — never fabricated.",
            "default": false
          },
          "aiModel": {
            "title": "🧬 AI Model / Provider",
            "enum": [
              "claude-haiku-4-5",
              "claude-sonnet-5",
              "claude-opus-4-8",
              "gpt-4o-mini",
              "gpt-4o",
              "gpt-4.1-mini",
              "o3-mini",
              "gemini-2.0-flash-lite",
              "gemini-2.0-flash",
              "gemini-2.5-flash",
              "grok-3-mini",
              "deepseek-chat",
              "sonar",
              "mistral-small-latest"
            ],
            "type": "string",
            "description": "Provider auto-detected from the name: claude-*=Anthropic, gpt-*/o*=OpenAI, gemini-*=Google, grok-*=xAI, deepseek-*=DeepSeek, sonar*=Perplexity, mistral-*=Mistral. Cheaper mini/flash/haiku models are recommended.",
            "default": "claude-haiku-4-5"
          },
          "aiApiKey": {
            "title": "🔑 AI API key",
            "type": "string",
            "description": "Provider API key for AI theme labelling. Kept secret. Falls back to the provider env var if empty (ANTHROPIC_API_KEY / OPENAI_API_KEY / GEMINI_API_KEY / XAI_API_KEY / DEEPSEEK_API_KEY / PERPLEXITY_API_KEY / MISTRAL_API_KEY)."
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy (Optional)",
            "type": "object",
            "description": "🌍 Apify Proxy to bypass rate limits & geo-blocks. RESIDENTIAL is recommended for Instagram. 🚀"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}