🔬 SERP-Based Keyword Clustering API

🏠 Back to Home

✨ This endpoint clusters keywords based on search engine results page (SERP) overlap.

📋 POST Parameters

  • 📊 serp_df: DataFrame containing SERP data in JSON format
  • 🔢 common_num: Minimum number of common URLs required (default: 4)
  • ⚙️ hard_clustering: Whether to use hard clustering (default: true)

📝 Response Format

The API returns a JSON object containing:

  • 📌 Keyword: List of keywords analyzed
  • 📄 Volume: Search volume for each keyword
  • 🔗 Cluster Name: Name of the cluster each keyword belongs to
  • 🔢 Number of Keywords in Cluster: Count of keywords in each cluster
  • 🌐 URLs: Comma-separated list of URLs associated with each keyword

Example Request

POST /sep-based-clustering/
{
    "serp_df": {
        "Keyword": ["seo tools", "keyword research", "backlink checker"],
        "Volume": [1000, 2000, 800],
        "URLs": [
            ["url1.com", "url2.com", "url3.com"],
            ["url2.com", "url3.com", "url4.com"],
            ["url5.com", "url6.com", "url7.com"]
        ]
    },
    "common_num": 4,
    "hard_clustering": true
}

Example Response

{
    "Keyword": ["seo tools", "keyword research", "backlink checker"],
    "Volume": [1000, 2000, 800],
    "Cluster Name": ["cluster1", "cluster1", "cluster2"],
    "Number of Keywords in Cluster": [2, 2, 1],
    "URLs": ["url1.com,url2.com,url3.com", "url2.com,url3.com,url4.com", "url5.com,url6.com,url7.com"]
}

Error Responses

  • 400: Invalid request format or missing parameters
  • 500: Internal server error during processing