---
updatedAt: 2025-08-12T08:38:20.000Z
agentTools:
  projectIndex: https://developer.spyfu.com/llms.txt
---

# Find Domains by Pattern and Metrics

Discovers domains matching wildcard patterns and performance criteria for lead generation and competitive prospecting. Use wildcards like `*car*` to find automotive domains or filter by traffic, budget, and ranking metrics to identify high-value prospects.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Domain Stats API",
    "version": "v2",
    "description": "Access comprehensive domain performance metrics and historical analytics to track search visibility trends, competitive positioning, and market share evolution over time. Powered by SpyFu's unmatched historical data collection spanning 18 years of continuous monitoring across both organic and paid search channels.\n\nSpyFu's Domain Stats API provides **18 years of complete historical data** for every tracked domain, built on a foundation of **1.6 trillion search results** and **152 million domains** analyzed for comprehensive performance metrics. Our database delivers **20x more paid keywords per domain** and **2x more organic keywords per domain** than SEMRush or Ahrefs. **Every domain metric updates every 15 seconds**, ensuring you have real-time performance intelligence across all 28 supported countries.\n\nWhile competitors provide basic domain snapshots with limited history, SpyFu offers complete domain timeline analysis with 18 years of historical data and live updates every 15 seconds. Our comprehensive tracking covers both organic and paid search performance since 2007, providing unmatched insight into long-term domain evolution.\n\nWith this API, you can track domain performance trends across SEO and PPC channels over time, analyze seasonal patterns and growth trajectories, benchmark domain performance against historical baselines, identify performance inflection points and strategy changes, monitor competitive domain performance evolution, and access complete domain visibility metrics spanning nearly two decades. Understand how domains have grown their search presence and learn from successful optimization strategies implemented over years.\n\nThe Domain Stats API integrates seamlessly with SpyFu's SEO Research, Ad History, and Competitors APIs to provide complete domain intelligence, enabling you to correlate performance metrics with specific keyword strategies and competitive activities.\n\nGet started with comprehensive API documentation and interactive examples at [SpyFu Developer Portal](https://developer.spyfu.com)."
  },
  "servers": [
    {
      "url": "https://api.spyfu.com/apis/domain_stats_api"
    }
  ],
  "paths": {
    "/v2/getMatchingDomains": {
      "get": {
        "operationId": "DomainStatsApi_GetMatchingDomains_GET",
        "summary": "Find Domains by Pattern and Metrics",
        "description": "Discovers domains matching wildcard patterns and performance criteria for lead generation and competitive prospecting. Use wildcards like `*car*` to find automotive domains or filter by traffic, budget, and ranking metrics to identify high-value prospects.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "A wildcard(*) used to find any domain that matches the pattern. `*blog*` will find any domain with the word blog appearing anywhere within it.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "*blog*"
              ]
            },
            "example": "*blog*"
          },
          {
            "name": "countryCode",
            "in": "query",
            "description": "Country to get results for.",
            "schema": {
              "type": "string",
              "examples": [
                "US"
              ],
              "default": "US",
              "enum": [
                "AR",
                "AT",
                "AU",
                "BE",
                "BR",
                "CA",
                "CH",
                "DE",
                "DK",
                "ES",
                "FR",
                "IE",
                "IN",
                "IT",
                "JP",
                "MX",
                "NL",
                "NO",
                "NZ",
                "PL",
                "PT",
                "SE",
                "SG",
                "TR",
                "UA",
                "UK",
                "US",
                "ZA"
              ]
            },
            "example": "US"
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Column to sort by.",
            "schema": {
              "type": "string",
              "examples": [
                "MonthlyOrganicClicks"
              ],
              "default": "MonthlyOrganicClicks",
              "enum": [
                "AverageAdRank",
                "AverageOrganicRank",
                "MonthlyBudget",
                "MonthlyOrganicClicks",
                "MonthlyOrganicValue",
                "MonthlyPaidClicks",
                "Strength",
                "TotalOrganicResults"
              ]
            },
            "example": "MonthlyOrganicClicks"
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Order to sort the results.",
            "schema": {
              "type": "string",
              "examples": [
                "Descending"
              ],
              "default": "Descending",
              "enum": [
                "Ascending",
                "Descending"
              ]
            },
            "example": "Descending"
          },
          {
            "name": "monthlyBudget.min",
            "in": "query",
            "description": "Minimum monthly ad budget filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                1000
              ]
            },
            "example": 1000
          },
          {
            "name": "monthlyBudget.max",
            "in": "query",
            "description": "Maximum monthly ad budget filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                50000
              ]
            },
            "example": 50000
          },
          {
            "name": "monthlyOrganicClicks.min",
            "in": "query",
            "description": "Minimum monthly organic traffic filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                10000
              ]
            },
            "example": 10000
          },
          {
            "name": "monthlyOrganicClicks.max",
            "in": "query",
            "description": "Maximum monthly organic traffic filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                500000
              ]
            },
            "example": 500000
          },
          {
            "name": "totalOrganicResults.min",
            "in": "query",
            "description": "Minimum organic keyword count filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                100
              ]
            },
            "example": 100
          },
          {
            "name": "totalOrganicResults.max",
            "in": "query",
            "description": "Maximum organic keyword count filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                10000
              ]
            },
            "example": 10000
          },
          {
            "name": "monthlyOrganicValue.min",
            "in": "query",
            "description": "Minimum organic traffic value filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                5000
              ]
            },
            "example": 5000
          },
          {
            "name": "monthlyOrganicValue.max",
            "in": "query",
            "description": "Maximum organic traffic value filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                100000
              ]
            },
            "example": 100000
          },
          {
            "name": "strength.min",
            "in": "query",
            "description": "Minimum domain strength score filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                30
              ]
            },
            "example": 30
          },
          {
            "name": "strength.max",
            "in": "query",
            "description": "Maximum domain strength score filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                90
              ]
            },
            "example": 90
          },
          {
            "name": "monthlyPaidClicks.min",
            "in": "query",
            "description": "Minimum monthly paid clicks filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                500
              ]
            },
            "example": 500
          },
          {
            "name": "monthlyPaidClicks.max",
            "in": "query",
            "description": "Maximum monthly paid clicks filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                100000
              ]
            },
            "example": 100000
          },
          {
            "name": "averageOrganicRank.min",
            "in": "query",
            "description": "Minimum average organic rank filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                1
              ]
            },
            "example": 1
          },
          {
            "name": "averageOrganicRank.max",
            "in": "query",
            "description": "Maximum average organic rank filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                50
              ]
            },
            "example": 50
          },
          {
            "name": "averageAdRank.min",
            "in": "query",
            "description": "Minimum average ad position filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                1
              ]
            },
            "example": 1
          },
          {
            "name": "averageAdRank.max",
            "in": "query",
            "description": "Maximum average ad position filter.",
            "schema": {
              "type": "number",
              "format": "float",
              "examples": [
                4
              ]
            },
            "example": 4
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The maximum number of rows returned.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "examples": [
                5
              ],
              "default": 5,
              "maximum": 10000,
              "minimum": 1
            },
            "example": 5
          },
          {
            "name": "startingRow",
            "in": "query",
            "description": "Row number to start the results with.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "examples": [
                1
              ],
              "default": 1,
              "maximum": 10000,
              "minimum": 1
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resultCount": {
                      "description": "Number of results returned",
                      "type": "integer",
                      "format": "int32",
                      "examples": [
                        1
                      ],
                      "readOnly": true
                    },
                    "totalMatchingResults": {
                      "description": "The total number of results available that matches the query including\r\nitems that might not be included in the returned results/page.",
                      "type": [
                        "integer",
                        "null"
                      ],
                      "format": "int64",
                      "readOnly": true
                    },
                    "results": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "domain": {
                            "description": "Searched domain",
                            "type": [
                              "string",
                              "null"
                            ],
                            "examples": [
                              "domain.com"
                            ]
                          },
                          "results": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "object",
                              "properties": {
                                "searchMonth": {
                                  "description": "Month when these domain statistics were collected (1-12).",
                                  "type": "integer",
                                  "format": "int32",
                                  "examples": [
                                    5
                                  ]
                                },
                                "searchYear": {
                                  "description": "Year when these domain statistics were collected.",
                                  "type": "integer",
                                  "format": "int32",
                                  "examples": [
                                    2021
                                  ]
                                },
                                "averageOrganicRank": {
                                  "description": "Average organic search ranking position across all keywords for this domain during the specified month.",
                                  "type": "number",
                                  "format": "double",
                                  "examples": [
                                    41.08
                                  ]
                                },
                                "monthlyPaidClicks": {
                                  "description": "Estimated monthly clicks received from paid search advertising across all keywords, calculated based on average ad positions and click-through rates.",
                                  "type": "number",
                                  "format": "double",
                                  "examples": [
                                    61181.88
                                  ]
                                },
                                "averageAdRank": {
                                  "description": "Average paid search ad position across all advertised keywords during the specified month.",
                                  "type": "number",
                                  "format": "double",
                                  "examples": [
                                    1.03
                                  ]
                                },
                                "totalOrganicResults": {
                                  "description": "Total number of unique organic keywords where this domain appears in the top 100 search results during the specified month.",
                                  "type": "integer",
                                  "format": "int32",
                                  "examples": [
                                    302731
                                  ]
                                },
                                "monthlyBudget": {
                                  "description": "Estimated monthly Google Ads spending based on keyword positions, click-through rates, and cost-per-click data across all paid campaigns.",
                                  "type": "number",
                                  "format": "double",
                                  "examples": [
                                    6721.39
                                  ]
                                },
                                "monthlyOrganicValue": {
                                  "description": "Estimated value of organic search traffic based on keyword rankings and equivalent cost-per-click values, representing the advertising spend equivalent of organic visibility.",
                                  "type": "number",
                                  "format": "double",
                                  "examples": [
                                    384233.16
                                  ]
                                },
                                "totalAdsPurchased": {
                                  "description": "Total number of unique paid keywords where this domain's ads appeared on the first page of search results, measured over the last 14 data collection periods.",
                                  "type": "integer",
                                  "format": "int32",
                                  "examples": [
                                    599
                                  ]
                                },
                                "monthlyOrganicClicks": {
                                  "description": "Estimated monthly organic search traffic clicks received from all ranking keywords during the specified month.",
                                  "type": "number",
                                  "format": "double",
                                  "examples": [
                                    290145
                                  ]
                                },
                                "strength": {
                                  "description": "Domain authority score (0-100) indicating competitive strength and ranking consistency across high-value keywords, with higher scores representing stronger market position.",
                                  "type": "integer",
                                  "format": "int32",
                                  "examples": [
                                    75
                                  ]
                                },
                                "totalInverseRank": {
                                  "description": "Cumulative ranking score where higher organic positions receive higher point values (position 1 = 100 points, position 2 = 99 points, etc.), summed across all ranking keywords.",
                                  "type": "integer",
                                  "format": "int64",
                                  "examples": [
                                    4971564
                                  ]
                                },
                                "areStatsNormalized": {
                                  "description": "Indicates whether the statistics have been normalized for consistent comparison across different time periods and data collection methods.",
                                  "type": "boolean",
                                  "examples": [
                                    true
                                  ]
                                }
                              },
                              "additionalProperties": false,
                              "description": "Represents comprehensive domain performance statistics for a specific month, including SEO and PPC metrics, traffic estimates, and competitive strength indicators."
                            }
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "User failed authorization"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "tags": [
          "Domain Stats API"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Basic_Authentication_Token": {
        "type": "http",
        "description": "<a href=\"https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side\" target=\"_blank\">Basic Authentication</a> is a standard that involves encoding your <code>SPYFU_API_ID:SECRET_KEY</code> into a Base64 string. Your <b>SpyFu API ID</b> and <b>Secret Key</b> can both be found under the <b><a href=\"https://www.spyfu.com/account/api\" target=\"_blank\">Account Settings -> API Usage</a></b> page. Additionally, you can find the Base64 string has been pre-generated on the same page under <b>Base 64 Key</b>. Finally, this encoded string is sent in the \"Authorization\" header prefixed with the keyword \"Basic\":<br>For example, to authorize as <code>00000000-0000-0000-0000-000000000000:AB12WXYZ</code> the client would send<br><pre><code>Authorization: <span class=\"token keyword\">Basic</span> <span class=\"token constructor-invocation class-name\">MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwOkFCMTJXWFla<span></code></pre>",
        "scheme": "basic"
      },
      "Query_Parameter_Token": {
        "type": "apiKey",
        "description": "An API key can be added as a query parameter. Your API key is listed as \"Secret Key\" found under the <b><a href=\"https://www.spyfu.com/account/api\" target=\"_blank\">Account Settings -> API Usage</a></b> page<br>For example, to authorize with the API key <code>AB12WXY</code><br><pre><code>/apis/example_api/GetExample?domain=spyfu.com<span class=\"token keyword\">&api_key=AB12WXYZ</span></code></pre>",
        "name": "api_key",
        "in": "query"
      },
      "HMAC_Authentication_Header": {
        "type": "apiKey",
        "description": "For even more security, each request can be individually authenticated with a timestamped <a href=\"https://en.wikipedia.org/wiki/HMAC\" target=\"_blank\"><b>HMAC</b></a> <em>(Hash Message Authentication Code)</em> signature. Composed of your secret key, a valid timestamp, the API request path, and all request parameters. <h3>Creating the signature:</h3><br>Combine the pieces that will be converted into the signature.<br><pre><code><span class=\"token keyword\">StringToSign</span> <span class=\"token operator\">=</span><br>&#x09;HTTP-Verb <span class=\"token operator\">+</span> <span class=\"token string\">\"\\n\"</span> <span class=\"token operator\">+</span><br>&#x09;Timestamp <span class=\"token operator\">+</span> <span class=\"token string\">\"\\n\"</span> <span class=\"token operator\">+</span><br>&#x09;UrlPath <span class=\"token operator\">+</span> <span class=\"token string\">\"\\n\"</span><br>&#x09;QueryParameters<span class=\"token operator\">;</span><br></code></pre><br>Create UTF-8 encodings of the above string and of your secret key.<br><pre><code><span class=\"token keyword\">byte</span><span class=\"token operator\">[]</span> SecretKeyBytes <span class=\"token operator\">=</span> <span class=\"token function\">UTF-8-Encoding-Of</span><span class=\"token operator\">(</span> Upper-Case-Of<span class=\"token operator\">(</span> SECRET_KEY <span class=\"token operator\">)</span> <span class=\"token operator\">)</span><span class=\"token operator\">;</span><br><span class=\"token keyword\">byte</span><span class=\"token operator\">[]</span> StringToSignBytes <span class=\"token operator\">=</span> <span class=\"token function\">UTF-8-Encoding-Of</span><span class=\"token operator\">(</span> StringToSign <span class=\"token operator\">)</span><span class=\"token operator\">;</span><br></code></pre><br>Use an implementation of HMAC256 using your UTF-8 secret key to encode the combined string of your request. This should then be converted to Base64 to finish creating your signature.<br><pre><code><span class=\"token keyword\">Signature</span> <span class=\"token operator\">=</span> <span class=\"token function\">Base64</span><span class=\"token operator\">(</span> <span class=\"token function\">HMAC-SHA256</span><span class=\"token operator\">(</span> SecretKeyBytes, StringToSignBytes <span class=\"token operator\">)</span> <span class=\"token operator\">)</span><span class=\"token operator\">;</span><br></code></pre><br><h3>Using the signature:</h3><br>This signature is then sent in through an Authentication header with your username.<br><pre><code>Authentication<span class=\"token operator\">:</span> <span class=\"token keyword\">UserName</span><span class=\"token operator\">:</span><span class=\"token invocation class-name\">Signature</span></code></pre>",
        "name": "Authentication",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Basic_Authentication_Token": []
    },
    {
      "Query_Parameter_Token": []
    },
    {
      "HMAC_Authentication_Header": []
    }
  ]
}
```