{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Traffic Checker: Bulk Traffic History & Trends",
    "description": "Check website traffic history for up to 10,000 domains per run: monthly organic search traffic since 2015 from public website profiles plus the Chrome popularity tier, with month-over-month, year-over-year, 6-month trend and peak. $0.003 per domain with history.",
    "version": "0.1",
    "x-build-id": "hG12AICyYdV4rRxcM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automa-flow~website-traffic-history-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automa-flow-website-traffic-history-checker",
        "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/automa-flow~website-traffic-history-checker/runs": {
      "post": {
        "operationId": "runs-sync-automa-flow-website-traffic-history-checker",
        "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/automa-flow~website-traffic-history-checker/run-sync": {
      "post": {
        "operationId": "run-sync-automa-flow-website-traffic-history-checker",
        "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": {
          "targets": {
            "title": "Domains or URLs",
            "maxItems": 10000,
            "type": "array",
            "description": "Websites to check, one per line: example.com, https://www.example.com/page or blog.example.com. Scheme, path and www. are removed, subdomains are kept, duplicates are checked once. Up to 10,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{2,127}$",
            "type": "string",
            "description": "Read the domains from an Apify Dataset instead, for example a lead list from another Actor. The run gets read access to this Dataset only. In an integration, set it to {{resource.defaultDatasetId}}."
          },
          "targetField": {
            "title": "Domain column",
            "minLength": 1,
            "maxLength": 200,
            "type": "string",
            "description": "Column that holds the website. With the default domain, rows without it fall back to website and then url. Dot paths such as company.website work.",
            "default": "domain"
          },
          "datasetOffset": {
            "title": "Dataset offset",
            "minimum": 0,
            "type": "integer",
            "description": "Rows to skip before the first one read. A run reads up to 10,000 rows; RUN_SUMMARY.nextDatasetOffset says where the next run starts.",
            "default": 0
          },
          "months": {
            "title": "Months of history",
            "minimum": 1,
            "maximum": 144,
            "type": "integer",
            "description": "How many recent months to return, newest last. Public history starts in 2015, so a longer request returns what exists. Ignored when Date from is set.",
            "default": 12
          },
          "dateFrom": {
            "title": "Date from (yyyy-mm)",
            "pattern": "^(2015-(0[1-9]|1[0-2])|20(1[6-9]|[2-9][0-9])-(0[1-9]|1[0-2]))$",
            "type": "string",
            "description": "Optional first month, 2015-01 or later. Overrides Months of history."
          },
          "dateTo": {
            "title": "Date to (yyyy-mm)",
            "pattern": "^(2015-(0[1-9]|1[0-2])|20(1[6-9]|[2-9][0-9])-(0[1-9]|1[0-2]))$",
            "type": "string",
            "description": "Optional last month. Empty means the last finished month."
          },
          "includeTier": {
            "title": "Add the Chrome popularity tier",
            "type": "boolean",
            "description": "Adds the site's Chrome UX Report tier (top 1K ... 1M sites) for the latest month and once a year back to 2021. Sites without a public traffic profile then still get a TIER_ONLY row. Adds about 20 seconds per run.",
            "default": true
          },
          "outputFormat": {
            "title": "Output rows",
            "enum": [
              "wide",
              "long"
            ],
            "type": "string",
            "description": "wide: one row per domain with a months array and trend columns. long: one row per domain and month, ready for Google Sheets and charts.",
            "default": "wide"
          },
          "useCache": {
            "title": "Reuse profiles read in the last 7 days",
            "type": "boolean",
            "description": "Domains this account already checked in the last 7 days come from its cache: same data and price, faster, and the profile site is not asked again.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}