Skip to content

Explore pageviews

Releasev0.35.0 · cfeceb67

Watch it in action

Explore pageviews

Get daily pageview counts for an article or an entire Wikimedia project. The command uses the public Wikimedia Analytics API and does not need a wiki login.

Terminal window
mw analytics pageviews 'Albert Einstein' --project en.wikipedia.org --agent user

Dates are inclusive and use YYYYMMDD. The default range is the last 30 days through yesterday. Pick a fixed range when comparing output formats:

Terminal window
mw analytics pageviews 'Albert Einstein' --project en.wikipedia.org --agent user \
--start 20261001 --end 20261015 --output graph

Use the same query as structured data or CSV:

Terminal window
mw analytics pageviews 'Albert Einstein' --project en.wikipedia.org --agent user \
--start 20261001 --end 20261015 --output json
mw analytics pageviews 'Albert Einstein' --project en.wikipedia.org --agent user \
--start 20261001 --end 20261015 --output csv

Tables are shown in an interactive terminal; pipes receive JSON by default. Supported explicit formats are table, json, jq, csv and graph. TSV output is not currently available. Omit the article name to query project totals instead.


Read this guide offline with mw help guides analytics pageviews.

Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.