{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Brand Audit & 30-Day Content Plan",
    "description": "Audit your brand's Instagram vs competitors from an Instagram scraper run: what over-performs, best days and times, share of voice, then a 30-day content plan.",
    "version": "0.2",
    "x-build-id": "GcSxiV8lrFkNmP62Y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seasons-ai~instagram-brand-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seasons-ai-instagram-brand-audit",
        "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/seasons-ai~instagram-brand-audit/runs": {
      "post": {
        "operationId": "runs-sync-seasons-ai-instagram-brand-audit",
        "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/seasons-ai~instagram-brand-audit/run-sync": {
      "post": {
        "operationId": "run-sync-seasons-ai-instagram-brand-audit",
        "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": {
          "datasetId": {
            "title": "Instagram scraper dataset",
            "type": "string",
            "description": "Pick the dataset of your Instagram Scraper run (apify/instagram-scraper, results type Posts) or Instagram Profile Scraper run (apify/instagram-profile-scraper) on your brand account and your competitors' brand accounts. Through the API, pass the run's defaultDatasetId. The Actor only reads it. Leave empty to use Items or Items URL instead."
          },
          "items": {
            "title": "Items (fallback)",
            "type": "array",
            "description": "Posts as JSON in the Instagram Scraper format (url, type Image / Sidecar / Video, caption, hashtags, likesCount, commentsCount, timestamp, displayUrl or images, ownerUsername). Used when no dataset is picked. The prefill is a 6-post synthetic demo of two fictional shops."
          },
          "itemsUrl": {
            "title": "Items URL (fallback)",
            "type": "string",
            "description": "Link to a JSON or CSV export of an Instagram Scraper or Instagram Profile Scraper dataset (columns: post URL, type, caption, hashtags, likes, comments, timestamp, image URL, account). Used when neither a dataset nor items are given."
          },
          "ownAccount": {
            "title": "Your brand's Instagram handle",
            "type": "string",
            "description": "Your own account as it appears in the dataset (e.g. mybrand, without @). Every other account is treated as a competitor. The content plan is written for this account."
          },
          "brandBrief": {
            "title": "Brand brief",
            "type": "string",
            "description": "Who you are, what you sell, audience, tone of voice, goals and anything to avoid (up to 4,000 characters). Optional when your own account is in the dataset; the plan then learns your voice from your captions. Required for the plan when it is not."
          },
          "maxPosts": {
            "title": "Maximum posts to analyse",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on posts analysed in this run. When the input has more, the newest posts of each account are taken in turn so every account is represented. Each analysed post is one charge.",
            "default": 300
          },
          "analyzeImages": {
            "title": "Analyse the first image of each post",
            "type": "boolean",
            "description": "Labels the first image (photo, first carousel slide or video cover): product shot, lifestyle, UGC-style, text overlay, people present yes/no. People are never identified. Off = caption-only labels (same price).",
            "default": true
          },
          "includePinned": {
            "title": "Include pinned posts",
            "type": "boolean",
            "description": "Pinned posts are often old all-time hits and distort medians, so they are left out by default (not charged).",
            "default": false
          },
          "timezone": {
            "title": "Time zone",
            "type": "string",
            "description": "IANA time zone for best posting days and hours and for plan times, e.g. Europe/Berlin, America/New_York.",
            "default": "UTC"
          },
          "createPlan": {
            "title": "Write a 30-day content plan",
            "type": "boolean",
            "description": "A 30-day plan for your brand: date, time, format, content pillar, hook, caption draft, hashtags and visual brief per post, built from the winning patterns. One charge per plan. Off = audit only.",
            "default": true
          },
          "planStartDate": {
            "title": "Plan start date",
            "type": "string",
            "description": "First day of the 30-day plan (YYYY-MM-DD). Default: tomorrow in your time zone."
          },
          "postsPerWeek": {
            "title": "Posts per week",
            "minimum": 1,
            "maximum": 7,
            "type": "integer",
            "description": "How many posts per week the plan schedules. Empty = your current cadence (between 2 and 7), or 4 when your account is not in the data."
          },
          "language": {
            "title": "Plan language",
            "type": "string",
            "description": "Language of the plan, caption drafts and takeaways, e.g. English, German, Spanish.",
            "default": "English"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}