{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Content Test Planner & Scraper",
    "description": "Compare two public Instagram feeds, see the posts behind a format test and score three pairs after publishing. Preview supplier costs or reuse saved feeds.",
    "version": "0.1",
    "x-build-id": "3XD3cUYUuHtSBH1yv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apifmcpfactory~htf-instagram-discovery/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apifmcpfactory-htf-instagram-discovery",
        "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/apifmcpfactory~htf-instagram-discovery/runs": {
      "post": {
        "operationId": "runs-sync-apifmcpfactory-htf-instagram-discovery",
        "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/apifmcpfactory~htf-instagram-discovery/run-sync": {
      "post": {
        "operationId": "run-sync-apifmcpfactory-htf-instagram-discovery",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Lookup type",
            "enum": [
              "experimentPlan",
              "experimentTrackSetup",
              "experimentTrackPost",
              "experimentTrackReport",
              "experimentTrackStop",
              "experimentScore",
              "publicPage",
              "directory",
              "professional",
              "ownedMedia",
              "hashtag",
              "importProfile",
              "publisherPost",
              "rankedFollowers",
              "profileReport",
              "mediaReport",
              "discoveryReport",
              "commentReport",
              "contentReport",
              "mentionsReport",
              "topicDiscoveryReport",
              "replyReport",
              "experimentCapture"
            ],
            "type": "string",
            "description": "Start with Plan a content test and two public handles. If the brief proposes a test, you can set up automatic checks and add each new post as you publish it. The other lookup types support account and post research.",
            "default": "directory"
          },
          "brandUsername": {
            "title": "Your brand’s Instagram handle",
            "type": "string",
            "description": "For Plan a content test, enter your brand handle or select its saved feed. To try the cost preview, use nasa."
          },
          "rivalUsername": {
            "title": "Rival’s Instagram handle",
            "type": "string",
            "description": "For Plan a content test, enter a different account or select its saved feed. Pair nasa with europeanspaceagency for the example preview. Verify the handle on the organisation’s own website."
          },
          "sourceAction": {
            "title": "Supplier action",
            "enum": [
              "preview",
              "collect"
            ],
            "type": "string",
            "description": "Preview estimates the cost without starting a supplier. Collect reads a selected saved feed or starts the chosen supplier on your Apify account within a positive spending cap.",
            "default": "preview"
          },
          "maxCollectionChargeUsd": {
            "title": "Maximum collector charge (USD)",
            "minimum": 0,
            "type": "number",
            "description": "For a new plan, this total supplier cap is divided between the account feeds that need collecting. For automatic setup, it is a per-post cap split between registration and the timed reading. Normal Apify run usage is separate. Zero keeps new paid collection off.",
            "default": 0
          },
          "experimentPostsPerAccount": {
            "title": "Posts to request per new account feed",
            "minimum": 6,
            "maximum": 100,
            "type": "integer",
            "description": "For Plan a content test, limit the posts requested for each new feed. The supplier may return fewer.",
            "default": 48
          },
          "brandContentDatasetId": {
            "title": "Your brand’s saved account feed",
            "type": "string",
            "description": "For Plan a content test, reuse a completed HTF account posts report in place of the brand handle."
          },
          "rivalContentDatasetId": {
            "title": "Rival’s account feed",
            "type": "string",
            "description": "For Plan a content test, choose a separate completed HTF Account posts or reels report for another account, also collected with Account feed (posts)."
          },
          "previousExperimentDatasetId": {
            "title": "Saved plan or latest score",
            "type": "string",
            "description": "For automatic checks, select the original ready plan dataset. After setup you can also use its Tracker ID. For manual scoring, choose the original plan for the first pair and the latest score dataset for later pairs."
          },
          "trackerId": {
            "title": "Tracker ID",
            "pattern": "^[A-Za-z0-9]{17}$",
            "type": "string",
            "description": "For adding links, reading the scorecard or stopping checks, use the ID returned by setup or select the original ready plan dataset."
          },
          "url": {
            "title": "Instagram URL or username",
            "type": "string",
            "description": "For Add a published post, paste one public post or reel link when you publish it. For other lookups, enter the profile, post, reel, public URL or username requested by that mode."
          },
          "pairNumber": {
            "title": "Topic pair (optional)",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "If the topics overlap, select pair 1, 2 or 3. When omitted, the post fills the first available pair for its verified format. Publish each format in the same topic order when using automatic pairing."
          },
          "trackingScheduleToken": {
            "title": "Scheduling token for this Actor (optional)",
            "type": "string",
            "description": "Leave this blank on your first setup. The Actor first checks whether your existing Apify access can schedule a reading. If setup reports a scheduling-permission issue, enter a dedicated scoped token with Create schedules and Run on this Actor here and repeat setup."
          },
          "slotId": {
            "title": "Scheduled post reference",
            "pattern": "^[A-Za-z0-9_-]{1,64}$",
            "type": "string",
            "description": "Set internally when the Actor schedules a like measurement."
          },
          "variantContentDatasetId": {
            "title": "Test-format post snapshot",
            "type": "string",
            "description": "For Score a content test, choose the HTF account feed snapshot containing the post in the format under test. The supplier must have returned its like count 70–74 hours after publication."
          },
          "controlContentDatasetId": {
            "title": "Comparison-format post snapshot",
            "type": "string",
            "description": "For Score a content test, choose the HTF account feed snapshot containing the comparison post. The supplier must have returned its like count 70–74 hours after publication."
          },
          "variantPostUrl": {
            "title": "Test-format post URL",
            "type": "string",
            "description": "For Score a content test, paste the Instagram post or reel link for the format under test in this pair."
          },
          "controlPostUrl": {
            "title": "Comparison-format post URL",
            "type": "string",
            "description": "For Score a content test, paste the Instagram post or reel link for the comparison format in this pair."
          },
          "replyDatasetId": {
            "title": "Saved Instagram comment thread",
            "type": "string",
            "description": "For a saved reply report, choose your completed dataset from Apify Instagram Comment Scraper containing replies. Enter its post URL and set Maximum items for the reply export. No new supplier run is started."
          },
          "reportAction": {
            "title": "Profile report action",
            "enum": [
              "preview",
              "reuse",
              "refreshMissing"
            ],
            "type": "string",
            "description": "Preview estimates the collector cost for your list. Reuse reads available saved observations. Refresh applies your age and undated-reading settings to decide which profiles need collection. Fresh collection requires a positive spending cap.",
            "default": "preview"
          },
          "currentDatasetId": {
            "title": "Saved profile dataset",
            "type": "string",
            "description": "Choose the dataset from a completed Apify Instagram Scraper profile details run or a previous HTF profile count report. Complete readings from an HTF report keep their original collection times when known. This optional selection grants read access."
          },
          "previousDatasetId": {
            "title": "Earlier comparison dataset",
            "type": "string",
            "description": "Choose an earlier Apify Instagram Scraper profile details dataset or HTF profile count report. Changes require two readings of the same account with known collection times in order. This optional selection grants read access."
          },
          "maxAgeHours": {
            "title": "Maximum age for a fresh reading (hours)",
            "minimum": 0,
            "maximum": 8760,
            "type": "integer",
            "description": "Refresh accepts a complete dated reading within this age. The default is 24 hours. Set zero to request fresh collection for every valid distinct profile, including profiles with selected undated readings.",
            "default": 24
          },
          "keepUndatedSelected": {
            "title": "Keep complete selected readings with an unknown date",
            "type": "boolean",
            "description": "When enabled and the age window is positive, a complete undated reading from either supported saved dataset can be reused. Its collection date stays unknown. Profiles with stale dated readings or missing counts still qualify for refresh.",
            "default": false
          },
          "contentSource": {
            "title": "Account feed source",
            "enum": [
              "socialscrape",
              "apify"
            ],
            "type": "string",
            "description": "For account posts or reels, SocialScrape supports either content type. Apify supports Account feed (posts) and manages its own paging. Selecting a saved Apify feed identifies Apify as the source."
          },
          "feedDatasetId": {
            "title": "Saved Apify Instagram feed",
            "type": "string",
            "description": "Optional for an account posts report. Select your Apify Instagram Scraper dataset containing post rows or a public profile with latest posts. Collect results reads it without a new supplier charge. Each source dataset and selected publication sample can contain up to 100 rows."
          },
          "contentType": {
            "title": "Account content to sample",
            "enum": [
              "posts",
              "reels"
            ],
            "type": "string",
            "description": "For an account posts or reels report, choose the public account feed or its reels.",
            "default": "posts"
          },
          "maxPages": {
            "title": "Maximum supplier pages",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "For SocialScrape account posts or reels, choose a limit from 1 to 5 pages. Search and comment reports use one page. With Apify Instagram Scraper, leave this at 1 and use Maximum items to cap results. Apify manages its own paging.",
            "default": 1
          },
          "query": {
            "title": "Search terms",
            "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029]+$",
            "minLength": 1,
            "maxLength": 120,
            "type": "string",
            "description": "Enter an account name or handle for account search. For a hashtag or place search, enter one phrase without commas, such as coffee or vintage shops in Copenhagen. Use 1–120 characters on one line."
          },
          "topicType": {
            "title": "What to discover",
            "enum": [
              "hashtag",
              "place"
            ],
            "type": "string",
            "description": "For Search hashtags or places, choose matching hashtag pages or public Instagram place pages. Results can include related terms.",
            "default": "hashtag"
          },
          "verifyEntityId": {
            "title": "Wikidata item for handle comparison",
            "pattern": "^Q[1-9][0-9]{0,14}$",
            "type": "string",
            "description": "Optional for the account search report. Enter the known entity’s Q ID, such as Q23548 for NASA. A matching Instagram username on that Wikidata revision supports the match. An absent or different username leaves the match inconclusive."
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For account content, tagged posts or hashtag and place discovery, choose 1–100 items. For account searches and comments, choose 1–20 items from one page. The default is 3. Supplier coverage and budget can limit results.",
            "default": 3
          },
          "includeRankedContext": {
            "title": "Include dated FastSocial follower counts",
            "type": "boolean",
            "description": "Add a separately attributed follower reading where the public FastSocial dataset covers the account. Check its date to see how recent it is.",
            "default": true
          },
          "mediaDatasetId": {
            "title": "Saved SocialScrape media dataset",
            "type": "string",
            "description": "For a Post or reel report, choose the dataset from a completed SocialScrape Instagram Scraper API run that contains the post or reel. This gives the report read access. You can use the dataset alone or with the publisher archive."
          },
          "includePublisherArchive": {
            "title": "Check the Catalonia publisher archive",
            "type": "boolean",
            "description": "For a Post or reel report, look for this URL in the Generalitat de Catalunya’s archive of participating government accounts. You can check this source on its own or alongside a saved SocialScrape dataset.",
            "default": false
          },
          "profileExport": {
            "title": "Saved profile observations",
            "type": "object",
            "description": "For an Apify Instagram details row, pass username and any measured counts in profile, with its UTC collection time in observedAt. For a FastSocial result from this Actor, pass the full row in profile and omit observedAt to keep its original observation date and attribution. Add previousProfile for an earlier reading from the same source and account. Include previousObservedAt only for Apify details rows."
          },
          "hashtag": {
            "title": "Hashtag",
            "type": "string",
            "description": "One hashtag. Meta limits each calling professional account to 30 unique tags per rolling seven days. Requires approved Instagram Public Content Access."
          },
          "order": {
            "title": "Hashtag results",
            "enum": [
              "recent",
              "top"
            ],
            "type": "string",
            "description": "Return up to 50 items from the first page.",
            "default": "recent"
          },
          "mediaLimit": {
            "title": "Recent media to include",
            "minimum": 0,
            "maximum": 25,
            "type": "integer",
            "description": "Professional lookup only. Choose zero to request profile counts alone.",
            "default": 12
          },
          "directUrls": {
            "title": "Instagram URLs or usernames",
            "type": "array",
            "description": "Use this list in place of the single input. For profile reports and FastSocial lookups, enter 1–50 usernames, @handles or profile URLs. Each input keeps its position. For public-page lookup, enter 1–50 page URLs.",
            "items": {
              "type": "string"
            }
          },
          "previousSnapshot": {
            "title": "Earlier public-page result",
            "type": "object",
            "description": "Optional. Supply the earlier output row for the same page to compare timestamped counts. Rounded and unavailable values have no exact delta."
          },
          "entityId": {
            "title": "Wikidata item",
            "type": "string",
            "description": "Public directory lookup uses a Wikidata item ID. Q23548 identifies NASA."
          },
          "accountId": {
            "title": "Authorized Instagram account ID",
            "type": "string",
            "description": "Caller account for a Meta lookup."
          },
          "metaAccessToken": {
            "title": "Your Meta access token",
            "type": "string",
            "description": "Encrypted for this run. Use a Facebook Login token for professional and hashtag lookup, or an Instagram Login token for owned media. Public page and directory lookups do not need a token."
          },
          "username": {
            "title": "Instagram username",
            "type": "string",
            "description": "For an account feed or tagged-post lookup, enter one public account’s username or supply its profile URL in the single URL field. Professional lookup accepts a business or creator username."
          },
          "mediaIds": {
            "title": "Owned media IDs",
            "type": "array",
            "description": "Up to 50 media IDs for the owned media lookup.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Include comments and replies",
            "type": "boolean",
            "description": "For owned media, request the first 10 comments and up to 5 replies per comment. Requires Instagram comment access. Each page indicates whether more results exist or coverage is unknown.",
            "default": false
          },
          "version": {
            "title": "Meta API version",
            "type": "string",
            "description": "Graph API version enabled for the calling app."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}