{
  "openapi": "3.0.1",
  "info": {
    "title": "📸 Instagram Tagged Posts Scraper Plus",
    "description": "Extract all tagged posts from any public Instagram profile using the Instagram Tagged Posts Scraper. This Apify actor gathers tagged photos, captions, usernames, post URLs, and engagement stats—perfect for brand monitoring, influencer tracking, and content analysis.",
    "version": "2.0",
    "x-build-id": "2zasrwgXLz5lnZ5ja"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scraper-engine~instagram-tagged-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scraper-engine-instagram-tagged-posts-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/scraper-engine~instagram-tagged-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scraper-engine-instagram-tagged-posts-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/scraper-engine~instagram-tagged-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scraper-engine-instagram-tagged-posts-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",
        "properties": {
          "usernames": {
            "title": "👤 Target Accounts (usernames or profile URLs)",
            "type": "array",
            "description": "Instagram usernames, `@handles`, or profile URLs whose **tagged posts** you want to scrape. Example: `cristiano` or `https://instagram.com/cristiano`.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "🔗 Specific Post URLs / Shortcodes (optional)",
            "type": "array",
            "description": "Optional. Scrape individual posts directly by URL or shortcode instead of (or in addition to) a profile's tagged tab. Example: `https://www.instagram.com/p/CxAbC12dEfG/` or just `CxAbC12dEfG`.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "📊 Maximum Posts Per Account",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of tagged posts to collect **per account** (counts top-level posts, not comments). Enter `0` to collect all available tagged posts. Default is 20.",
            "default": 20
          },
          "onlyPostsNewerThan": {
            "title": "📅 Only Posts Newer Than",
            "type": "string",
            "description": "Keep only posts published on/after this date. Accepts an absolute date (e.g. `2024-01-01`) or a relative value (e.g. `3 months`, `30 days`). Pagination stops early once older posts are reached."
          },
          "keywords": {
            "title": "🔍 Caption Includes Keywords",
            "type": "array",
            "description": "Keep only posts whose caption contains at least one of these words/phrases (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "🚫 Caption Excludes Keywords",
            "type": "array",
            "description": "Drop posts whose caption contains any of these words/phrases (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "minLikes": {
            "title": "👍 Minimum Likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts with at least this many likes. Default 0 (no minimum).",
            "default": 0
          },
          "minComments": {
            "title": "💬 Minimum Comments",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts with at least this many comments. Default 0 (no minimum).",
            "default": 0
          },
          "mediaType": {
            "title": "🎬 Media Type",
            "enum": [
              "any",
              "image",
              "video",
              "carousel",
              "reel"
            ],
            "type": "string",
            "description": "Keep only posts of this media type.",
            "default": "any"
          },
          "includeComments": {
            "title": "💬 Include Comments (as child rows)",
            "type": "boolean",
            "description": "Also fetch top-level comments for each post and emit them as separate child rows (`type=comment`, `isChild=true`, linked by `parentId`). Child comment rows are mirrored to a per-run `comments-<runId>` dataset. Increases run time and requests.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "🔢 Max Comments Per Post",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on comments fetched per post when 'Include Comments' is on. Example: maxItems=10 + maxCommentsPerPost=5 → up to 10 posts and up to 50 comment rows. Default 20.",
            "default": 20
          },
          "includeVideoUrls": {
            "title": "🎥 Include Video URLs",
            "type": "boolean",
            "description": "Include direct video download URLs and variants for video/reel posts. Default true.",
            "default": true
          },
          "downloadMedia": {
            "title": "⬇️ Download Media To Key-Value Store",
            "type": "boolean",
            "description": "Opt-in. Download the best image (and video, if 'Include Video URLs' is on) of each post into this run's key-value store, and add the storage keys to each row. Note: Instagram CDN URLs expire, so downloading preserves the media. Increases run time and storage.",
            "default": false
          },
          "aiEnhancement": {
            "title": "🤖 AI Enrichment (captions & comments)",
            "type": "boolean",
            "description": "Analyze captions (and comments, if included) with an LLM: sentiment, emotion, language, topics and a spam score. Requires an API key below or the matching provider env var.",
            "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-*/o1/o3=OpenAI, gemini-*=Google, grok-*=xAI, deepseek-*=DeepSeek, sonar*=Perplexity, mistral-*=Mistral. Cheaper mini/flash/haiku/lite models are recommended for classification.",
            "default": "claude-haiku-4-5"
          },
          "aiApiKey": {
            "title": "🔑 AI API Key",
            "type": "string",
            "description": "API key for the selected provider. Kept secret. If omitted, the actor reads the provider's env var (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, XAI_API_KEY, DEEPSEEK_API_KEY, PERPLEXITY_API_KEY, MISTRAL_API_KEY)."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Residential proxies are strongly recommended — Instagram blocks datacenter IPs. If left empty, the actor defaults to Apify Residential proxies. Your selection here is honored.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}