{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Keyword Research & Gap - SEO Competitor Analysis",
    "description": "SEO competitor analysis for any domain: every keyword it ranks for in Google with volume, difficulty, intent, position, ranking URL and traffic value, plus the keyword gap vs your site. Bulk domains in one run. Live native SEO data, no scraping. Semrush & Ahrefs alternative, pay per keyword.",
    "version": "0.0",
    "x-build-id": "1KNm9sFg9MMYA3Hiq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/doesaiknow~doesaiknow-competitor-keywords-apify/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-doesaiknow-doesaiknow-competitor-keywords-apify",
        "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/doesaiknow~doesaiknow-competitor-keywords-apify/runs": {
      "post": {
        "operationId": "runs-sync-doesaiknow-doesaiknow-competitor-keywords-apify",
        "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/doesaiknow~doesaiknow-competitor-keywords-apify/run-sync": {
      "post": {
        "operationId": "run-sync-doesaiknow-doesaiknow-competitor-keywords-apify",
        "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": "Competitor domains",
            "maxItems": 20,
            "type": "array",
            "description": "One or more competitor domains, e.g. `ahrefs.com`, `semrush.com`. Full URLs work too — scheme and path are stripped. Up to 20 domains per run; each domain is a separate report and is billed per delivered keyword. Free plans: 1 domain per run.",
            "items": {
              "type": "string"
            }
          },
          "target": {
            "title": "Competitor domain (legacy, single)",
            "type": "string",
            "description": "Legacy single-domain field kept for existing API integrations. Prefer `targets`. If both are set, the domain is merged into `targets`."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "ranked",
              "gap"
            ],
            "type": "string",
            "description": "`ranked` = every keyword the competitor ranks for. `gap` = compare the competitor against your own domain (set `compareToDomain`) to find keyword gaps — keywords they rank for where you rank worse or not at all.",
            "default": "ranked"
          },
          "compareToDomain": {
            "title": "Your domain (gap mode only)",
            "type": "string",
            "description": "Your own domain, e.g. `yoursite.com`. REQUIRED when `mode` = `gap`; ignored in `ranked` mode. Each row then carries both the competitor's rank and yours, plus a gap type (missing / weaker / stronger / tied)."
          },
          "maxKeywords": {
            "title": "Max keywords",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many keywords to return per domain (you are charged per delivered keyword). 1–5000. Default 1000; the demo prefill uses 200 for a fast first run. Free Apify plans are capped at 100 per run.",
            "default": 1000
          },
          "location": {
            "title": "Location / market",
            "enum": [
              "United States",
              "United Kingdom",
              "Canada",
              "Australia",
              "Germany",
              "France",
              "Spain",
              "Italy",
              "Poland",
              "Netherlands",
              "Brazil",
              "India",
              "Mexico",
              "Japan",
              "Sweden"
            ],
            "type": "string",
            "description": "Search market as a full location name. Drives Google search volume + SERP locale. Defaults to United States.",
            "default": "United States"
          },
          "language": {
            "title": "Language",
            "enum": [
              "English",
              "German",
              "French",
              "Spanish",
              "Italian",
              "Polish",
              "Dutch",
              "Portuguese",
              "Swedish",
              "Japanese"
            ],
            "type": "string",
            "description": "Result language as a full language name. Defaults to English. Pair with the matching location (e.g. location `Poland`, language `Polish`).",
            "default": "English"
          },
          "minVolume": {
            "title": "Minimum search volume",
            "minimum": 0,
            "type": "integer",
            "description": "Drop keywords with monthly search volume below this. 0 = no minimum (default).",
            "default": 0
          },
          "maxKeywordDifficulty": {
            "title": "Maximum keyword difficulty",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only keywords at or below this difficulty (0–100). 100 = no cap (default). Lower it (e.g. 20) to surface easy-to-rank opportunities.",
            "default": 100
          },
          "intentFilter": {
            "title": "Search intent filter",
            "type": "array",
            "description": "Keep only these search intents. Allowed values: `informational`, `commercial`, `transactional`, `navigational`. Leave empty for all intents.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "positionFrom": {
            "title": "SERP position from",
            "minimum": 1,
            "type": "integer",
            "description": "Lower bound on the competitor's Google rank (1 = top of page 1). Default 1.",
            "default": 1
          },
          "positionTo": {
            "title": "SERP position to",
            "minimum": 1,
            "type": "integer",
            "description": "Upper bound on the competitor's Google rank. Default 100. Set to 10 for page-1-only keywords.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}