{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Competitor Content: AI Winning Posts Finder",
    "description": "First 25 winning posts free. Instagram competitor content: pay per qualified post, junk never charged by us — outlier posts with why they won. MCP & AI agents. Free demo on any plan; live search runs on your Apify account, any plan that runs Store Actors.",
    "version": "0.1",
    "x-build-id": "cIOfUCyAhqHzEzu94"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rich_minds~ig-competitor-winning-posts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rich_minds-ig-competitor-winning-posts",
        "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/rich_minds~ig-competitor-winning-posts/runs": {
      "post": {
        "operationId": "runs-sync-rich_minds-ig-competitor-winning-posts",
        "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/rich_minds~ig-competitor-winning-posts/run-sync": {
      "post": {
        "operationId": "run-sync-rich_minds-ig-competitor-winning-posts",
        "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 to analyse",
            "type": "array",
            "description": "Competitor or niche Instagram accounts: usernames (<code>nike</code>), <code>@handles</code> or profile URLs, one per line — 3 to 10 work best. Typing here starts the <b>live search</b>: it runs the source scraper on your own Apify account (any plan that runs Store Actors) and costs about $0.001 per post read — the free demo does not search them.",
            "items": {
              "type": "string"
            }
          },
          "focusTopic": {
            "title": "Topic you care about (optional)",
            "type": "string",
            "description": "Plain words: what content you want to learn from, e.g. <i>coffee brewing tips for home baristas</i>. The AI weighs each winning post's relevance against it."
          },
          "brandDescription": {
            "title": "Your brand (for the remix brief)",
            "type": "string",
            "description": "One or two sentences about your brand or product. With the AI on, every winning post gets a remix brief: how you could adapt its idea. Empty = no remix brief."
          },
          "preset": {
            "title": "Start from a ready niche search (one click)",
            "enum": [
              "custom",
              "agency-3-clients",
              "coffee-brands",
              "fitness-brands",
              "skincare-brands"
            ],
            "type": "string",
            "description": "Pick a niche and press Start: it fills the search fields you left empty and runs the live search (spend-capped by <code>maxDiscoveryChargeUsd</code>). Your own values always win. <b>Custom</b> = fill the fields yourself.",
            "default": "custom"
          },
          "minScore": {
            "title": "Minimum score (0–100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "The field that decides what you pay: winning posts scoring below this are discarded and <b>not charged</b>. Score 45 ≈ 2× the profile's median, 70 ≈ 4×. Affects what you pay.",
            "default": 30
          },
          "maxQualified": {
            "title": "Max winning posts to output",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on results — and the ceiling of what <b>this Actor</b> charges: at most this many × $0.009 with AI on (× $0.0032 with AI off), e.g. 100 × $0.009; the source's own spend has its cap right below. The best-scoring winning posts are output first.",
            "default": 100
          },
          "maxDiscoveryChargeUsd": {
            "title": "Max source spend (USD)",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "Hard cap on what the source Actor run may charge your account in <b>actor</b> mode — $0.50 in the form and for an API or agent call that leaves it out, so a first real search can never cost more. Raise it for bigger searches.",
            "default": 0.5
          },
          "enableAi": {
            "title": "AI assessment",
            "type": "boolean",
            "description": "Score each winning post against your goal, explain why, summarise it and generate text. <b>On = $0.009 per qualified winning post + AI tokens; off = $0.0032</b> (rule-based flags and scores only). Your first 5 winning posts get live AI verdicts on any plan; every one with Apify model access or a paid own key.",
            "default": true
          },
          "notifyEmail": {
            "title": "E-mail me the new winning posts (optional)",
            "type": "string",
            "description": "After every run with at least one new winning post, the run's digest (how many are new, the top 10 with links) is e-mailed here through Apify's send-mail Actor. Schedule the run weekly (Actions → Schedule) and only the new winning posts come to your inbox — no Slack or Zapier needed. Never sent for the free demo."
          },
          "outlierMultiple": {
            "title": "Outlier multiple (× the profile's median)",
            "minimum": 1,
            "maximum": 20,
            "type": "number",
            "description": "A post wins when its likes + comments are at least this many times the profile's own median. 2 = twice as good as usual. Higher = fewer, stronger winners. Affects what you pay: only winners are charged.",
            "default": 2
          },
          "recentDays": {
            "title": "Only posts from the last N days",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "0 = any age. Applies to the winners only — the baseline always uses each profile's latest posts, so a short window never weakens it. A scheduled run uses the days since its last run. Affects what you pay.",
            "default": 30
          },
          "postsPerProfile": {
            "title": "Posts to read per profile",
            "minimum": 5,
            "maximum": 200,
            "type": "integer",
            "description": "How many of each profile's latest posts the source reads (minimum 5). More posts = a steadier median, but the source bills about $0.001 per post on your account: 10 profiles × 30 posts ≈ $0.30. Affects what you pay.",
            "default": 30
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Winners with fewer likes are dropped for free (not charged). 0 = no minimum. Affects what you pay.",
            "default": 0
          },
          "postTypes": {
            "title": "Post types",
            "type": "array",
            "description": "Keep only these formats: <code>reel</code>, <code>image</code>, <code>carousel</code>. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "reel",
                "image",
                "carousel"
              ],
              "enumTitles": [
                "Reels",
                "Images",
                "Carousels"
              ]
            }
          },
          "targetFlags": {
            "title": "Target flags (any of)",
            "type": "array",
            "description": "Only deliver winning posts that have at least one of these tags. An API call passes the flag names, e.g. <code>question_hook</code>, <code>reel_format</code>, <code>how_to_hook</code>, <code>cta_in_caption</code> (<code>questionHook</code> works too); the README's flag table lists them all. Leave empty to keep every winner. An unknown name stops the run at once with the list of valid ones.",
            "items": {
              "type": "string",
              "enum": [
                "viral_outlier",
                "reel_format",
                "carousel_format",
                "question_hook",
                "number_hook",
                "how_to_hook",
                "cta_in_caption",
                "long_caption",
                "short_caption",
                "hashtag_heavy",
                "collab_post",
                "verified_account",
                "weak_baseline"
              ],
              "enumTitles": [
                "Engagement at least 5x the profile's median",
                "A reel",
                "A carousel",
                "The caption opens with a question",
                "The caption opens with a number or a list (\"5 ways...\")",
                "The caption opens with a how-to",
                "The caption asks for an action (comment, save, share, follow, DM, link in bio)",
                "Caption of 300 characters or more",
                "Caption under 40 characters or none",
                "8 or more hashtags",
                "Co-authored with another account",
                "Posted by a verified account",
                "Fewer than 5 posts to build the profile's baseline from — treat the multiple with care"
              ]
            }
          },
          "suppressionList": {
            "title": "Exclude list",
            "type": "array",
            "description": "Usernames, post URLs or shortcodes to never output. Suppressed winning posts are skipped before any processing and never charged.",
            "items": {
              "type": "string"
            }
          },
          "llmProvider": {
            "title": "AI model access",
            "enum": [
              "apify",
              "byok"
            ],
            "type": "string",
            "description": "<b>Apify (no keys)</b> — the AI runs through Apify's built-in OpenRouter proxy; tokens are billed to your Apify account at OpenRouter's rates. <b>My own key</b> — use your OpenAI / Anthropic / Gemini / Groq key instead; a free-tier key assesses only a few winning posts per run — expect 1–3 AI checks (2 calls at a time, one after a rate limit, then the 3 borderline winning posts retried one by one) — and the rest keep their rule score; a paid Groq / Gemini key (billing on) assesses every winning post.",
            "default": "apify"
          },
          "llmModel": {
            "title": "AI model",
            "type": "string",
            "description": "Leave empty for the default: <code>anthropic/claude-haiku-4.5</code> through Apify, <code>google:gemini-3.5-flash-lite</code> with your own key (a free Gemini key works as is). Apify mode takes an OpenRouter slug such as <code>openai/gpt-4.1-mini</code>; own-key mode takes <code>provider:model</code>, e.g. <code>anthropic:claude-haiku-4-5-20251001</code> or <code>groq:openai/gpt-oss-120b</code>."
          },
          "llmApiKey": {
            "title": "Your API key (own-key mode only)",
            "type": "string",
            "description": "Required when <b>AI model access</b> is <i>My own API key</i>. Stored encrypted by Apify, never logged."
          },
          "aiCandidateMultiplier": {
            "title": "AI candidate pool (× max qualified)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many of the best rule-scored candidates get the AI pass, as a multiple of <b>Max qualified</b>. Higher = more thorough, slower, more tokens.",
            "default": 2
          },
          "sendAlertsTo": {
            "title": "Send alerts to (Slack, Discord, Teams, Google Chat, Telegram or webhook)",
            "type": "string",
            "description": "Paste one or more URLs, one per line — the service is detected from the address: a Slack or Discord channel webhook, a Teams Workflows or Google Chat space webhook, your Telegram bot's send link (<code>https://api.telegram.org/bot&lt;token&gt;/sendMessage?chat_id=@yourchannel</code>) or any other https URL (Zapier, Make, n8n, your CRM), which gets the winning posts as JSON. After every run with at least one new winning post, the digest (how many are new, the top 10 with links) is posted there. Never sent for the free demo. Headers, batching and signing: <i>Delivery details (advanced)</i>."
          },
          "dedupeAcrossRuns": {
            "title": "Never output the same winning post twice",
            "type": "boolean",
            "description": "Remembers every winning post you were charged for (in a named key-value store on your account) and skips it in future runs.",
            "default": true
          },
          "dedupeTtlDays": {
            "title": "Deliver a winning post again after (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "How long a delivered winning post stays remembered. 0 = never deliver or charge it again. A number of days lets a winning post that comes back (a seasonal peak, a relisted item) reach you again after that many days — charged again as a new winning post.",
            "default": 0
          },
          "historyDatasetName": {
            "title": "Keep a running log (dataset name)",
            "type": "string",
            "description": "Optional. Type a name (e.g. <code>ig-competitor-winning-posts-seen-log</code>) and every run appends its new winning posts with the date to that named dataset on your account — one list across months to connect to Google Sheets or your BI tool once. Empty = off. Costs nothing extra.",
            "default": ""
          },
          "sourceMode": {
            "title": "Where do the winning posts come from?",
            "enum": [
              "actor",
              "dataset",
              "list"
            ],
            "type": "string",
            "description": "<b>actor</b> — run <code>instagram-scraper/fast-instagram-post-scraper</code> on your account, billed separately. <b>dataset</b> — an existing Apify dataset. <b>list</b> — records you paste in. <b>Bring your own data:</b> rows or a dataset ID, and you pay only for the analysis — the source Actor is never run. The mode you choose always runs as chosen; only the untouched sample records next to a search you typed switch to the live search (spend-capped). <code>{}</code> over the API runs the free demo — nothing charged.",
            "default": "actor"
          },
          "autoSwitchToLive": {
            "title": "Typed search next to the sample starts the live search (API only)",
            "type": "boolean",
            "description": "API only — hidden on the form, where it stays on. On (default): search terms typed next to the untouched sample records start the live search (spend-capped; <code>OUTPUT.switchedToLive</code> names them). Off: the mode you send is the mode that runs — the sample stays the free demo and the status names the terms it did not search. API pipelines that must never start a paid read on their own: send <code>false</code>.",
            "default": true
          },
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "Only for <b>dataset</b> mode. Pick the dataset so the Actor is granted read access to it."
          },
          "itemsList": {
            "title": "Posts to process (paste your own)",
            "type": "array",
            "description": "Only for <b>list</b> mode. JSON array of posts in the source scraper's shape: <code>shortcode</code>, <code>caption</code>, <code>like_count</code>, <code>comment_count</code>, <code>date</code>, <code>user.username</code> … (README → List-mode rows). Needs at least 2 posts per profile."
          },
          "discoveryActorId": {
            "title": "Source Actor (advanced)",
            "type": "string",
            "description": "Actor used in <b>actor</b> mode. Any Actor whose output has the fields listed in the README works.",
            "default": "instagram-scraper/fast-instagram-post-scraper"
          },
          "discoveryInput": {
            "title": "Source Actor input",
            "type": "object",
            "description": "Only for <b>actor</b> mode. Extra input passed to the source Actor as-is (its <code>instagramUsernames</code> come from <b>Instagram profiles</b>; <code>postsPerProfile</code> from <b>Posts to read per profile</b>). The live search runs that Store Actor on your Apify plan — if your plan cannot run Store Actors, paste your own posts in <b>list</b> mode (any plan); <b>dataset</b> only for a dataset you already have from another account or tool."
          },
          "maxToProcess": {
            "title": "Max candidates to process",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Upper bound on how many winning posts are scored in one run (controls run time). Default = 3 × max winning posts."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "Qualified winning posts are POSTed here as JSON (Zapier, Make, n8n, your CRM). For Google Sheets / Slack you can also use Apify's built-in Integrations tab. Stored encrypted — Zapier / Make hook URLs carry their secret in the path."
          },
          "webhookHeaders": {
            "title": "Webhook headers (optional)",
            "type": "object",
            "description": "Extra HTTP headers for the webhook, e.g. <code>{\"Authorization\": \"Bearer …\"}</code>. Stored encrypted by Apify, never logged."
          },
          "webhookBatchSize": {
            "title": "Webhook batch size",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "1 = one POST per winning post the moment it is ready. Higher = one POST per N winning posts.",
            "default": 1
          },
          "webhookSecret": {
            "title": "Webhook signing secret (optional)",
            "type": "string",
            "description": "Any random string. Every webhook POST then carries <code>X-Signature: sha256=&lt;HMAC-SHA256 of the raw body with this secret&gt;</code>, so your endpoint can verify it came from this Actor. Stored encrypted by Apify, never logged."
          },
          "dedupeStoreName": {
            "title": "Dedupe store name",
            "type": "string",
            "description": "Key-value store used for cross-run memory. Left at the default, the memory is kept per search (source and search terms): rewording <code>focusTopic</code> keeps it, so a scheduled run never re-delivers what you already have, and another search starts its own list. Running it for several clients on one account, type one name per client.",
            "default": "ig-competitor-winning-posts-seen"
          },
          "discoveryTimeoutSecs": {
            "title": "Source run timeout, seconds (API only)",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "API only — hidden on the form. How long the source Store Actor may run before its partial results are used. Raise it when the status says the source stopped early.",
            "default": 3600
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Slack incoming-webhook URL for the digest."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Discord channel webhook URL for the digest."
          },
          "teamsWebhookUrl": {
            "title": "Microsoft Teams webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Teams Workflows webhook URL for the digest."
          },
          "googleChatWebhookUrl": {
            "title": "Google Chat webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Google Chat space webhook URL for the digest."
          },
          "telegramUrl": {
            "title": "Telegram sendMessage link (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. The bot's sendMessage link with its chat_id."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}