Get inspired at ContentCon. Learn more and register today
Get inspired at ContentCon. Learn more and register today
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. Analytics API
  4. Top URLs

Top URLs

markdownView as Markdown

Top URLs

GEThttps://app.contentstack.com/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 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.

Sample Response
Status|200 OK
1234
{
    "jobId": "job_7******a-c**f-4**9-9**0-c**********6",
    "paginated": true
}
Hide Parameters

Query Parameters

orgUidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
fromrequiredstring

Specify the start date for the required data. Use the following date format: YYYY-MM-DD. It cannot be in the future.

Example:

2024-01-31
torequiredstring

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.

Example:

2024-03-31
includeTotalCountoptionalstring

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.

Example:

true
durationoptionalstring

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.

Example:

day
servicesoptionalstring

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.

Example:

["cdn","cma"]
apiKeyoptionalstring

Enter the API key of the stack.

Example:

your_stack_api_key
orderByoptionalstring

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.

Example:

1
sortByoptionalstring

Enter count to rank URLs by number of requests, or bandwidth to rank them by bandwidth consumed. Defaults to count.

Example:

count
limitoptionalstring

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.

Example:

2
skipoptionalstring

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.

Example:

0

Headers

authtokenrequiredstring

Enter your authtoken.

Example:

your_authtoken