{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Viral Content Intelligence",
    "description": "Finds genuinely viral Instagram posts by normalizing for creator size, creator baseline and post age, and explains every score with deterministic evidence.",
    "version": "1.1",
    "x-build-id": "Fv502SRgtVMrPLYRr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/viralintelligence_ai~instagram-viral-content-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-viralintelligence_ai-instagram-viral-content-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/viralintelligence_ai~instagram-viral-content-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-viralintelligence_ai-instagram-viral-content-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/viralintelligence_ai~instagram-viral-content-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-viralintelligence_ai-instagram-viral-content-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": [
          "mode",
          "accounts"
        ],
        "properties": {
          "mode": {
            "title": "Analysis mode",
            "enum": [
              "account",
              "competitors"
            ],
            "type": "string",
            "description": "\"account\" analyses exactly one account. \"competitors\" compares 2-10 accounts.",
            "default": "competitors"
          },
          "accounts": {
            "title": "Instagram accounts",
            "type": "array",
            "description": "Usernames, @handles or profile URLs. Normalized and deduplicated automatically. Exactly 1 for \"account\" mode, 2-10 for \"competitors\".",
            "items": {
              "type": "string"
            }
          },
          "lookbackDays": {
            "title": "Lookback window (days)",
            "minimum": 1,
            "type": "integer",
            "description": "How far back to analyse. Posts older than this are excluded before scoring. Values above 365 are not rejected - they are automatically reduced to 365, and the run reports the adjustment.",
            "default": 30
          },
          "postsPerAccount": {
            "title": "Maximum posts per account",
            "minimum": 1,
            "type": "integer",
            "description": "Upper bound on posts retrieved per account. Also forms the creator baseline sample. Values above 200 are not rejected - they are automatically reduced to 200, and the run reports the adjustment.",
            "default": 50
          },
          "topResults": {
            "title": "Number of ranked results",
            "minimum": 1,
            "type": "integer",
            "description": "How many top-ranked viral posts to return. Values above 100 are not rejected - they are automatically reduced to 100, and the run reports the adjustment.",
            "default": 20
          },
          "intelligence": {
            "title": "V2 intelligence enrichment (opt-in, premium)",
            "type": "object",
            "description": "Optional. Leave disabled for pure V1 viral scoring, ranking and evidence at no extra charge - enabling this section never changes viralScore, classification, scoreConfidence or rank. When enabled, your top-ranked post(s) can additionally receive deeper AI-generated content and audience analysis, delivered strictly AFTER V1 scoring. Neither field below changes postsPerAccount or topResults.",
            "properties": {
              "enabled": {
                "title": "Enable V2 intelligence enrichment",
                "type": "boolean",
                "description": "Optional premium AI add-on. V1's deterministic viral scoring works fully without it. When ON, the post(s) selected via 'Maximum posts to enrich' below can receive deeper AI-generated content and audience analysis, built from comments and V1 evidence. Turning this ON does NOT by itself create any charge - you are billed $0.20 per post only once it is successfully enriched (final status AVAILABLE).",
                "editor": "checkbox",
                "default": false
              },
              "maxPosts": {
                "title": "Maximum posts to enrich",
                "type": "integer",
                "description": "Only your top-ranked post(s) are ever selected, and never more than V1 actually returned. This bounds how many posts can receive premium enrichment, and therefore bounds the maximum possible V2 charge for this run - additional to normal per-post analysis pricing. Examples: 1 enriched post = up to $0.20 V2 charge; 3 = up to $0.60; 5 = up to $1.00. Not every selected post is guaranteed to be charged: only a post that reaches a final AVAILABLE status is billable, never PARTIAL or UNAVAILABLE. Default 5, minimum 1, values above 20 are reduced to 20.",
                "editor": "number",
                "minimum": 1,
                "default": 5
              },
              "commentsPerPost": {
                "title": "Comments per post",
                "type": "integer",
                "description": "How many comments may be sampled per enriched post to help understand audience reactions. A larger sample can broaden the evidence available to the analysis, but also means more processing time - it does not guarantee a better result. Default 50, minimum 1, values above 100 are reduced to 100.",
                "editor": "number",
                "minimum": 1,
                "default": 50
              }
            },
            "additionalProperties": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}