{
  "openapi": "3.0.1",
  "info": {
    "title": "Best Time to Post: Instagram, TikTok, YouTube & LinkedIn",
    "description": "Find the best time to post on Instagram, TikTok, YouTube and LinkedIn from real post data or your analytics CSV export: weekday x hour heatmap in your time zone, engagement rate, best format, caption and hashtag fit, 7-day posting schedule. $0.03 per account report.",
    "version": "0.1",
    "x-build-id": "XMWEMse7oa3RQxAap"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cygnix_labs~social-best-time-to-post/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cygnix_labs-social-best-time-to-post",
        "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/cygnix_labs~social-best-time-to-post/runs": {
      "post": {
        "operationId": "runs-sync-cygnix_labs-social-best-time-to-post",
        "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/cygnix_labs~social-best-time-to-post/run-sync": {
      "post": {
        "operationId": "run-sync-cygnix_labs-social-best-time-to-post",
        "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": {
          "instagramProfiles": {
            "title": "Instagram profiles",
            "type": "array",
            "description": "Public Instagram usernames or profile URLs (yours or competitors'). Example: natgeo, @natgeo or instagram.com/natgeo. 12 posts or fewer use only the profile scraper (about $0.0026 per account).",
            "items": {
              "type": "string"
            }
          },
          "tiktokProfiles": {
            "title": "TikTok profiles",
            "type": "array",
            "description": "Public TikTok usernames or profile URLs. Example: khaby.lame or tiktok.com/@khaby.lame",
            "items": {
              "type": "string"
            }
          },
          "youtubeChannels": {
            "title": "YouTube channels",
            "type": "array",
            "description": "YouTube handles or channel URLs. Example: @mkbhd or youtube.com/channel/UC... YouTube uses the free public channel feed (15 most recent uploads), so it adds no scraper cost.",
            "items": {
              "type": "string"
            }
          },
          "postsPerAccount": {
            "title": "Posts per account",
            "minimum": 5,
            "maximum": 500,
            "type": "integer",
            "description": "Most recent posts to analyze per account. Scraping is capped at 100 (YouTube feed: 15); your own exports can use up to 500. 12 or less = quick check: the first account in the run is free.",
            "default": 30
          },
          "timezone": {
            "title": "Your time zone",
            "type": "string",
            "description": "Posting times are reported in this zone. IANA names (America/New_York, Europe/London, Asia/Riyadh, Asia/Kolkata), offsets (UTC+3, GMT-5, +05:30), abbreviations (EST, PST, IST) and city names (Riyadh, New York) all work.",
            "default": "UTC"
          },
          "maxScraperSpendUsd": {
            "title": "Max scraper spend (USD)",
            "minimum": 0.05,
            "type": "number",
            "description": "Hard cap for the Instagram/TikTok scraper runs this actor starts on your account (billed by those scrapers, separate from our report fee). The log shows the estimate before anything runs.",
            "default": 1
          },
          "includeFollowers": {
            "title": "Fetch Instagram follower counts",
            "type": "boolean",
            "description": "Adds one profile lookup per Instagram account (about $0.0026 each) so engagement rate by followers can be computed. Always on for quick checks (12 posts or fewer), because that lookup also returns the posts.",
            "default": true
          },
          "csvText": {
            "title": "Or paste your analytics export (CSV)",
            "type": "string",
            "description": "Paste a CSV/TSV export from Instagram (Meta Business Suite), TikTok Studio, YouTube Studio, LinkedIn page analytics, Facebook, X or any sheet with a date/time column plus likes, comments, shares, saves, views, impressions or engagements. Headers are matched automatically; extra title rows and Total rows are skipped. JSON arrays also work."
          },
          "fileUrls": {
            "title": "Or CSV / JSON file URLs",
            "type": "array",
            "description": "Public links to CSV, TSV or JSON files. Google Sheets (shared as 'Anyone with the link'), Google Drive and Dropbox share links are converted to downloads automatically. Excel files: save as CSV first.",
            "items": {
              "type": "string"
            }
          },
          "dataPlatform": {
            "title": "Platform of your data",
            "enum": [
              "auto",
              "instagram",
              "tiktok",
              "youtube",
              "linkedin",
              "facebook",
              "x",
              "pinterest",
              "threads",
              "other"
            ],
            "type": "string",
            "description": "Used for your CSV/JSON rows when the file has no post links to detect it from.",
            "default": "auto"
          },
          "dataAccount": {
            "title": "Account name for your data",
            "type": "string",
            "description": "Label for your rows when the file has no username/account column. Example: mybrand"
          },
          "dataTimezone": {
            "title": "Time zone of the times in your file",
            "type": "string",
            "description": "Only for times without a zone (like 10/18/2026 14:05). Defaults to 'Your time zone'. Times with Z or +03:00 and Unix timestamps are always exact."
          },
          "datasetIds": {
            "title": "Or analyze existing Apify datasets",
            "type": "array",
            "description": "Datasets from apify/instagram-scraper, instagram-post-scraper, instagram-profile-scraper, clockworks/tiktok-profile-scraper / tiktok-scraper or streamers/youtube-scraper runs, or any dataset with a date column and engagement columns. No new scraping, no scraper cost."
          },
          "items": {
            "title": "Or post JSON",
            "type": "array",
            "description": "Post objects (scraper output or your own rows such as {\"date\":\"2026-10-18 14:05\",\"likes\":120,\"comments\":8}). For API and AI-agent use."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}