{
  "openapi": "3.0.1",
  "info": {
    "title": "GRIN Alternative — Influencer Campaign Post Tracker",
    "description": "Track public Instagram, TikTok and YouTube campaign posts from supplied links. Export views, likes, comments, brief-rule checks, caption matches, saved-history changes and campaign totals.",
    "version": "0.2",
    "x-build-id": "2xLJeEyM7wrWyn6LH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~grin-alternative/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-grin-alternative",
        "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/khadinakbar~grin-alternative/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-grin-alternative",
        "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/khadinakbar~grin-alternative/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-grin-alternative",
        "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"
        ],
        "properties": {
          "postUrls": {
            "title": "Campaign post URLs",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Paste public Instagram post or reel, TikTok video, or YouTube video links (up to 500). Use full links; TikTok vm.tiktok.com and tiktok.com/t short links also work. Duplicate posts are checked once. Each run checks up to the number set in 'Maximum posts checked'.",
            "items": {
              "type": "string"
            }
          },
          "campaignName": {
            "title": "Campaign name",
            "maxLength": 120,
            "type": "string",
            "description": "A short name for your campaign. It is copied to every report and also names your saved history, so reusing the same name lets each run show what changed since the last run. It does not search for posts.",
            "default": "Campaign"
          },
          "campaignTerms": {
            "title": "Campaign caption terms",
            "maxItems": 20,
            "type": "array",
            "description": "Match up to 20 keywords, phrases, hashtags, or mentions in public captions and titles. Matching is case-insensitive with word boundaries. Empty terms disable campaign matching. Visual and spoken mentions are outside this check.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "matchMode": {
            "title": "Term matching rule",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Choose any to accept at least one term. Choose all to require every term. Matching uses public caption and title text. Missing matches do not prove a partnership was absent.",
            "default": "any"
          },
          "onlyMatches": {
            "title": "Export matching posts only",
            "type": "boolean",
            "description": "Export only posts matching the supplied campaign terms. All supplied URLs are still checked within the cap. Unmatched posts do not incur a report event. Leave off to audit both matching and nonmatching deliverables.",
            "default": false
          },
          "maxPosts": {
            "title": "Maximum posts checked",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many unique posts to check in one run, from 1 to 200. Extra links are left for another run and the summary says so. Duplicates do not count. Free Apify plans check at most 10 posts per run.",
            "default": 50
          },
          "feePerPostUsd": {
            "title": "Optional fee per post in USD",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Supply the same known creator fee for each post in this batch. A positive fee enables cost-per-thousand-public-views calculations. Zero leaves cost metrics unknown. This does not estimate revenue, reach, or attributed sales.",
            "default": 0
          },
          "previousSnapshots": {
            "title": "Optional previous post snapshots",
            "maxItems": 100,
            "type": "array",
            "description": "Optional. Earlier sourceUrl, collectedAt, views, likes, comments and shares records for the same posts (one past ISO timestamp per post). They replace saved history for those posts. Available counters are subtracted from today's counters and negative changes are kept.",
            "default": []
          },
          "briefRules": {
            "title": "Brief rules (optional)",
            "type": "object",
            "description": "Check each post against your creator brief. Every rule returns pass, fail or unknown, plus what is missing. Fields: requiredHashtags (list), requiredMentions (list), requireDisclosure (true or false, checks for #ad style terms or the platform paid-partnership label) and bannedTerms (list). Only public captions and titles are checked, not visuals or speech.",
            "default": {}
          },
          "saveHistory": {
            "title": "Save history for this campaign",
            "type": "boolean",
            "description": "When on, each run saves the public counters of the posts it reports into a store in your own account, named after the campaign. The next run with the same campaign name then shows views, likes, comments and shares changes automatically. Turn off for one-off checks. Counters you paste in 'Optional previous post snapshots' always take priority.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}