{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Post Scraper (Sponsored Post Finder)",
    "description": "Instagram Post Scraper extracts post details and identifies sponsored content, including captions, hashtags, engagement metrics, creator details, timestamps, media URLs, and sponsorship signals. Ideal for influencer research, brand monitoring, competitor analysis, and ad intelligence.",
    "version": "0.1",
    "x-build-id": "hsSTu3unZgdgi9R5j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~instagram-post-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-instagram-post-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-post-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-instagram-post-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-post-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-instagram-post-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": [
          "username"
        ],
        "properties": {
          "username": {
            "title": "🎯 Creators to audit (handle, profile URL, or post URL)",
            "type": "array",
            "description": "One entry per creator: a handle (mkbhd), a profile URL (https://www.instagram.com/mkbhd/), or a single post / reel / tv URL (https://www.instagram.com/p/SHORTCODE/). Post URLs return one row each and are exempt from the scan budget - note that Instagram's post page does not carry the official paid-partnership flag, so those rows come back with sponsorshipDataAvailable=false.",
            "items": {
              "type": "string"
            }
          },
          "sponsorshipFilter": {
            "title": "🏷️ Which posts should come back",
            "enum": [
              "allPosts",
              "officiallySponsored",
              "captionSignalled",
              "anySponsorshipSignal"
            ],
            "type": "string",
            "description": "Instagram's official flag and caption cues disagree far more than people expect: over 636 measured posts, 28 officially-paid posts carried no caption cue and 18 caption-flagged posts were not officially paid (only 14 agreed). A single boolean cannot express that, so pick the population you want. Default 'All posts' keeps this actor's behaviour identical to a plain post scraper.",
            "default": "allPosts"
          },
          "sponsorUsernames": {
            "title": "🔎 Only these brands",
            "type": "array",
            "description": "Optional brand allow-list, e.g. ridge, djiglobal, gmc. Matched against the resolved brand handle (Instagram-confirmed first, inferred candidate second). Leave empty to keep every brand. Example: ['ridge','bestbuy'].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minSponsorFollowerCount": {
            "title": "📈 Minimum brand follower count",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts whose CONFIRMED sponsor has fewer followers than this. Only rows where Instagram itself names the brand carry a follower count, so any value above 0 also drops inferred-brand rows. Example: 1000000 keeps only big-brand deals. Default 0 = off.",
            "default": 0
          },
          "includeInferredSponsors": {
            "title": "🧭 Guess the brand when Instagram will not name it",
            "type": "boolean",
            "description": "On officially-paid posts Instagram names the brand only about half the time. When it does not, a deterministic ranker (tagged user > caption @mention > coauthor - no AI, no LLM) proposes a candidate into inferredSponsorUsername / inferredSponsorSource / inferredSponsorCandidates. It NEVER writes to sponsorUsername and never changes isPaidPartnership. Default on.",
            "default": true
          },
          "resultsLimit": {
            "title": "📦 Rows returned per creator",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many post rows land in the dataset per creator - this is the BILLED number. Example: 25 returns at most 25 rows even if 300 posts were scanned to find them. Default 10.",
            "default": 10
          },
          "maxPostsToScan": {
            "title": "🔭 Posts to scan through per creator",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How deep into the grid to look while filtering. Only used when a sponsorship filter, brand allow-list or follower threshold is active - with 'All posts' the actor stops as soon as the row budget is full. Example: rows 20 + scan 300 checks 300 posts and returns the first 20 sponsored ones. Default 300 (= 25 feed requests).",
            "default": 300
          },
          "onlyPostsNewerThan": {
            "title": "🗓️ Campaign window starts",
            "type": "string",
            "description": "Only keep posts newer than this (UTC). Absolute tab takes YYYY-MM-DD or a full ISO timestamp; Relative tab takes '3 days', '2 weeks', '6 months', '1 year' - minutes, hours and weeks all parse. An unparseable value fails the run loudly instead of silently disabling the filter. Leave empty for no cutoff.",
            "default": null
          },
          "skipPinnedPosts": {
            "title": "📌 Ignore posts pinned to the grid",
            "type": "boolean",
            "description": "Skip the posts a creator has pinned to the top of their profile. Pin status is also emitted as the isPinned column either way. Default off.",
            "default": false
          },
          "dataDetailLevel": {
            "title": "🔬 Payload depth",
            "enum": [
              "detailedData",
              "basicData"
            ],
            "type": "string",
            "description": "Every sponsorship column is available on BOTH levels - brand identity rides in the feed payload at zero extra cost. Detailed adds alt text, the latest comments, music info and video play count by fetching one extra page per returned row (measured: 2.8s vs 6.2s per 12 posts). Billing is one row event per row on both levels.",
            "default": "detailedData"
          },
          "computeSponsoredEngagementIndex": {
            "title": "⚖️ Compare sponsored vs organic likes",
            "type": "boolean",
            "description": "Adds sponsoredEngagementIndex = median likes on sponsored posts / median likes on organic posts, COMPUTED FROM THIS RUN's scan window only - it is not a value scraped from Instagram. Stays null unless the scan contains at least 5 organic and 1 sponsored post. Default on.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Instagram's post feed answers on both residential and datacenter exits in testing, so datacenter is a valid cheaper choice here. Residential is the default because it is the most reliable at volume.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}