{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Hashtag Scraper : Intelligence & Trend Radar 🛰️",
    "description": "Instagram Hashtag Scraper: Track hashtags with posts, creators, engagement, captions, timestamps, and popularity signals. Discover emerging trends, monitor competitor activity, identify audience interests, and uncover content opportunities with hashtag intelligence and trend analysis.",
    "version": "0.1",
    "x-build-id": "qwDmWqgvAdShBsFd9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~instagram-hashtag-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-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/scrapier~instagram-hashtag-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-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/scrapier~instagram-hashtag-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-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": [
          "startUrls",
          "sessionid"
        ],
        "properties": {
          "startUrls": {
            "title": "🏷️ Hashtags, URLs or Keywords",
            "type": "array",
            "description": "🎯 Add one or more: 🔤 `webscraping` • #️⃣ `#webscraping` • 🔗 hashtag URL • 🔎 keyword (with Keyword Search ON). Each becomes its own **section** + intelligence report in the output. 📊",
            "items": {
              "type": "string"
            }
          },
          "sessionid": {
            "title": "🔐 Instagram Session ID (Required) ⚡",
            "type": "string",
            "description": "🍪 **Required.** Get from DevTools (F12) → Application → Cookies → `instagram.com` → copy `sessionid`. 🔒 Stored securely."
          },
          "contentType": {
            "title": "🎞️ Content Type",
            "enum": [
              "posts",
              "reels"
            ],
            "type": "string",
            "description": "📷 **posts** (photos/videos/carousels) or 🎥 **reels** (short videos).",
            "default": "posts"
          },
          "keywordSearch": {
            "title": "🔎 Keyword Search",
            "type": "boolean",
            "description": "🪄 ON: auto-resolve keywords → matching hashtag. OFF: treat input as a literal hashtag.",
            "default": false
          },
          "resultsLimit": {
            "title": "🔢 Results Limit per Hashtag",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "📊 Items to collect **per hashtag**. 🐣 1–50 quick · 🚀 51–200 solid · 🐉 201–1000 deep-dive.",
            "default": 20
          },
          "intelligenceOptions": {
            "title": "🧠 Intelligence & Trend Radar",
            "type": "boolean",
            "description": "Options below control the per-hashtag intelligence report and the cross-run trend delta. Both are computed ONLY from the posts scraped this run — no external or estimated data. The base post rows are always emitted unchanged whether these are on or off.",
            "default": true
          },
          "emitIntelligence": {
            "title": "🧠 Emit Intelligence Report",
            "type": "boolean",
            "description": "📊 Add one free (non-charged) summary row per hashtag: co-occurring hashtags, top mentions, audio/music trends, UTC posting-hour & weekday histograms, media-type breakdown, engagement totals/averages/medians, and top creators & posts — all aggregated from the scraped posts.",
            "default": true
          },
          "trackTrends": {
            "title": "📈 Track Trends Across Runs",
            "type": "boolean",
            "description": "🛰️ Remember which post IDs were seen for each hashtag (persisted between runs) and report how many posts are NEW since the previous run, plus emerging co-hashtags, rising creators, and the observed new-post rate. First run marks everything as new.",
            "default": true
          },
          "topN": {
            "title": "🔝 Top-N in Rankings",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many items to keep in each ranked list (co-hashtags, mentions, audio, creators, top posts).",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy (Optional)",
            "type": "object",
            "description": "🌍 Enable Apify Proxy to bypass rate limits & geo-blocks. Recommended for high-volume runs. 🚀"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}