> For the complete documentation index, see [llms.txt](https://developer.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.mediarithmics.io/querying-your-data/activities-analytics-queries/use-cases.md).

# Use cases

## Number of active users

{% code title="Request object" %}

```
{
    "date_ranges": [
        {
            "start_date": "2021-09-26T00:00:00",
            "end_date": "2021-10-28T23:59:59"
        }
    ],
    "dimensions": [],
    "metrics": [
         {
            "expression": "users"
        }
    ]
}
```

{% endcode %}

{% code title="Response" %}

```
 "report_view": {
    "items_per_page": 100,
    "total_items": 1,
    "columns_headers": [
        "users"
    ],
    "rows": [
        [
            114353272
        ]
    ]
}
```

{% endcode %}

## Number of activities per day

{% code title="Request object" %}

```
{
    "date_ranges": [
        {
            "start_date": "2021-10-20T00:00:00",
            "end_date": "2021-10-28T23:59:59"
        }
    ],
    "dimensions": [
        {"name": "date_yyyymmdd"}
    ],
    "metrics": [
         {
            "expression": "sessions"
        }
    ]
}
```

{% endcode %}

{% code title="Response" %}

```
  "report_view": {
    "items_per_page": 100,
    "total_items": 9,
    "columns_headers": [
        "date_yyyymmdd",
        "sessions"
    ],
    "rows": [
        [
            "20211020",
            1372624
        ],
        [
            "20211021",
            1368085
        ],
        ...
    ]
}
```

{% endcode %}

## Values of a dimension

{% code title="Request object" %}

```
{
    "date_ranges": [
        {
            "start_date": "2021-10-20T00:00:00",
            "end_date": "2021-10-28T23:59:59"
        }
    ],
    "dimensions": [
        {"name": "type"}
    ],
    "metrics": [
    ]
}
```

{% endcode %}

{% code title="Response" %}

```
"report_view": {
    "items_per_page": 100,
    "total_items": 4,
    "columns_headers": [
        "type"
    ],
    "rows": [
        [
            "DISPLAY_AD"
        ],
        [
            "SITE_VISIT"
        ],
        [
            "USER_SCENARIO_NODE_ENTER"
        ],
        [
            "USER_SCENARIO_NODE_EXIT"
        ]
    ]
}
```

{% endcode %}

## Active users and the revenue per day per device form factor on a specific channel

{% code title="Request object" %}

```
{
    "date_ranges": [
        {
            "start_date": "2021-10-20T00:00:00",
            "end_date": "2021-10-28T23:59:59"
        }
    ],
    "dimensions": [
        {"name": "date_yyyymmdd"},
        {"name": "device_form_factor"}
    ],
     "dimension_filter_clauses": {
        "operator": "AND",
        "filters": [
            {
                "dimension_name": "channel_id",
                "operator": "EXACT",
                "not": false,
                "expressions": [
                    "666"
                ]
            }
        ]
    },
    "metrics": [
        {"expression": "users"},
        {"expression": "revenue"}
    ]
}
```

{% endcode %}

{% code title="Response" %}

```
"report_view": {
    "items_per_page": 100,
    "total_items": 54,
    "columns_headers": [
        "date_yyyymmdd",
        "device_form_factor",
        "users",
        "revenue"
    ],
    "rows": [
        [
            "20211020",
            "OTHER",
            141,
            222.74
        ],
        [
            "20211020",
            "PERSONAL_COMPUTER",
            821923,
            87656567.1
        ],
        [
            "20211020",
            "SMART_TV",
            11,
            null
        ]
        [
            "20211020",
            "SMARTPHONE",
            1901978,
            98435875.79
        ],
        ...
    ]
}
                
```

{% endcode %}

## More use cases

You can create any use case you want using the list of [dimensions and metrics](/querying-your-data/activities-analytics-queries/dimensions-and-metrics.md) that are available.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.mediarithmics.io/querying-your-data/activities-analytics-queries/use-cases.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
