---
title: "Analytics | Top URLs"
description: "API Documentation"
url: "https://www.contentstack.com/docs/developers/apis/analytics-api/top-urls"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-06-02"
---

# Analytics | Top URLs

### Top URLs

**GET** `/analytics/v2/url?orgUid={organization_uid}&from={YYYY-MM-DD}&to={YYYY-MM-DD}&includeTotalCount={boolean_value}`

The Top URLs request gets you the number of requests made from your URLs for the given services.

Here’s how your response body would look like when you pass the jobId in the [Retrieve Data](/docs/developers/apis/analytics-api#retrieve-data) endpoint.

```
{
    "data": [
        {
            "url": "https://cdn.contentstack.io/v3/content_types?include_count=false",
            "type": "cdn",
            "count": "3"
        },
        {
            "url": "https://cdn.contentstack.io/v3/content_types/header/entries/blt63c1bee28ce24ab1?environment=development",
            "type": "cdn",
            "count": "1"
        },
        {
            "url": "https://cdn.contentstack.io/v3/global_fields",
            "type": "cdn",
            "count": "1"
        },
        {
            "url": "https://cdn.contentstack.io/v3/content_types/test_111222/entries?environment=development",
            "type": "cdn",
            "count": "1"
        }
    ],
    "urlDataSource": "athena",
    "meta": {
        "orgUid": "blt**************87",
        "from": "2024-01-31",
        "duration": "day",
        "to": "2024-03-31",
        "services": "[\"cdn\"]"
    },
    "uid": "0f****46-5ee9-4f38-9146-1f********8"
}
```

The response body provides a detailed summary of the number of requests made to various URLs over a specific period. Here’s a breakdown of the key elements:

*   url: The specific URL that was accessed.
*   type: The service type of the URL, such as "cdn".
*   count: The number of requests made to this URL.
*   urlDataSource: Indicates which data store served the request. This value is set by the environment and may differ between requests; it is informational only.

This data helps organizations monitor traffic, identify frequently accessed URLs, and optimize performance.

#### Query Parameters

- **orgUid** (required)
  Enter the UID of your Organization.
- **from** (required)
  Specify the start date for the required data. Use the following date format: YYYY-MM-DD. It cannot be in the future.
- **to** (required)
  Enter the end date for the required data. The date format should be: YYYY-MM-DD. It must be on or after the from date and cannot be in the future.
- **includeTotalCount** (optional)
  Set this parameter to true to include the total number of matching URLs in the response. If you also pass limit, the total is omitted from the response — request a page without limit to get it.
- **duration** (optional)
  Determines the granularity of the data. Accepted values are sec, minute, hour, day, week, month, year, and historic; any other value returns a 400 error. If you omit duration, the response is not broken down by date.
- **services** (optional)
  Specify the array of services for which you want statistics, such as: \["cma", "ui", "cdn", "graphql", "images", "assets", "automations", "launch"\]. Pass either a JSON array of service names, for example \["cdn","cma"\], or a single service name on its own, for example automations. A comma-separated list is not supported and returns no data.
- **apiKey** (optional)
  Enter the API key of the stack.
- **orderBy** (optional)
  Enter 1 to sort the response in ascending order by count or \-1 to sort it in descending order by count. By default, the value is set to \-1, which orders the response in descending order.
- **sortBy** (optional)
  Enter count to rank URLs by number of requests, or bandwidth to rank them by bandwidth consumed. Defaults to count.
- **limit** (optional)
  Specify the number of items you wish to fetch per request. This parameter must be passed together with skip; sending one without the other returns a 400 error. limit also has an upper bound set per environment — exceeding it returns a 400 error rather than a truncated result.
- **skip** (optional)
  Enter the number of items to skip. For example, a skip value of 10 will skip the first 10 items. This parameter must be passed together with limit; sending one without the other returns a 400 error.

#### Headers

- **authtoken** (required)
  Enter your authtoken.
  Default: `your_authtoken`

#### Sample Response

```json
{
    "jobId": "job_7******a-c**f-4**9-9**0-c**********6",
    "paginated": true
}
```