---
updatedAt: 2025-11-05T21:12:50.000Z
agentTools:
  projectIndex: https://developers.short.io/llms.txt
---

# Top values of specified column, ordered by clicks desc

Returns values and counts for specified column

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Statistics API",
    "version": "2"
  },
  "paths": {
    "/domain/{domainId}/top": {
      "post": {
        "summary": "Top values of specified column, ordered by clicks desc",
        "operationId": "postDomainDomainidTop",
        "description": "Returns values and counts for specified column",
        "parameters": [
          {
            "description": "Domain identifier",
            "x-constraint": {
              "sign": "positive"
            },
            "name": "domainId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Model28"
              }
            }
          }
        },
        "tags": [
          "domain"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "top response",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Model30"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://statistics.short.io/statistics"
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "For authentication you need an API key. You can find it in your\n                      [Integrations page](https://app.short.io/settings/integrations/api-key)\n                      "
      }
    },
    "schemas": {
      "CountriesFilter": {
        "type": "array",
        "description": "Return clicks from provided countries",
        "x-constraint": {
          "unique": true
        },
        "items": {
          "type": "string",
          "x-constraint": {
            "length": 2
          }
        }
      },
      "dt": {
        "type": "array",
        "x-constraint": {
          "length": 2
        },
        "items": {
          "type": "string",
          "format": "date"
        }
      },
      "BrowsersFilter": {
        "type": "array",
        "description": "Return clicks from provided browsers",
        "x-constraint": {
          "unique": true
        },
        "items": {
          "type": "string"
        }
      },
      "SocialsFilter": {
        "type": "array",
        "description": "Return clicks from provided social networks",
        "x-constraint": {
          "unique": true
        },
        "items": {
          "type": "string"
        }
      },
      "BrowserVersionsFilter": {
        "type": "array",
        "description": "Return clicks from provided browser versions",
        "x-constraint": {
          "unique": true
        },
        "items": {
          "type": "string"
        }
      },
      "StatusesFilter": {
        "type": "array",
        "description": "Return clicks with provided statuses",
        "items": {
          "type": "number"
        }
      },
      "PathsFilter": {
        "type": "array",
        "description": "Return clicks with provided paths",
        "items": {
          "type": "string"
        }
      },
      "ProtocolsFilter": {
        "type": "array",
        "description": "Return clicks with provided protocols",
        "items": {
          "type": "string"
        }
      },
      "ReferrerFilter": {
        "type": "array",
        "description": "Return clicks from provided referrers",
        "items": {
          "type": "string"
        }
      },
      "UTMSourceFilter": {
        "type": "array",
        "description": "Return clicks from provided utm sources",
        "items": {
          "type": "string"
        }
      },
      "UTMMediumFilter": {
        "type": "array",
        "description": "Return clicks from provided utm mediums",
        "items": {
          "type": "string"
        }
      },
      "UTMCampaignFilter": {
        "type": "array",
        "description": "Return clicks from provided utm campaigns",
        "items": {
          "type": "string"
        }
      },
      "period": {
        "type": "string",
        "description": "One of predefined time intervals. Select custom to provide custom dates",
        "default": "last30",
        "enum": [
          "custom",
          "today",
          "yesterday",
          "total",
          "week",
          "month",
          "lastmonth",
          "last7",
          "last30"
        ]
      },
      "Model24": {
        "type": "array",
        "description": "Return clicks with provided methods",
        "items": {
          "type": "string"
        }
      },
      "Model25": {
        "type": "object",
        "description": "Filter records by provided values",
        "properties": {
          "countries": {
            "$ref": "#/components/schemas/CountriesFilter"
          },
          "dt": {
            "$ref": "#/components/schemas/dt"
          },
          "browsers": {
            "$ref": "#/components/schemas/BrowsersFilter"
          },
          "human": {
            "type": "boolean",
            "description": "Returns human clicks only if true"
          },
          "socials": {
            "$ref": "#/components/schemas/SocialsFilter"
          },
          "browserVersions": {
            "$ref": "#/components/schemas/BrowserVersionsFilter"
          },
          "statuses": {
            "$ref": "#/components/schemas/StatusesFilter"
          },
          "paths": {
            "$ref": "#/components/schemas/PathsFilter"
          },
          "protos": {
            "$ref": "#/components/schemas/ProtocolsFilter"
          },
          "methods": {
            "$ref": "#/components/schemas/Model24"
          },
          "refhosts": {
            "$ref": "#/components/schemas/ReferrerFilter"
          },
          "utmSources": {
            "$ref": "#/components/schemas/UTMSourceFilter"
          },
          "utmMediums": {
            "$ref": "#/components/schemas/UTMMediumFilter"
          },
          "utmCampaigns": {
            "$ref": "#/components/schemas/UTMCampaignFilter"
          }
        }
      },
      "Model26": {
        "type": "array",
        "description": "Return clicks with provided methods",
        "items": {
          "type": "string"
        }
      },
      "Model27": {
        "type": "object",
        "description": "Exclude records with provided values",
        "properties": {
          "countries": {
            "$ref": "#/components/schemas/CountriesFilter"
          },
          "dt": {
            "$ref": "#/components/schemas/dt"
          },
          "browsers": {
            "$ref": "#/components/schemas/BrowsersFilter"
          },
          "human": {
            "type": "boolean",
            "description": "Returns human clicks only if true"
          },
          "socials": {
            "$ref": "#/components/schemas/SocialsFilter"
          },
          "browserVersions": {
            "$ref": "#/components/schemas/BrowserVersionsFilter"
          },
          "statuses": {
            "$ref": "#/components/schemas/StatusesFilter"
          },
          "paths": {
            "$ref": "#/components/schemas/PathsFilter"
          },
          "protos": {
            "$ref": "#/components/schemas/ProtocolsFilter"
          },
          "methods": {
            "$ref": "#/components/schemas/Model26"
          },
          "refhosts": {
            "$ref": "#/components/schemas/ReferrerFilter"
          },
          "utmSources": {
            "$ref": "#/components/schemas/UTMSourceFilter"
          },
          "utmMediums": {
            "$ref": "#/components/schemas/UTMMediumFilter"
          },
          "utmCampaigns": {
            "$ref": "#/components/schemas/UTMCampaignFilter"
          }
        }
      },
      "column": {
        "type": "string",
        "description": "column for the aggregation",
        "enum": [
          "path",
          "path_404",
          "method",
          "st",
          "proto",
          "human",
          "browser",
          "browser_version",
          "country",
          "city",
          "social",
          "refhost",
          "os",
          "utm_source",
          "utm_medium",
          "utm_campaign",
          "goal_completed",
          "ab_path"
        ]
      },
      "Model28": {
        "type": "object",
        "properties": {
          "include": {
            "$ref": "#/components/schemas/Model25"
          },
          "exclude": {
            "$ref": "#/components/schemas/Model27"
          },
          "period": {
            "$ref": "#/components/schemas/period"
          },
          "column": {
            "$ref": "#/components/schemas/column"
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "description": "Returns statistics for clicks after given date. Required if period is custom"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "Returns statistics for clicks before given date. Required if period is custom"
          },
          "limit": {
            "type": "number",
            "default": 10
          },
          "tz": {
            "type": "string",
            "description": "Timezone name",
            "default": "UTC"
          },
          "prefix": {
            "type": "string"
          }
        },
        "required": [
          "column"
        ]
      },
      "Model29": {
        "type": "object",
        "properties": {
          "score": {
            "type": "number",
            "description": "Number of clicks",
            "example": 1234
          },
          "column": {
            "type": "string",
            "description": "Value of the column",
            "example": "Chrome"
          },
          "displayName": {
            "type": "string",
            "description": "Display name of the column",
            "example": "United States"
          }
        },
        "required": [
          "score",
          "column",
          "displayName"
        ]
      },
      "Model30": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Model29"
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```