{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Growth Tracker",
    "description": "Track public Instagram accounts over time. Monitor follower gains, following changes, posting activity, engagement trends, growth velocity, 7/30/90-day comparisons, milestones and alerts from stored historical snapshots. Built for scheduled runs.",
    "version": "1.0",
    "x-build-id": "F8ovNwukaH4M3YPUf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~instagram-growth-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-instagram-growth-tracker",
        "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/coregent~instagram-growth-tracker/runs": {
      "post": {
        "operationId": "runs-sync-coregent-instagram-growth-tracker",
        "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/coregent~instagram-growth-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-instagram-growth-tracker",
        "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": {
          "profiles": {
            "title": "Instagram profiles",
            "maxItems": 1000,
            "type": "array",
            "description": "Usernames, @handles or profile URLs to track (natgeo, @nasa, https://www.instagram.com/nasa/). Duplicates are removed. Up to 1,000 profiles per run. Post/Reel URLs are not accepted — this Actor tracks accounts.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "TRACK",
              "COMPARE",
              "SNAPSHOT"
            ],
            "type": "string",
            "description": "TRACK (default): compare with the previous observation and the comparison periods below. COMPARE: compare with every period (previous, 24h, 7d, 30d, 90d). SNAPSHOT: record current metrics only (creates the baseline, no growth calculations).",
            "default": "TRACK"
          },
          "trackerKey": {
            "title": "Tracker key",
            "type": "string",
            "description": "Project namespace for stored history, e.g. agency-client-a, competitor-monitor, creator-watchlist. The same profile tracked under two keys has two independent histories. Lowercase letters, digits, - and _ (other characters are replaced).",
            "default": "default"
          },
          "comparisonPeriods": {
            "title": "Comparison periods",
            "uniqueItems": true,
            "type": "array",
            "description": "Historical baselines to compare with in TRACK mode. A period is null until a stored observation exists inside its tolerance window (24h ±6h, 7d ±24h, 30d ±3d, 90d ±7d).",
            "items": {
              "type": "string",
              "enum": [
                "PREVIOUS",
                "24_HOURS",
                "7_DAYS",
                "30_DAYS",
                "90_DAYS"
              ],
              "enumTitles": [
                "Previous observation",
                "24 hours",
                "7 days",
                "30 days",
                "90 days"
              ]
            },
            "default": [
              "PREVIOUS",
              "7_DAYS",
              "30_DAYS"
            ]
          },
          "includeEngagementMetrics": {
            "title": "Include engagement metrics",
            "type": "boolean",
            "description": "Analyze recent public posts for average/median likes, comments, views and engagement rate, and track engagement growth. Billed with posting metrics as the recent-posts add-on, per block of up to 12 posts analyzed. Hidden likes are never counted as zero.",
            "default": true
          },
          "postsForEngagement": {
            "title": "Recent posts to analyze",
            "minimum": 1,
            "maximum": 48,
            "type": "integer",
            "description": "Up to how many of the most recent posts the engagement metrics use. Pinned posts are excluded, so slightly fewer may be analyzed. Billed per block of 12 (12 = one block, 24 = two). Common values: 12, 24.",
            "default": 12
          },
          "includePostingMetrics": {
            "title": "Include posting metrics",
            "type": "boolean",
            "description": "Latest post date, posts in the last 7 / 30 days, posts per week and per month. Uses recent posts, so it is billed as the recent-posts add-on (one block) when engagement metrics are off.",
            "default": true
          },
          "includeProfileMetadata": {
            "title": "Include profile metadata",
            "type": "boolean",
            "description": "Return full name, bio, category, external URL and profile picture URL. Profile changes are detected either way.",
            "default": true
          },
          "saveHistory": {
            "title": "Save history",
            "type": "boolean",
            "description": "Store this observation so future runs can compare with it. Turn off for a read-only check that compares with stored history without adding to it.",
            "default": true
          },
          "maxHistoryDays": {
            "title": "Baseline retention (days)",
            "minimum": 7,
            "maximum": 1095,
            "type": "integer",
            "description": "How far back snapshots are kept for baseline lookups in the latest-state store (older ones are thinned to one per day). The append-only history dataset keeps every observation regardless.",
            "default": 365
          },
          "minSnapshotIntervalMinutes": {
            "title": "Minimum snapshot interval (minutes)",
            "minimum": 0,
            "maximum": 10080,
            "type": "integer",
            "description": "A run within this many minutes of the last stored observation still returns a row, but does not add a history entry (protects against repeated or overlapping runs).",
            "default": 30
          },
          "growthAlertThresholdPct": {
            "title": "Alert: follower growth ≥ %",
            "type": "number",
            "description": "Flag the row (alertTriggered) when follower growth since the previous observation is at least this many percent, e.g. 5. Leave empty to disable."
          },
          "growthAlertThresholdAbsolute": {
            "title": "Alert: followers gained ≥",
            "minimum": 1,
            "type": "integer",
            "description": "Flag the row when the follower gain since the previous observation is at least this many followers, e.g. 10000. Leave empty to disable."
          },
          "dropAlertThresholdPct": {
            "title": "Alert: follower drop ≥ %",
            "type": "number",
            "description": "Flag the row when followers fell by at least this many percent since the previous observation (enter -3 or 3 for a 3% drop). Leave empty to disable. A SHARP_DECLINE trend and a new follower milestone always flag the row."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration. Defaults to Apify Proxy (datacenter) enabled, which rotates IPs between sessions to avoid Instagram's per-IP limits. Apify Residential is not supported — use Custom proxy URLs for your own residential provider.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum number of profiles fetched in parallel.",
            "default": 10
          },
          "maxRetries": {
            "title": "Max retries per profile",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many times a profile is retried on a fresh session/IP after rate limits, login walls or temporary Instagram errors. Profiles Instagram still throttles after the first retry are fetched from an alternative source instead. Not-found profiles are never retried, and a failed fetch never changes stored history.",
            "default": 3
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose logging.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}