{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Watchdog",
    "description": "Real-time monitor for new & deleted posts, reels, stories, and profile changes.",
    "version": "0.0",
    "x-build-id": "FKHESHNcPitOTcwsg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/socialwatchdog~instagram-watchdog/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-socialwatchdog-instagram-watchdog",
        "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/socialwatchdog~instagram-watchdog/runs": {
      "post": {
        "operationId": "runs-sync-socialwatchdog-instagram-watchdog",
        "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/socialwatchdog~instagram-watchdog/run-sync": {
      "post": {
        "operationId": "run-sync-socialwatchdog-instagram-watchdog",
        "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": "Instagram Handle(s)",
            "maxItems": 5,
            "type": "array",
            "description": "Add up to 5 accounts to monitor (e.g. verge, leomessi).",
            "items": {
              "type": "string"
            }
          },
          "archiveMedia": {
            "title": "⬇️ Media Archiving (Photos, Reels & Stories)",
            "type": "boolean",
            "description": "Preserve high-resolution photos, reels, and stories for all newly detected uploads and deleted content.",
            "default": true
          },
          "customKvStoreName": {
            "title": "🍕 Name your storage for media. Unnamed key-value stores will be deleted after 7 days (or longer on paid plans)",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "type": "string",
            "description": "Name or ID of the Key-Value Store where the media files will be stored. Omit to store in the default watchdog store. Using a named Key-Value store bypasses the 7-day data retention limit and stores the content forever until manually deleted.<br><br>The name can consist of letters, digits, underscores, or hyphens without spaces."
          },
          "trackPosts": {
            "title": "Track Posts & Reels (Uploads & Deletions) 📸",
            "type": "boolean",
            "description": "Alert when a creator publishes a new photo or reel, or deletes/archives an existing post from their Page 1 feed (top 12 posts).",
            "default": true
          },
          "trackStories": {
            "title": "Track 24h Stories (100% of Active Stories) 📸",
            "type": "boolean",
            "description": "Alert when a creator posts a new 24h story or deletes a story early. Direct video & HD links included. 100% anonymous with zero viewer footprint.",
            "default": true
          },
          "trackReposts": {
            "title": "Track Reposts & Collaborations (Page 1 Surveillance) 🔄",
            "type": "boolean",
            "description": "Alert when a creator reshares content, joins a co-authored post, or removes an existing repost. Automatically maintains a high-speed Page 1 rolling memory window (top 12 reposts).",
            "default": true
          },
          "trackBio": {
            "title": "Track Bio & Link Updates ✏️",
            "type": "boolean",
            "description": "Alert when creator updates biography text or links.",
            "default": true
          },
          "trackAvatar": {
            "title": "Track Profile Picture Changes 🖼️",
            "type": "boolean",
            "description": "Alert and capture new profile picture uploads.",
            "default": true
          },
          "trackPrivacy": {
            "title": "Track Privacy Changes (Public / Private) 🔒",
            "type": "boolean",
            "description": "Alert when an account switches between Public and Private.",
            "default": true
          },
          "trackHandleChanges": {
            "title": "Track Handle / Username Changes 🏷️",
            "type": "boolean",
            "description": "Detect if an account changes their public Instagram handle.",
            "default": true
          },
          "trackLifecycle": {
            "title": "Track Deactivations & Reactivations ⚠️",
            "type": "boolean",
            "description": "Alert if an account is deactivated, banned, or restored.",
            "default": true
          },
          "trackFollowers": {
            "title": "Track Follower Count Changes 👥",
            "type": "boolean",
            "description": "Alert when an account gains or loses followers (default OFF to prevent noisy alerts).",
            "default": false
          },
          "minFollowerDelta": {
            "title": "Minimum Follower Delta to Alert",
            "type": "integer",
            "description": "Only trigger an alert if follower change reaches this number (e.g. 10 or 50).",
            "default": 10
          },
          "trackFollowing": {
            "title": "Track Following Count Changes",
            "type": "boolean",
            "description": "Alert on following count changes (followed/unfollowed).",
            "default": false
          },
          "resetBaseline": {
            "title": "Reset Baseline Snapshot",
            "type": "boolean",
            "description": "Clear previously stored memory and re-seed a fresh baseline snapshot for the specified accounts.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}