{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Competitor Benchmark & Best-Time-To-Post",
    "description": "[ 1k/1.49$ ] Facebook Competitor Benchmark & Best-Time-To-Post compares your Page with 1-9 competitors: followers, posting frequency, engagement rate, content mix, top posts and hashtags, plus a day x hour best-time-to-post matrix with confidence level. Public data, no login.",
    "version": "0.1",
    "x-build-id": "fOtlI4g6WfvDbOvtj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alpha-scraper~facebook-competitor-benchmark-best-time-to-post/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alpha-scraper-facebook-competitor-benchmark-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/alpha-scraper~facebook-competitor-benchmark-best-time-to-post/runs": {
      "post": {
        "operationId": "runs-sync-alpha-scraper-facebook-competitor-benchmark-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/alpha-scraper~facebook-competitor-benchmark-best-time-to-post/run-sync": {
      "post": {
        "operationId": "run-sync-alpha-scraper-facebook-competitor-benchmark-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": {
          "ownPage": {
            "title": "Your Page",
            "type": "string",
            "description": "Your own Page: URL, @handle, vanity name or numeric id. It is the baseline for the benchmark gaps.",
            "default": "https://www.facebook.com/nike"
          },
          "competitors": {
            "title": "Competitor Pages",
            "minItems": 1,
            "maxItems": 9,
            "uniqueItems": true,
            "type": "array",
            "description": "Competitor Page URLs, @handles, vanity names or numeric ids (1-9 Pages). Only the first 10 Pages including yours are used.",
            "default": [
              "https://www.facebook.com/adidas",
              "https://www.facebook.com/puma"
            ],
            "items": {
              "type": "string"
            }
          },
          "timezone": {
            "title": "Time zone",
            "type": "string",
            "description": "IANA time zone name used for the day-of-week / hour-of-day matrix, for example America/New_York or Europe/Berlin. An unknown name falls back to UTC.",
            "default": "UTC"
          },
          "postsNewerThan": {
            "title": "Posts newer than",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only analyse posts published on or after this date (YYYY-MM-DD, UTC). The same window applies to all Pages. Leave empty for no date limit."
          },
          "minPostAgeHours": {
            "title": "Minimum post age",
            "minimum": 0,
            "type": "integer",
            "description": "Posts younger than this are left out of the best-time analysis.",
            "default": 24
          },
          "minPostsForRecommendation": {
            "title": "Min posts for recommendation",
            "minimum": 1,
            "type": "integer",
            "description": "Minimum number of eligible posts needed before a best-time recommendation is made. With fewer posts the output says there is too little data.",
            "default": 10
          },
          "includePosts": {
            "title": "Include posts",
            "type": "boolean",
            "description": "Also output every sampled post as its own 'post' record, in addition to the run summary, the per-Page metrics, the benchmark and the best-time records.",
            "default": false
          },
          "topPostsPerPage": {
            "title": "Top posts per Page",
            "minimum": 1,
            "type": "integer",
            "description": "How many of a Page's posts with the highest engagement are listed in its metrics record.",
            "default": 5
          },
          "postsPerPage": {
            "title": "Posts per Page",
            "minimum": 1,
            "type": "integer",
            "description": "Number of most recent posts analysed for every Page, yours and the competitors'. More posts give a more reliable benchmark and best-time matrix but need more requests (about one per 3 posts).",
            "default": 20
          },
          "workers": {
            "title": "Parallel Pages",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Number of Pages processed in parallel, each with its own client. Values above 4 are treated as 4.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}