{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Domain Keywords & Traffic",
    "description": "Competitor keywords and domain traffic by country: the domain keywords a site ranks for on Google (ranked keywords with position, search volume, CPC, keyword difficulty, estimated traffic and search intent), or an organic traffic estimate. Up to 1,000 domains per run. Not affiliated with Google.",
    "version": "0.1",
    "x-build-id": "aozeYDmDLSDuJP7wb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datapulsehq~domain-keywords-traffic/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datapulsehq-domain-keywords-traffic",
        "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/datapulsehq~domain-keywords-traffic/runs": {
      "post": {
        "operationId": "runs-sync-datapulsehq-domain-keywords-traffic",
        "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/datapulsehq~domain-keywords-traffic/run-sync": {
      "post": {
        "operationId": "run-sync-datapulsehq-domain-keywords-traffic",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "rankedKeywords",
              "trafficOverview"
            ],
            "type": "string",
            "description": "<b>Ranked keywords</b>: one row per domain and keyword it ranks for in Google.<br><b>Traffic overview</b>: one row per domain with estimated organic and paid search traffic.",
            "default": "rankedKeywords"
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Up to 1,000 domains or URLs. https://, www. and paths are removed (https://www.hubspot.com/pricing becomes hubspot.com). Subdomains such as blog.hubspot.com are kept. Duplicates are removed and invalid entries are listed in the run summary. Users on the Apify free plan get the first 20 domains per run. If the field is left out, the Actor runs a small example: hubspot.com with up to 20 keywords.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Country name (e.g. 'United States'), two-letter code ('us') or location code (2840). Enter 'Worldwide' for data across all countries. Leave the field out for the United States; an empty value is rejected.",
            "default": "United States"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code (e.g. 'en') or name ('English'). Enter 'all' for keywords in every language; most useful together with location 'Worldwide'.",
            "default": "en"
          },
          "maxKeywordsPerDomain": {
            "title": "Max keywords per domain",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Ranked keywords mode: the highest-traffic keywords first, up to this many per domain. Users on the Apify free plan get at most 20 rows per run in total.",
            "default": 100
          },
          "minSearchVolume": {
            "title": "Minimum search volume",
            "minimum": 0,
            "type": "integer",
            "description": "Ranked keywords mode: only keywords with at least this many monthly searches.",
            "default": 0
          },
          "maxPosition": {
            "title": "Maximum position",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Ranked keywords mode: only keywords where the domain ranks at this position or better (10 = first page).",
            "default": 100
          },
          "includePositionDistribution": {
            "title": "Include position distribution",
            "type": "boolean",
            "description": "Traffic overview mode: add the number of keywords per position range (1, 2-3, 4-10, 11-20 ... 91-100) and new/up/down/lost counts. This needs one extra lookup per domain, so the run is slower.",
            "default": false
          },
          "useCache": {
            "title": "Use cache",
            "type": "boolean",
            "description": "Reuse results for the same domain and settings fetched in the last days (see cache age). Cached rows are delivered and charged like fresh rows.",
            "default": true
          },
          "cacheTtlDays": {
            "title": "Cache max age (days)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum age of cached results to reuse. The ranking data behind this Actor is refreshed about once a week.",
            "default": 7
          },
          "includeNoDataRows": {
            "title": "Output domains without data",
            "type": "boolean",
            "description": "Traffic overview mode: also output (free of charge) a row for domains without any data. They are always listed in the run summary.",
            "default": false
          },
          "pushSummaryToDataset": {
            "title": "Add summary row to dataset",
            "type": "boolean",
            "description": "Append the run summary as the last dataset item. Off by default; the summary is always saved in the key-value store as SUMMARY.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}