{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Keywords & Keyword Gap — Semrush/Ahrefs Alternative",
    "description": "Find the Google keywords your competitors rank for and you don't: one row per keyword with every competitor's position side by side, an opportunity score and quick wins. Also lists any site's ranked keywords and its organic competitors. 88 countries, pay per row.",
    "version": "0.0",
    "x-build-id": "ufW4scGctKZLTgsKP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~competitor-keywords/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-competitor-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/memo23~competitor-keywords/runs": {
      "post": {
        "operationId": "runs-sync-memo23-competitor-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/memo23~competitor-keywords/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-competitor-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": [
          "mode",
          "domain"
        ],
        "properties": {
          "mode": {
            "title": "What do you want to find?",
            "enum": [
              "gap",
              "rankings",
              "competitors"
            ],
            "type": "string",
            "description": "**Keyword gap** compares your site with up to 5 competitors and returns the keywords where they beat you, one row per keyword with every competitor's position side by side, scored and sorted by opportunity. **Rankings** lists the keywords each site ranks for, with position, traffic and keyword metrics. **Competitors** finds the sites that compete with yours in Google organic search.",
            "default": "gap"
          },
          "domain": {
            "title": "Your website",
            "type": "string",
            "description": "The site to analyse, as a domain (`moz.com`). Anything around it is removed: `https://www.moz.com/blog` becomes `moz.com`. In gap mode this is the site the competitors are compared against."
          },
          "competitorDomains": {
            "title": "Competitor websites",
            "type": "array",
            "description": "**Keyword gap:** up to 5 competitors to compare with. Leave it empty and the 3 sites that share the most keywords with yours are picked for you (the giants that share keywords with everyone, like YouTube and Reddit, are skipped). **Rankings:** extra sites to list rankings for, up to 24. **Competitors:** not used.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "us",
              "al",
              "dz",
              "ar",
              "am",
              "au",
              "at",
              "az",
              "bh",
              "bd",
              "be",
              "bo",
              "ba",
              "br",
              "bg",
              "kh",
              "cm",
              "ca",
              "cl",
              "co",
              "cr",
              "ci",
              "hr",
              "cy",
              "cz",
              "dk",
              "ec",
              "eg",
              "sv",
              "ee",
              "fi",
              "fr",
              "de",
              "gh",
              "gr",
              "gt",
              "hk",
              "hu",
              "in",
              "id",
              "ie",
              "il",
              "it",
              "jp",
              "jo",
              "kz",
              "ke",
              "lv",
              "lt",
              "my",
              "mt",
              "mx",
              "md",
              "ma",
              "nl",
              "nz",
              "ng",
              "mk",
              "no",
              "pk",
              "pa",
              "py",
              "pe",
              "ph",
              "pl",
              "pt",
              "ro",
              "sa",
              "sn",
              "rs",
              "sg",
              "sk",
              "si",
              "za",
              "kr",
              "es",
              "lk",
              "se",
              "ch",
              "tw",
              "th",
              "tn",
              "tr",
              "ua",
              "ae",
              "gb",
              "uy",
              "vn"
            ],
            "type": "string",
            "description": "The Google market to read rankings from. Only countries with ranking data are listed.",
            "default": "us"
          },
          "language": {
            "title": "Language",
            "enum": [
              "",
              "sq",
              "ar",
              "hy",
              "az",
              "bn",
              "bs",
              "bg",
              "zh-CN",
              "zh-TW",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "tl",
              "fi",
              "fr",
              "de",
              "el",
              "he",
              "hi",
              "hu",
              "id",
              "it",
              "ja",
              "ko",
              "lv",
              "lt",
              "mk",
              "ms",
              "nb",
              "pl",
              "pt",
              "ro",
              "ru",
              "sr",
              "sk",
              "sl",
              "es",
              "sv",
              "th",
              "tr",
              "uk",
              "ur",
              "vi"
            ],
            "type": "string",
            "description": "Leave on Auto to use the main language of the country. If the country has no rankings in the language you pick, its main language is used instead and the log says so.",
            "default": ""
          },
          "maxKeywords": {
            "title": "Maximum keywords",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "**Rankings:** keywords per site, highest traffic first. **Keyword gap:** gap keywords returned, best opportunities first (at least 50; a lower number is raised to 50). **Competitors:** competitors returned (at most 100). You pay per row, so this also caps the cost. Free Apify plan: 100.",
            "default": 500
          },
          "minSearchVolume": {
            "title": "Minimum monthly searches",
            "minimum": 0,
            "type": "integer",
            "description": "Skip keywords searched fewer times a month than this. Filtered before the data is fetched, so rows below it are never charged.",
            "default": 0
          },
          "maxCompetitorPosition": {
            "title": "Competitor must rank in the top",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "**Keyword gap only.** A keyword counts as a gap only when a competitor ranks at or above this position. 10 keeps page one, 20 keeps the first two pages.",
            "default": 20
          },
          "excludeBrandTerms": {
            "title": "Leave out brand keywords",
            "type": "boolean",
            "description": "Drop keywords that contain a site's own name, such as \"moz pro\" or \"semrush login\". Nobody can win those, so they only crowd the list. The name is taken from each domain.",
            "default": true
          },
          "includeQuickWins": {
            "title": "List quick wins first",
            "type": "boolean",
            "description": "**Keyword gap only.** Put keywords where you rank 11-20 and a competitor holds the top 3 at the top of the results. Every gap row has an `isQuickWin` flag either way.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}