{
  "openapi": "3.0.1",
  "info": {
    "title": "SEO Domain & Keyword Scraper  (Semrush Alternative)",
    "description": "SEMrush-alternative SEO data: domain overview, ranked keywords, keyword research, competitors & backlinks via the DataForSEO API.",
    "version": "1.0",
    "x-build-id": "zZeK6l1RNS0WufF3b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~seo-domain-keyword-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-seo-domain-keyword-scraper",
        "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/khadinakbar~seo-domain-keyword-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-seo-domain-keyword-scraper",
        "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/khadinakbar~seo-domain-keyword-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-seo-domain-keyword-scraper",
        "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": [
              "domain_overview",
              "ranked_keywords",
              "keyword_overview",
              "keyword_ideas",
              "competitors",
              "backlinks_summary"
            ],
            "type": "string",
            "description": "Which SEO dataset to pull. 'domain_overview' = traffic/keyword totals for a domain. 'ranked_keywords' = every keyword a domain ranks for. 'keyword_overview' = metrics for keywords you supply. 'keyword_ideas' = related keyword suggestions from seeds. 'competitors' = organic competitor domains. 'backlinks_summary' = backlink profile totals. Defaults to 'domain_overview'.",
            "default": "domain_overview"
          },
          "target": {
            "title": "Target domain",
            "type": "string",
            "description": "Domain to analyze, e.g. 'apple.com'. Used by domain_overview, ranked_keywords, competitors and backlinks_summary. Strip https:// and www — both are handled if present. NOT a keyword; for keyword modes use the 'keywords' field instead."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keyword phrases for 'keyword_overview' (metrics for these exact terms) or 'keyword_ideas' (suggestions seeded from these). Example: [\"seo tools\", \"keyword research\"]. Ignored by domain/competitor/backlink modes. Max 700 for overview, 200 for ideas.",
            "items": {
              "type": "string"
            }
          },
          "dataforSeoLogin": {
            "title": "DataForSEO API login (email)",
            "type": "string",
            "description": "Your DataForSEO API login — the email you registered with at https://app.dataforseo.com/api-access. DataForSEO API usage is billed on YOUR DataForSEO account, separate from Apify charges. Stored as a secret. NOT your Apify token."
          },
          "dataforSeoPassword": {
            "title": "DataForSEO API password",
            "type": "string",
            "description": "Your DataForSEO API password from https://app.dataforseo.com/api-access (the auto-generated API password, NOT your dashboard login password). Stored as a secret and never logged."
          },
          "locationCode": {
            "title": "Location code",
            "type": "integer",
            "description": "DataForSEO numeric location code for the market. 2840 = United States, 2826 = United Kingdom, 2124 = Canada, 2036 = Australia, 2356 = India. Defaults to 2840 (US). See DataForSEO locations endpoint for the full list.",
            "default": 2840
          },
          "languageCode": {
            "title": "Language code",
            "type": "string",
            "description": "Two-letter language code matching the location, e.g. 'en' (English), 'es' (Spanish), 'de' (German), 'fr' (French). Defaults to 'en'. Must be a language DataForSEO supports for the chosen location.",
            "default": "en"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum rows to return for list modes (ranked_keywords, keyword_ideas, competitors, keyword_overview). 1-1000. Ignored by report modes (domain_overview, backlinks_summary), which always return one record. Defaults to 100.",
            "default": 100
          },
          "includeSerpInfo": {
            "title": "Include SERP info",
            "type": "boolean",
            "description": "When true, keyword_overview and keyword_ideas also request SERP feature data from DataForSEO (raises DataForSEO cost on your key). Defaults to false. No effect on other modes.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}