{
  "openapi": "3.0.1",
  "info": {
    "title": "Keyword Research API - Mangools KWFinder, SERP and Backlinks",
    "description": "Keyword research with the Mangools API: search volume with monthly history, CPC, keyword difficulty, related keywords, keywords a domain ranks for, competitors, Google SERP with DA, PA, Citation Flow and Trust Flow, backlinks and SiteProfiler domain authority. Bring your own key.",
    "version": "0.1",
    "x-build-id": "e6koXj7oxwKN4Krwh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~keyword-research-difficulty-serp-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-keyword-research-difficulty-serp-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~keyword-research-difficulty-serp-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-keyword-research-difficulty-serp-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~keyword-research-difficulty-serp-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-keyword-research-difficulty-serp-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": [
              "relatedKeywords",
              "keywordMetrics",
              "domainKeywords",
              "competitorDomains",
              "keywordDifficulty",
              "serpResults",
              "backlinks",
              "urlMetrics",
              "siteOverview",
              "backlinkProfile",
              "topContent",
              "siteCompetitors",
              "quotaLimits",
              "locationSearch"
            ],
            "type": "string",
            "description": "Keyword modes take keywords: related keyword ideas, metrics for your own keyword list, keyword difficulty with the SERP overview, and the full SERP with per-result SEO metrics. Domain modes take domains or URLs: the keywords a site ranks for, its organic competitors, backlinks, URL authority metrics and the SiteProfiler overview, backlink profile, top content and competitors. API quota and limits reads what is left on your Mangools plan, and location ID search finds the ID of a city or region; both are free.",
            "default": "relatedKeywords"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keyword modes only. Search phrases, one per line, such as running shoes. Related keywords, keyword difficulty and SERP results make one lookup per keyword; keyword metrics sends up to 200 keywords per lookup.",
            "items": {
              "type": "string"
            }
          },
          "targets": {
            "title": "Domains or URLs",
            "type": "array",
            "description": "Domain modes only. Domains, subdomains or URLs, one per line, such as mangools.com or https://mangools.com/blog/. They are sent as written.",
            "items": {
              "type": "string"
            }
          },
          "locationNames": {
            "title": "Location names",
            "type": "array",
            "description": "Location ID search only. Country, region or city names, one per line, such as New York. Each returns up to 100 matching locations with their IDs.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location (country)",
            "enum": [
              "0",
              "2012",
              "2024",
              "2032",
              "2051",
              "2036",
              "2040",
              "2031",
              "2048",
              "2050",
              "2056",
              "2068",
              "2076",
              "2100",
              "2854",
              "2116",
              "2120",
              "2124",
              "2152",
              "2170",
              "2188",
              "2384",
              "2191",
              "2196",
              "2203",
              "2208",
              "2218",
              "2818",
              "2222",
              "2233",
              "2246",
              "2250",
              "2276",
              "2288",
              "2300",
              "2320",
              "2344",
              "2348",
              "2356",
              "2360",
              "2372",
              "2376",
              "2380",
              "2392",
              "2400",
              "2398",
              "2404",
              "2428",
              "2440",
              "2458",
              "2470",
              "2484",
              "2504",
              "2104",
              "2528",
              "2554",
              "2558",
              "2566",
              "2807",
              "2578",
              "2586",
              "2591",
              "2600",
              "2604",
              "2608",
              "2616",
              "2620",
              "2642",
              "2682",
              "2686",
              "2688",
              "2702",
              "2703",
              "2705",
              "2710",
              "2410",
              "2724",
              "2144",
              "2752",
              "2756",
              "2158",
              "2764",
              "2788",
              "2792",
              "2804",
              "2784",
              "2826",
              "2840",
              "2858",
              "2862",
              "2704"
            ],
            "type": "string",
            "description": "Keyword modes and the domain keyword modes. The country for search volumes, CPC and SERPs, as a Google geotarget location ID. Anywhere gives global search volumes; SERP lookups read it as the United States.",
            "default": "2840"
          },
          "locationId": {
            "title": "Location ID (overrides the country)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Any Google geotarget location ID, such as a city (New York is 1023191) for local SERPs and search volumes. Find IDs with the location ID search mode. Domain keyword modes read a city or region as its country."
          },
          "language": {
            "title": "Language",
            "enum": [
              "0",
              "1019",
              "1056",
              "1020",
              "1038",
              "1017",
              "1018",
              "1039",
              "1021",
              "1009",
              "1010",
              "1000",
              "1043",
              "1042",
              "1011",
              "1002",
              "1001",
              "1022",
              "1027",
              "1023",
              "1024",
              "1026",
              "1025",
              "1004",
              "1005",
              "1012",
              "1028",
              "1029",
              "1102",
              "1013",
              "1064",
              "1030",
              "1014",
              "1032",
              "1031",
              "1035",
              "1033",
              "1034",
              "1003",
              "1015",
              "1044",
              "1037",
              "1036",
              "1041",
              "1040"
            ],
            "type": "string",
            "description": "Related keywords, keyword metrics and keyword difficulty. The Google Ads language of the keywords, or any language.",
            "default": "0"
          },
          "platform": {
            "title": "Device",
            "enum": [
              "1",
              "2"
            ],
            "type": "string",
            "description": "Keyword difficulty and SERP results. Read the desktop or the mobile Google results page.",
            "default": "1"
          },
          "organicOnly": {
            "title": "Organic results only",
            "type": "boolean",
            "description": "SERP results only. Keep only the organic results. Turn off to also get ads and SERP features (featured snippet, local pack, people also ask and more) as rows.",
            "default": true
          },
          "linkSource": {
            "title": "Backlinks to read",
            "enum": [
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Backlinks only. All live backlinks, recently found ones, or recently lost ones.",
            "default": "0"
          },
          "oneLinkPerDomain": {
            "title": "One backlink per referring domain",
            "type": "boolean",
            "description": "Backlinks only. Return one backlink from each referring domain instead of every backlink, which gives a referring domains list.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. Mangools also counts lookups against your plan: one per keyword, domain or keyword batch, and one backlink row per link returned (500 per page).",
            "default": 100
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own Mangools API key, from mangools.com/api-token. Stored as a secret and sent only in the x-access-token header to api.mangools.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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}