{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Intelligence Suite",
    "description": "Scrape public Instagram profiles, posts, reels, comments, hashtags, keywords, locations, followers, and following lists.",
    "version": "1.0",
    "x-build-id": "gWdF8B684S3F27YZF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/qaseemiqbal~instagram-intelligence-suite/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-qaseemiqbal-instagram-intelligence-suite",
        "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/qaseemiqbal~instagram-intelligence-suite/runs": {
      "post": {
        "operationId": "runs-sync-qaseemiqbal-instagram-intelligence-suite",
        "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/qaseemiqbal~instagram-intelligence-suite/run-sync": {
      "post": {
        "operationId": "run-sync-qaseemiqbal-instagram-intelligence-suite",
        "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": [
          "targets"
        ],
        "properties": {
          "operationPreset": {
            "title": "Operation preset",
            "enum": [
              "auto",
              "profiles",
              "profilePosts",
              "profileReels",
              "postDetails",
              "reelDetails",
              "comments",
              "hashtagDiscovery",
              "keywordDiscovery",
              "locationDiscovery",
              "followers",
              "following"
            ],
            "type": "string",
            "description": "Choose a simplified workflow. Use Auto for mixed targets.",
            "default": "auto"
          },
          "targets": {
            "title": "Targets",
            "type": "array",
            "description": "Instagram usernames, URLs, hashtags, keywords, places, or audience targets.",
            "items": {
              "type": "object",
              "required": [
                "value"
              ],
              "properties": {
                "type": {
                  "title": "Target type",
                  "description": "Target type. Use auto to infer it from the target value.",
                  "type": "string",
                  "default": "auto",
                  "enum": [
                    "auto",
                    "profile",
                    "post",
                    "reel",
                    "hashtag",
                    "keyword",
                    "place",
                    "location",
                    "comments",
                    "audience"
                  ]
                },
                "value": {
                  "title": "Target value",
                  "description": "Instagram username, URL, hashtag, keyword, location, or audience seed.",
                  "type": "string",
                  "editor": "textfield"
                },
                "audienceMode": {
                  "title": "Audience mode",
                  "description": "Followers or following mode for audience targets.",
                  "type": "string",
                  "enum": [
                    "followers",
                    "following"
                  ]
                },
                "label": {
                  "title": "Label",
                  "description": "Optional label copied into normalized target metadata.",
                  "type": "string",
                  "editor": "textfield"
                },
                "metadata": {
                  "title": "Metadata",
                  "description": "Optional custom metadata for downstream workflows.",
                  "type": "object",
                  "editor": "json"
                }
              }
            }
          },
          "contentTypes": {
            "title": "Content types",
            "type": "array",
            "description": "Media types to collect for profile, hashtag, keyword, and location discovery.",
            "items": {
              "type": "string",
              "enum": [
                "post",
                "reel",
                "carousel",
                "video",
                "image"
              ]
            },
            "default": [
              "post",
              "reel"
            ]
          },
          "maxResultsPerTarget": {
            "title": "Max results per target",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum media or audience records per target. Use a small number for testing.",
            "default": 50
          },
          "maxItemsTotal": {
            "title": "Max items total",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap for all output records. Use 0 for no explicit cap.",
            "default": 0
          },
          "onlyContentNewerThan": {
            "title": "Only content newer than",
            "type": "string",
            "description": "ISO date or relative duration such as '1 day', '7 days', or '2026-01-01'.",
            "default": ""
          },
          "skipPinnedContent": {
            "title": "Skip pinned content",
            "type": "boolean",
            "description": "Skip pinned posts/reels that may be old and irrelevant.",
            "default": true
          },
          "includePinnedIfNewerThanCutoff": {
            "title": "Include pinned if newer than cutoff",
            "type": "boolean",
            "description": "If enabled, pinned posts/reels are included only when they pass the date filter.",
            "default": true
          },
          "includeProfileDetails": {
            "title": "Include profile details",
            "type": "boolean",
            "description": "Fetch profile details for owners when supported by the route.",
            "default": false
          },
          "includeLatestContentInProfile": {
            "title": "Include latest content in profile records",
            "type": "boolean",
            "description": "Include latest post and reel summaries inside profile records when available.",
            "default": true
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Fetch embedded public comments for posts and reels when available.",
            "default": false
          },
          "commentLimit": {
            "title": "Comment limit per post or reel",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of comments to collect per post or reel.",
            "default": 10
          },
          "includeReplies": {
            "title": "Include comment replies",
            "type": "boolean",
            "description": "Include embedded public comment replies when available.",
            "default": false
          },
          "latestCommentLimit": {
            "title": "Latest comments preview limit",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of latest embedded comments to keep as media previews.",
            "default": 10
          },
          "includeTranscripts": {
            "title": "Include reel transcripts",
            "type": "boolean",
            "description": "Add transcript fields for reels when transcript data is available.",
            "default": false
          },
          "downloadMedia": {
            "title": "Download media",
            "type": "boolean",
            "description": "Download supported images/videos/thumbnails to the key-value store.",
            "default": false
          },
          "mediaTypesToDownload": {
            "title": "Media types to download",
            "type": "array",
            "description": "Select which media assets should be downloaded to the key-value store.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "thumbnail"
              ]
            },
            "default": [
              "video"
            ]
          },
          "expandRelatedHashtags": {
            "title": "Expand related hashtags",
            "type": "boolean",
            "description": "Collect related hashtag suggestions when exposed in public page data.",
            "default": false
          },
          "relatedHashtagLimit": {
            "title": "Related hashtag limit",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of related hashtags to collect per seed hashtag.",
            "default": 20
          },
          "audienceMode": {
            "title": "Audience mode",
            "enum": [
              "followers",
              "following"
            ],
            "type": "string",
            "description": "Select whether audience targets export followers or following.",
            "default": "followers"
          },
          "audienceLimit": {
            "title": "Audience limit per profile",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of audience records to collect per profile when supported.",
            "default": 1000
          },
          "freeApiLimit": {
            "title": "Free API limit",
            "minimum": 0,
            "type": "integer",
            "description": "Optional product policy guardrail for free or trial usage.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Use Apify Proxy for production runs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of concurrent requests.",
            "default": 5
          },
          "minConcurrency": {
            "title": "Min concurrency",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum number of concurrent requests.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retry attempts for failed requests.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time a single request can run before timing out.",
            "default": 60
          },
          "sessionPoolSize": {
            "title": "Session pool size",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum size of the session pool for production crawling.",
            "default": 50
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "normalized",
              "raw",
              "both"
            ],
            "type": "string",
            "description": "Select whether to store normalized records, raw records, or both when raw mode is implemented.",
            "default": "normalized"
          },
          "flattenOutput": {
            "title": "Flatten output for CSV",
            "type": "boolean",
            "description": "Add CSV-friendly top-level aliases for common nested media fields.",
            "default": false
          },
          "dedupeResults": {
            "title": "Deduplicate results",
            "type": "boolean",
            "description": "Skip duplicate records by stable entity key.",
            "default": true
          },
          "includeErrorRecords": {
            "title": "Include error records",
            "type": "boolean",
            "description": "Store structured error records for failed or unsupported targets.",
            "default": true
          },
          "summaryToKeyValueStore": {
            "title": "Save run summary",
            "type": "boolean",
            "description": "Save RUN-SUMMARY.json to the default key-value store.",
            "default": true
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable additional debug logging and raw response snapshots.",
            "default": false
          },
          "saveRawResponses": {
            "title": "Save raw responses",
            "type": "boolean",
            "description": "Stores sanitized raw responses in the key-value store for debugging.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}