{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Reel Trend Decay Radar",
    "description": "Track Instagram Reel momentum across scheduled snapshots. Detect breakouts, peaks, decay half-life, revivals, and forecast 24/72-hour views with evidence-backed confidence scores and action windows.",
    "version": "1.0",
    "x-build-id": "nNfILIpSYQokqRwHK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/chezsan770~instagram-reel-trend-decay-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-chezsan770-instagram-reel-trend-decay-radar",
        "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/chezsan770~instagram-reel-trend-decay-radar/runs": {
      "post": {
        "operationId": "runs-sync-chezsan770-instagram-reel-trend-decay-radar",
        "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/chezsan770~instagram-reel-trend-decay-radar/run-sync": {
      "post": {
        "operationId": "run-sync-chezsan770-instagram-reel-trend-decay-radar",
        "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": {
          "mode": {
            "title": "Collection mode",
            "enum": [
              "scrape",
              "analyzeSnapshots"
            ],
            "type": "string",
            "description": "Scrape calls a configurable extraction Actor. Analyze snapshots accepts metrics from any authorized source.",
            "default": "analyzeSnapshots"
          },
          "reelUrls": {
            "title": "Reel URLs",
            "type": "array",
            "description": "Individual public Instagram Reel URLs to monitor.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "profileUrls": {
            "title": "Profile URLs",
            "type": "array",
            "description": "Public profiles whose recent Reels should be monitored.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "snapshots": {
            "title": "Metric snapshots",
            "type": "array",
            "description": "Used in Analyze snapshots mode. Each object needs a URL/shortcode and cumulative views; aliases such as playCount, videoViewCount, likesCount, and commentsCount are accepted.",
            "default": [
              {
                "url": "https://www.instagram.com/reel/PULSEDECAY_DEMO/",
                "username": "pulsedecay_demo",
                "publishedAt": "2026-01-01T08:00:00.000Z",
                "collectedAt": "2026-01-01T09:00:00.000Z",
                "views": 1000,
                "likes": 80,
                "comments": 10,
                "followers": 15000
              },
              {
                "url": "https://www.instagram.com/reel/PULSEDECAY_DEMO/",
                "username": "pulsedecay_demo",
                "publishedAt": "2026-01-01T08:00:00.000Z",
                "collectedAt": "2026-01-01T10:00:00.000Z",
                "views": 2200,
                "likes": 170,
                "comments": 20,
                "followers": 15000
              },
              {
                "url": "https://www.instagram.com/reel/PULSEDECAY_DEMO/",
                "username": "pulsedecay_demo",
                "publishedAt": "2026-01-01T08:00:00.000Z",
                "collectedAt": "2026-01-01T11:00:00.000Z",
                "views": 5200,
                "likes": 390,
                "comments": 44,
                "followers": 15000
              }
            ]
          },
          "extractorActorId": {
            "title": "Extraction Actor ID",
            "type": "string",
            "description": "Actor called for live extraction. Override extractorInput when using a different Actor schema.",
            "default": "apify/instagram-scraper"
          },
          "extractorInput": {
            "title": "Extraction Actor input overrides",
            "type": "object",
            "description": "Advanced: merged over directUrls, resultsType=reels, and resultsLimit.",
            "default": {}
          },
          "maxReelsPerProfile": {
            "title": "Reels per profile",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum recent Reels requested for each profile.",
            "default": 30
          },
          "historyStoreName": {
            "title": "Persistent history store",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "type": "string",
            "description": "Named key-value store shared by scheduled runs. Keep this unchanged to preserve velocity history.",
            "default": "reel-trend-radar-history"
          },
          "persistHistory": {
            "title": "Persist cross-run history",
            "type": "boolean",
            "description": "Required for live velocity, decay, and revival detection across scheduled runs.",
            "default": true
          },
          "maxHistoryPoints": {
            "title": "Snapshots retained per Reel",
            "minimum": 3,
            "maximum": 500,
            "type": "integer",
            "description": "Caps storage and controls the maximum evidence trail.",
            "default": 120
          },
          "minSnapshotSpacingMinutes": {
            "title": "Minimum snapshot spacing",
            "minimum": 0,
            "maximum": 1440,
            "type": "integer",
            "description": "Near-duplicate observations are replaced to prevent noisy velocity estimates.",
            "default": 15
          },
          "alertSensitivity": {
            "title": "Alert sensitivity",
            "enum": [
              "conservative",
              "balanced",
              "aggressive"
            ],
            "type": "string",
            "description": "Controls how large a velocity increase must be before an acceleration alert is emitted.",
            "default": "balanced"
          },
          "includeRawSnapshots": {
            "title": "Include raw evidence",
            "type": "boolean",
            "description": "Embed normalized history in every output record. Disabled by default to keep datasets compact.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}