{
  "openapi": "3.0.1",
  "info": {
    "title": "SEO Keyword Research API - Serpstat Domain, SERP, Backlinks",
    "description": "SEO keyword research and domain analysis with the Serpstat API: search volume, CPC, keyword difficulty, intent, related keywords, suggestions, domain organic keywords, traffic, competitors, Google top 100 SERP, backlinks and referring domains. Bring your own key.",
    "version": "0.1",
    "x-build-id": "XfZ55WNinVvggdaY5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~seo-keyword-domain-research-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-seo-keyword-domain-research-api",
        "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/nabeelbaghoor~seo-keyword-domain-research-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-seo-keyword-domain-research-api",
        "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/nabeelbaghoor~seo-keyword-domain-research-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-seo-keyword-domain-research-api",
        "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": "What to get",
            "enum": [
              "domainsInfo",
              "domainKeywords",
              "domainCompetitors",
              "keywords",
              "relatedKeywords",
              "keywordSuggestions",
              "keywordsInfo",
              "keywordSerp",
              "backlinksSummary",
              "referringDomains",
              "creditBalance"
            ],
            "type": "string",
            "description": "Domain modes take domains: the SEO overview (keywords, traffic, visibility changes), the organic keywords a domain ranks for in Google top 100, its organic competitors, its backlink summary and its referring domains. Keyword modes take keywords: phrase-match keyword research, semantically related keywords, search suggestions, volume and CPC metrics for a keyword list, and the Google top 100 results. API credit balance reads how many Serpstat API credits you have left and costs nothing.",
            "default": "domainKeywords"
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Domain modes only. Domains to analyse, one per line, such as nike.com. A scheme, www. and any path are removed, except for the URL backlink scopes, which keep the path.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keyword modes only. Search phrases, one per line, such as running shoes. Keyword metrics sends up to 1000 keywords per call; the other keyword modes make one lookup per keyword.",
            "items": {
              "type": "string"
            }
          },
          "searchEngine": {
            "title": "Search engine database",
            "enum": [
              "g_af",
              "g_al",
              "g_dz",
              "g_as",
              "g_ad",
              "g_ao",
              "g_ai",
              "g_ag",
              "g_ar",
              "g_am",
              "g_aw",
              "g_au",
              "g_at",
              "g_az",
              "g_bh",
              "g_bd",
              "g_bb",
              "g_by",
              "g_be",
              "g_bz",
              "g_bj",
              "g_bm",
              "g_bt",
              "g_bo",
              "g_ba",
              "g_bw",
              "g_br",
              "g_io",
              "g_vg",
              "g_bn",
              "g_bg",
              "g_bf",
              "g_bi",
              "g_kh",
              "g_cm",
              "g_ca",
              "g_cv",
              "g_ky",
              "g_cf",
              "g_td",
              "g_cl",
              "g_cn",
              "g_cx",
              "g_co",
              "g_km",
              "g_ck",
              "g_cr",
              "g_ci",
              "g_hr",
              "g_cw",
              "g_cy",
              "g_cz",
              "g_cd",
              "g_dk",
              "g_dj",
              "g_dm",
              "g_do",
              "g_ec",
              "g_eg",
              "g_sv",
              "g_gq",
              "g_er",
              "g_ee",
              "g_et",
              "g_fk",
              "g_fo",
              "g_fm",
              "g_fj",
              "g_fi",
              "g_fr",
              "g_gf",
              "g_pf",
              "g_ga",
              "g_ge",
              "g_de",
              "g_gh",
              "g_gi",
              "g_gr",
              "g_gl",
              "g_gd",
              "g_gp",
              "g_gu",
              "g_gt",
              "g_gg",
              "g_gn",
              "g_gw",
              "g_gy",
              "g_ht",
              "g_hn",
              "g_hk",
              "g_hu",
              "g_is",
              "g_in",
              "g_id",
              "g_iq",
              "g_ie",
              "g_im",
              "g_il",
              "g_it",
              "g_jm",
              "g_jp",
              "g_je",
              "g_jo",
              "g_kz",
              "g_ke",
              "g_ki",
              "g_kw",
              "g_kg",
              "g_la",
              "g_lv",
              "g_lb",
              "g_ls",
              "g_lr",
              "g_ly",
              "g_li",
              "g_lt",
              "g_lu",
              "g_mo",
              "g_mk",
              "g_mg",
              "g_mw",
              "g_my",
              "g_mv",
              "g_ml",
              "g_mt",
              "g_mh",
              "g_mq",
              "g_mr",
              "g_mu",
              "g_yt",
              "g_mx",
              "g_md",
              "g_mc",
              "g_mn",
              "g_me",
              "g_ms",
              "g_ma",
              "g_mz",
              "g_mm",
              "g_na",
              "g_nr",
              "g_np",
              "g_nl",
              "g_nc",
              "g_nz",
              "g_ni",
              "g_ne",
              "g_ng",
              "g_nu",
              "g_nf",
              "g_mp",
              "g_no",
              "g_om",
              "g_pk",
              "g_pw",
              "g_ps",
              "g_pa",
              "g_pg",
              "g_py",
              "g_pe",
              "g_ph",
              "g_pn",
              "g_pl",
              "g_pt",
              "g_pr",
              "g_qa",
              "g_cg",
              "g_re",
              "g_ro",
              "g_ru",
              "g_rw",
              "g_sh",
              "g_kn",
              "g_lc",
              "g_pm",
              "g_vc",
              "g_ws",
              "g_sm",
              "g_st",
              "g_sa",
              "g_sn",
              "g_rs",
              "g_sc",
              "g_sl",
              "g_sg",
              "g_sx",
              "g_sk",
              "g_si",
              "g_sb",
              "g_so",
              "g_za",
              "g_kr",
              "g_es",
              "g_lk",
              "g_sr",
              "g_sz",
              "g_se",
              "g_ch",
              "g_tw",
              "g_tj",
              "g_tz",
              "g_th",
              "g_bs",
              "g_gm",
              "g_tl",
              "g_tg",
              "g_tk",
              "g_to",
              "g_tt",
              "g_tn",
              "g_tr",
              "g_tm",
              "g_tc",
              "g_tv",
              "g_vi",
              "g_ug",
              "g_ua",
              "g_ae",
              "g_uk",
              "g_us",
              "g_uy",
              "g_uz",
              "g_vu",
              "g_va",
              "g_ve",
              "g_vn",
              "g_wf",
              "g_ye",
              "g_zm",
              "g_zw",
              "bing_us"
            ],
            "type": "string",
            "description": "The Serpstat database (se) to read: Google for one country, or Bing US. Not used by the backlink modes or the credit balance.",
            "default": "g_us"
          },
          "withSubdomains": {
            "title": "Include subdomains",
            "type": "boolean",
            "description": "Domain organic keywords only. Include keywords that the domain's subdomains rank for.",
            "default": true
          },
          "withIntents": {
            "title": "Add search intent",
            "type": "boolean",
            "description": "Domain organic keywords, Keyword research, Related keywords and Keyword metrics. Adds the search intent of each keyword (informational, navigational, commercial, transactional). Serpstat documents intents for the g_us and g_ua databases.",
            "default": false
          },
          "intents": {
            "title": "Search intent",
            "type": "array",
            "description": "Domain organic keywords, Keyword research, Related keywords and Keyword metrics. Only keywords with at least one of these intents. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "informational",
                "navigational",
                "commercial",
                "transactional"
              ],
              "enumTitles": [
                "Informational",
                "Navigational",
                "Commercial",
                "Transactional"
              ]
            }
          },
          "minusKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Domain organic keywords, Keyword research and Keyword suggestions. Keywords to leave out of the results, one per line.",
            "items": {
              "type": "string"
            }
          },
          "keywordContains": {
            "title": "Keyword must contain",
            "type": "array",
            "description": "Domain organic keywords, Keyword research and Related keywords. Only keywords that contain all of these words (exact word match), up to 100.",
            "items": {
              "type": "string"
            }
          },
          "urlContains": {
            "title": "Ranking URL contains",
            "type": "string",
            "description": "Domain organic keywords only. Only keywords whose ranking page URL contains this text, such as /running/."
          },
          "volumeFrom": {
            "title": "Minimum search volume",
            "minimum": 0,
            "type": "integer",
            "description": "Domain organic keywords, Keyword research, Related keywords and Keyword metrics. Only keywords with at least this monthly search volume in the chosen database."
          },
          "volumeTo": {
            "title": "Maximum search volume",
            "minimum": 0,
            "type": "integer",
            "description": "Domain organic keywords, Keyword research, Related keywords and Keyword metrics. Only keywords with at most this monthly search volume."
          },
          "cpcFrom": {
            "title": "Minimum CPC (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Domain organic keywords, Keyword research, Related keywords and Keyword metrics. Only keywords with a cost per click of at least this, in US dollars."
          },
          "cpcTo": {
            "title": "Maximum CPC (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Domain organic keywords, Keyword research, Related keywords and Keyword metrics. Only keywords with a cost per click of at most this, in US dollars."
          },
          "difficultyFrom": {
            "title": "Minimum keyword difficulty",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Domain organic keywords, Keyword research and Related keywords. Only keywords with a difficulty of at least this (0 to 100)."
          },
          "difficultyTo": {
            "title": "Maximum keyword difficulty",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Domain organic keywords, Keyword research and Related keywords. Only keywords with a difficulty of at most this (0 to 100)."
          },
          "positionFrom": {
            "title": "Best position",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Domain organic keywords and Keyword SERP. Only rankings at this Google position or lower down (1 to 100)."
          },
          "positionTo": {
            "title": "Worst position",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Domain organic keywords and Keyword SERP. Only rankings at this Google position or higher up (1 to 100), such as 10 for page one."
          },
          "serpDepth": {
            "title": "SERP depth",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Keyword SERP only. How many of the top Google results to read for each keyword (1 to 100). Each result costs 1 Serpstat API credit.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort keywords by",
            "enum": [
              "default",
              "region_queries_count",
              "cost",
              "concurrency",
              "keyword_length",
              "found_results",
              "difficulty",
              "traff",
              "position"
            ],
            "type": "string",
            "description": "Domain organic keywords, Keyword research, Related keywords and Keyword metrics. The sort field. Domain organic keywords cannot sort by difficulty; traffic and position exist for domain organic keywords only.",
            "default": "default"
          },
          "competitorSort": {
            "title": "Sort competitors by",
            "enum": [
              "default",
              "relevance",
              "common",
              "all",
              "visibility",
              "missing"
            ],
            "type": "string",
            "description": "Domain organic competitors only. Serpstat applies this sort within each page.",
            "default": "default"
          },
          "refDomainSort": {
            "title": "Sort referring domains by",
            "enum": [
              "check",
              "domain_rank",
              "domain_links",
              "domain_from"
            ],
            "type": "string",
            "description": "Referring domains only.",
            "default": "check"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Applies to whichever sort the mode uses.",
            "default": "desc"
          },
          "backlinkScope": {
            "title": "Backlink scope",
            "enum": [
              "domain_with_subdomains",
              "domain",
              "url",
              "part_url"
            ],
            "type": "string",
            "description": "Backlink modes only. What part of the site to analyse. The summary works on domains only.",
            "default": "domain_with_subdomains"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. Serpstat also spends about 1 of your API credits per row (5 per domain overview or backlink summary), so keep this modest. Serpstat serves at most 60,000 rows of any one list.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pacing. Most Serpstat plans allow 1 request a second (60 a minute) and top plans 10 a second; a rate limit answer is waited out and retried.",
            "default": 60
          },
          "apiKey": {
            "title": "API token",
            "type": "string",
            "description": "Your own Serpstat API token, from your Serpstat profile (serpstat.com/users/profile). Stored as a secret and sent only as the token parameter to api.serpstat.com; it is never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}