---
updatedAt: 2025-11-07T23:54:07.000Z
agentTools:
  projectIndex: https://developers.similarweb.com/llms.txt
---

# Country Rank - Total (Desktop & Mobile)

Returns Similarweb's monthly Country Rank for a given domain.

<Table>
  <thead>
    <tr>
      <th>
        Device
      </th>

      <th>
        Granularity
      </th>

      <th>
        Metrics
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        total: desktop and mobile combined
      </td>

      <td>
        monthly,\
        aggregated last 28 days\
        (no daily split)
      </td>

      <td>
        country rank
      </td>
    </tr>
  </tbody>
</Table>

To retrieve 'Last 28 days', remove the start\_date & end\_date parameters from the URL.

> 📘 Price
>
> **1 hit** per request OR **1 data credits** per [result](https://developers.similarweb.com/docs/data-credits-unpublished-whats-new-in-v40).

> ❗️
>
> Worldwide country filter is not currently supported.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "country-rank",
    "version": "4.0"
  },
  "servers": [
    {
      "url": "https://api.similarweb.com/v1/website/"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/{domain_name}/country-rank/country-rank": {
      "get": {
        "summary": "Country Rank - Total (Desktop & Mobile)",
        "description": "Returns Similarweb's monthly Country Rank for a given domain.",
        "operationId": "country-rank",
        "parameters": [
          {
            "name": "domain_name",
            "in": "path",
            "description": "Enter website of interest, without 'www.' or brackets {}.",
            "schema": {
              "type": "string",
              "default": "amazon.com"
            },
            "required": true
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Your Similarweb API key.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "Add_Your_API_KEY"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Start month (format: YYYY-MM)",
            "schema": {
              "type": "string",
              "default": "2023-01"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "End month (format: YYYY-MM)",
            "schema": {
              "type": "string",
              "default": "2023-03"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "Country filter, as a 2-letter ISO country code, or \"world\" for worldwide. To see the country filters you have access to, please refer to the Check Capabilities endpoint.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "us"
            }
          },
          {
            "name": "main_domain_only",
            "in": "query",
            "description": "[optional] Return values for the main domain only ('true'), or include also the subdomains ('false').",
            "schema": {
              "type": "string",
              "default": "false"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "[optional] Format in which the reply should be returned. Possible values: 'json' (default) or 'xml'.",
            "schema": {
              "type": "string",
              "default": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "VIEW EXAMPLE RESPONSE": {
                    "value": "{\n  \"meta\": {\n    \"request\": {\n      \"format\": \"json\",\n      \"domain\": \"cnn.com\",\n      \"start_date\": \"2023-01-01\",\n      \"end_date\": \"2023-03-31\",\n      \"country\": \"us\"\n    },\n    \"status\": \"Success\",\n    \"last_updated\": \"2023-05-31\"\n  },\n  \"country_rank\": [\n    {\n      \"date\": \"2023-01\",\n      \"country_rank\": 34\n    },\n    {\n      \"date\": \"2023-02\",\n      \"country_rank\": 34\n    },\n    {\n      \"date\": \"2023-03\",\n      \"country_rank\": 35\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "request": {
                          "type": "object",
                          "properties": {
                            "format": {
                              "type": "string",
                              "example": "json"
                            },
                            "domain": {
                              "type": "string",
                              "example": "cnn.com"
                            },
                            "start_date": {
                              "type": "string",
                              "example": "2023-01-01"
                            },
                            "end_date": {
                              "type": "string",
                              "example": "2023-03-31"
                            },
                            "country": {
                              "type": "string",
                              "example": "us"
                            }
                          }
                        },
                        "status": {
                          "type": "string",
                          "example": "Success"
                        },
                        "last_updated": {
                          "type": "string",
                          "example": "2023-05-31"
                        }
                      }
                    },
                    "country_rank": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "example": "2023-01"
                          },
                          "country_rank": {
                            "type": "integer",
                            "example": 34,
                            "default": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```