{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Keywords API: Ranked Keywords, Positions & Traffic",
    "description": "See every Google keyword a competitor domain or page ranks for: position, URL, estimated traffic, search volume, CPC, keyword difficulty and intent. Up to 10,000 keywords per domain in 55 countries. $2 per 1,000 keywords + $0.03 per domain.",
    "version": "0.1",
    "x-build-id": "2fHVGMpsPyRmdcyir"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tessellate~competitor-ranked-keywords/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tessellate-competitor-ranked-keywords",
        "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/tessellate~competitor-ranked-keywords/runs": {
      "post": {
        "operationId": "runs-sync-tessellate-competitor-ranked-keywords",
        "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/tessellate~competitor-ranked-keywords/run-sync": {
      "post": {
        "operationId": "run-sync-tessellate-competitor-ranked-keywords",
        "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",
        "required": [
          "domains"
        ],
        "properties": {
          "domains": {
            "title": "Domains or page URLs",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Domains, subdomains or page URLs to analyze, e.g. [\"ahrefs.com\", \"blog.example.com\", \"example.com/pricing\"]. Up to 100 unique per run. https:// and www. are removed for domains; a URL with a path is analyzed as a single page. Invalid domains are returned with status invalid and are not billed; every other domain is billed one domain-lookup event.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "NZ",
              "IE",
              "IN",
              "PL",
              "UA",
              "CZ",
              "SK",
              "HU",
              "RO",
              "BG",
              "HR",
              "SI",
              "RS",
              "LT",
              "LV",
              "EE",
              "DE",
              "AT",
              "CH",
              "FR",
              "BE",
              "NL",
              "ES",
              "PT",
              "IT",
              "GR",
              "SE",
              "NO",
              "DK",
              "FI",
              "TR",
              "BR",
              "MX",
              "AR",
              "CO",
              "CL",
              "PE",
              "JP",
              "KR",
              "TW",
              "HK",
              "SG",
              "MY",
              "ID",
              "TH",
              "VN",
              "PH",
              "AE",
              "SA",
              "IL",
              "ZA"
            ],
            "type": "string",
            "description": "Two-letter uppercase ISO 3166-1 country code of the Google market, e.g. US, GB, DE, PL, JP or BR. Defaults to US. See the README for all 55 countries.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "pattern": "^([a-zA-Z]{2,3}(-[a-zA-Z]{2})?)?$",
            "type": "string",
            "description": "Optional language code. It must be one of the languages available for the selected country, e.g. en or es for the US, de, fr or it for Switzerland, zh-TW for Taiwan (Norwegian is nb). Leave empty to use the main language of the selected country."
          },
          "maxKeywordsPerDomain": {
            "title": "Max keywords per domain",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum ranked keywords returned (and billed) per domain, best first according to sortBy. 1 to 10,000. Keep it low for quick checks; AI agents usually need 20-100. The free Apify plan returns up to 50 for one domain.",
            "default": 100
          },
          "maxPosition": {
            "title": "Max Google position",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only return keywords where the domain ranks at this position or better, e.g. 10 for the first page, 3 for the top 3. 1 to 100.",
            "default": 100
          },
          "minSearchVolume": {
            "title": "Min monthly search volume",
            "minimum": 0,
            "type": "integer",
            "description": "Only return keywords with at least this many monthly Google searches, e.g. 100. 0 returns all.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "traffic",
              "searchVolume",
              "position"
            ],
            "type": "string",
            "description": "Which keywords come first and are kept when maxKeywordsPerDomain cuts the list: traffic (estimated monthly visits, default), searchVolume or position.",
            "default": "traffic"
          },
          "keywordStatus": {
            "title": "Keyword status",
            "enum": [
              "live",
              "lost",
              "all"
            ],
            "type": "string",
            "description": "live (default): keywords the domain ranks for now. lost: keywords it ranked for before but not at the last check, useful to find lost traffic. all: both, with isLost on every row.",
            "default": "live"
          },
          "resultTypes": {
            "title": "Result types",
            "type": "array",
            "description": "Which Google result types to include: organic (default), paid, featured_snippet, ai_overview_reference (pages cited in AI Overviews) and local_pack.",
            "items": {
              "type": "string",
              "enum": [
                "organic",
                "paid",
                "featured_snippet",
                "ai_overview_reference",
                "local_pack"
              ],
              "enumTitles": [
                "Organic results",
                "Paid ads",
                "Featured snippets",
                "Google AI Overview citations",
                "Local pack"
              ]
            },
            "default": [
              "organic"
            ]
          },
          "includeTrend": {
            "title": "Include 12-month trend",
            "type": "boolean",
            "description": "Adds monthlySearches with search volume for each of the last 12 months. Off by default to keep rows compact, recommended for AI agents and large lists.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}