{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Sponsorship & Promo Intelligence",
    "description": "Detect sponsored posts, promo codes, affiliate links, CTAs, and creator-brand relationships from Instagram post records.",
    "version": "0.2",
    "x-build-id": "p78ep5uN5k0WwOh4H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scalogik~instagram-sponsorship-promo-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scalogik-instagram-sponsorship-promo-intelligence",
        "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/scalogik~instagram-sponsorship-promo-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-scalogik-instagram-sponsorship-promo-intelligence",
        "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/scalogik~instagram-sponsorship-promo-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-scalogik-instagram-sponsorship-promo-intelligence",
        "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": [
          "sourceMode"
        ],
        "properties": {
          "sourceMode": {
            "title": "Data source",
            "enum": [
              "inline",
              "dataset",
              "instagram_scraper",
              "upstream_actor"
            ],
            "type": "string",
            "description": "Inline records require no paid dependency. Dataset and upstream modes analyze data already available in your Apify account. Instagram Scraper mode calls apify/instagram-scraper and is billed separately.",
            "default": "inline"
          },
          "records": {
            "title": "Inline Instagram post records",
            "maxItems": 5000,
            "type": "array",
            "description": "Post or Reel records from any source. Common Instagram Actor field names are normalized automatically.",
            "items": {
              "type": "object"
            }
          },
          "datasetId": {
            "title": "Dataset ID or name",
            "type": "string",
            "description": "Existing Apify dataset containing Instagram post records. URLs and API tokens are not accepted."
          },
          "instagramUrls": {
            "title": "Instagram URLs",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Public Instagram post, Reel, profile, hashtag, or place URLs. Used only in Instagram Scraper mode.",
            "items": {
              "type": "string",
              "pattern": "^https://(www\\.)?instagram\\.com/"
            }
          },
          "searchQueries": {
            "title": "Instagram discovery terms",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Hashtag discovery terms for Instagram Scraper mode, without #. URLs take priority when both are supplied.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "maxPostsPerSource": {
            "title": "Maximum posts per Instagram source",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Safety limit passed to the official Instagram Scraper in convenience mode.",
            "default": 30
          },
          "searchLimit": {
            "title": "Instagram search result limit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum discovery results requested from the official Instagram Scraper.",
            "default": 20
          },
          "upstreamActorId": {
            "title": "Upstream Actor ID",
            "pattern": "^[A-Za-z0-9_.-]+([~/][A-Za-z0-9_.-]+)?$",
            "type": "string",
            "description": "Actor ID or username/actor-name. Used only in advanced upstream Actor mode."
          },
          "upstreamActorInput": {
            "title": "Upstream Actor input",
            "type": "object",
            "description": "JSON input passed to the selected upstream Actor. The Actor strips credential-like fields from diagnostics, but secrets should only be supplied in schema fields that the upstream Actor marks as secret."
          },
          "brandKeywords": {
            "title": "Brand keywords",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional brand names or handles to detect even when they are not tagged explicitly.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            }
          },
          "nicheKeywords": {
            "title": "Niche keywords",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "When supplied, only posts whose captions contain at least one niche keyword are analyzed.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            }
          },
          "minimumConfidence": {
            "title": "Minimum creator lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Return only creator intelligence rows scoring at or above this deterministic 0–100 threshold.",
            "default": 35
          },
          "requirePromoCode": {
            "title": "Require a promo code",
            "type": "boolean",
            "description": "Return only creators with at least one conservatively detected discount or promo code.",
            "default": false
          },
          "requireSponsorshipSignal": {
            "title": "Require commercial-content evidence",
            "type": "boolean",
            "description": "Exclude generic mentions and CTA-only posts that lack stronger sponsorship, promo, affiliate, or offer evidence.",
            "default": true
          },
          "maxSourceRecords": {
            "title": "Maximum source records",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard processing cap that bounds runtime and memory.",
            "default": 5000
          },
          "maxLeads": {
            "title": "Maximum creator results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard output cap. Highest-scoring creators are returned first.",
            "default": 500
          },
          "includeEvidencePosts": {
            "title": "Include compact evidence posts",
            "type": "boolean",
            "description": "Include up to 10 sanitized supporting posts per creator result.",
            "default": true
          },
          "debug": {
            "title": "Verbose diagnostics",
            "type": "boolean",
            "description": "Write additional non-secret diagnostics to the OUTPUT record.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}