Skip to content

mw analytics pageviews

Releasev0.35.0 · cfeceb67

Watch it in action

Explore pageviews
mw analytics pageviews [article] [flags]

Get pageview counts for an article, or omit the article for project totals. Dates are inclusive. All agents, including bots, are included by default; use –agent user for human traffic.

--access <string>
Access method: all-access, desktop, mobile-web, or mobile-app Default: all-access.
--agent <string>
Traffic agent: all-agents, user, spider, or automated Default: all-agents.
--end <string>
End date in YYYYMMDD format (default: yesterday)
--format <string>
Format the specified output
--granularity <string>
Data granularity: daily or monthly Default: daily.
--graph-width <int>
Graph width in columns (0 detects the terminal; otherwise 24–1000)
-o, --output <string>
Output format (csv|graph|jq|json|table) Default: auto.
--project <string>
Wikimedia project host, for example en.wikipedia.org or commons.wikimedia.org Default: en.wikipedia.org.
--start <string>
Start date in YYYYMMDD format (default: 30 days ago)
--timeout <duration>
HTTP request timeout Default: 20s.
--help
Help for this command
--no-interaction
Do not ask any interactive questions
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
Terminal window
mw analytics pageviews --project en.wikipedia.org
mw analytics pageviews 'Main Page' --project en.wikipedia.org
mw analytics pageviews 'Wikidata' --project en.wikipedia.org --start 20261001 --end 20261017
mw analytics pageviews 'Albert Einstein' --output graph
mw analytics pageviews 'Albert Einstein' --output csv
mw analytics pageviews 'Albert Einstein' --output jq --format '.[].views'
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.