{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram, Facebook & Threads Post Metrics Tracker",
    "description": "Track Instagram, Facebook and Threads post metrics over time. Put your post URLs on a schedule and every run returns likes, comments, shares, views and followers, plus the change since the last run and since the first. Export to CSV, Excel or JSON, or use the API.",
    "version": "0.1",
    "x-build-id": "DgIQXeeeWQxc4Toij"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sz022~social-post-metrics-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sz022-social-post-metrics-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/sz022~social-post-metrics-tracker/runs": {
      "post": {
        "operationId": "runs-sync-sz022-social-post-metrics-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/sz022~social-post-metrics-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-sz022-social-post-metrics-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",
        "required": [
          "postUrls",
          "trackerName"
        ],
        "properties": {
          "postUrls": {
            "title": "Post URLs",
            "minItems": 1,
            "maxItems": 5000,
            "type": "array",
            "description": "Public Instagram post and reel URLs, Threads post URLs and Facebook post, reel and video URLs, mixed freely in one list. Add or remove URLs between runs: a new URL starts its own history, and a removed one keeps its history in case it comes back. See the README for accepted URL shapes. Up to 5,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "trackerName": {
            "title": "Tracker name",
            "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38}[A-Za-z0-9])?$",
            "type": "string",
            "description": "Names the history this run reads and adds to, kept in a key-value store called post-tracker-{name}. Use one name per campaign so their histories never mix, and keep it the same on every run of the Schedule. Letters, digits and hyphens, up to 40 characters."
          },
          "writeHistoryDataset": {
            "title": "Also keep a history dataset for charting",
            "type": "boolean",
            "description": "Append every successful reading to a dataset called post-tracker-{name}-history, one row per post per run, so a chart of a post over time can be drawn from a single table. Off by default: the history itself is kept either way, and this dataset only grows.",
            "default": false
          },
          "maxSnapshotsPerPost": {
            "title": "Snapshots kept per post",
            "minimum": 2,
            "maximum": 10000,
            "type": "integer",
            "description": "How many readings of each post to keep. The first reading is always kept, so change since the first stays exact; the oldest of the rest are dropped beyond this. 1000 is almost three years of daily runs.",
            "default": 1000
          },
          "fetchFollowers": {
            "title": "Fetch follower counts",
            "type": "boolean",
            "description": "Look up the author's follower count, so follower growth is tracked too. This costs one extra request per account, so turn it off if you only need post metrics.",
            "default": true
          },
          "abortAfterConsecutiveFailures": {
            "title": "Stop after this many failures in a row",
            "minimum": 0,
            "type": "integer",
            "description": "Ends the run early when a platform stops responding, so a broken run cannot burn through your whole list. Deleted posts do not count. Set to 0 to never stop early.",
            "default": 5
          },
          "debugSaveHtml": {
            "title": "Save raw HTML on failure (debug)",
            "type": "boolean",
            "description": "Store the raw response of failed URLs in the run's key-value store. For diagnosing why a proxy or platform change broke extraction.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy for Instagram and Threads",
            "type": "object",
            "description": "For Instagram and Threads, which Apify's datacenter proxy reads fine. Residential and Google SERP proxy groups are not used here: the price per post is set for datacenter traffic, so a run that asks for them falls back to the datacenter proxy and says so in RUN_SUMMARY. Proxy URLs of your own are used as given.",
            "default": {
              "useApifyProxy": true
            }
          },
          "facebookProxyConfiguration": {
            "title": "Proxy for Facebook",
            "type": "object",
            "description": "Facebook serves a login wall to datacenter IPs, so it needs residential proxies. This only applies to Facebook URLs, so Instagram and Threads in the same run stay on the cheap proxy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}