{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Keyword Research Tool — SpyFu Alternative",
    "description": "Research competitor organic and paid keywords from a domain. Export ranking URLs, available ad copy, search metrics, estimated traffic and paid cost, plus competitor or backlink reports for SEO and PPC analysis.",
    "version": "0.3",
    "x-build-id": "d2ZKpIMTI9ZsJqRlf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~spyfu-alternative/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-spyfu-alternative",
        "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~spyfu-alternative/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-spyfu-alternative",
        "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~spyfu-alternative/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-spyfu-alternative",
        "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": [
              "ppc_report",
              "domain_overview",
              "organic_keywords",
              "paid_keywords",
              "competitors",
              "keyword_overview",
              "top_pages",
              "backlinks"
            ],
            "type": "string",
            "description": "Which SpyFu-style report to run. paid_keywords (default) lists a domain's Google Ads phrases with ad title, ad copy, estimated paid cost and top-of-page bids. ppc_report adds one summary row (paid keyword count, traffic, estimated ad spend, position buckets) before the keyword rows. domain_overview returns one row per domain with organic and paid estimates. organic_keywords lists ranking phrases. competitors lists overlapping domains. keyword_overview scores seed phrases. top_pages lists high-traffic URLs. backlinks lists referring URLs. This is NOT a SpyFu login or API key field.",
            "default": "paid_keywords"
          },
          "target": {
            "title": "Domain or URL",
            "type": "string",
            "description": "Website to analyze (shopify.com or https://www.shopify.com). Protocol and www are stripped except for page-level backlinks. For several domains use 'Domains' instead or in addition. Not a keyword and not a SpyFu app URL."
          },
          "targets": {
            "title": "More domains",
            "type": "array",
            "description": "Optional extra domains to run in the same job, up to 50 including the one above (Free plan: 1). Each domain pays its own request fee. Duplicates collapse.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Seed phrases for keyword_overview. Example: [\"shopify\"]. Duplicates collapse. Capped by maxResults. Ignored in domain modes. This is NOT a domain list.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "competitorChannel": {
            "title": "Competitor channel",
            "enum": [
              "both",
              "paid",
              "organic"
            ],
            "type": "string",
            "description": "Which search channel competitors mode uses. both (default) matches organic and paid overlap. paid is the SpyFu-style PPC rival list. organic is SEO-only overlap. Ignored in other modes. This is NOT a country field.",
            "default": "both"
          },
          "locationName": {
            "title": "Country",
            "type": "string",
            "description": "Country name for keyword and domain reports, such as United States or United Kingdom. Defaults to United States. Use the full country name, not a city. Ignored for backlinks mode.",
            "default": "United States"
          },
          "languageCode": {
            "title": "Language code",
            "type": "string",
            "description": "Language code matching the country, such as en, de, or es. Defaults to en. This is a short code, not a language name like English.",
            "default": "en"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum rows per domain (1-1000). Default 25. Free plan is capped at 25. If your Apify spending limit cannot cover the rows, the run lowers the row count up front and says so, instead of failing midway.",
            "default": 25
          },
          "includeSubdomains": {
            "title": "Include subdomains",
            "type": "boolean",
            "description": "When true, keyword and backlink summary include subdomain data. Defaults to true. Does not crawl the live website.",
            "default": true
          },
          "excludeTopDomains": {
            "title": "Exclude top domains (competitors)",
            "type": "boolean",
            "description": "When true, competitors mode drops giant generic sites so the list stays closer to real market rivals. Defaults to true. Ignored in other modes.",
            "default": true
          },
          "includeBacklinks": {
            "title": "Include backlink summary",
            "type": "boolean",
            "description": "domain_overview only. When true, adds backlink and referring-domain counts (costs two extra request fees). Default false.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}