{"id":15134807,"url":"https://github.com/variar/wpageviews","last_synced_at":"2026-01-17T03:47:23.461Z","repository":{"id":57140922,"uuid":"46192217","full_name":"variar/wpageviews","owner":"variar","description":"wikipedia page views statistics crawler","archived":false,"fork":false,"pushed_at":"2015-11-22T21:19:19.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T00:46:42.871Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/variar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-14T21:08:53.000Z","updated_at":"2015-11-15T00:13:16.000Z","dependencies_parsed_at":"2022-09-01T23:51:49.017Z","dependency_job_id":null,"html_url":"https://github.com/variar/wpageviews","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/variar%2Fwpageviews","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/variar%2Fwpageviews/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/variar%2Fwpageviews/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/variar%2Fwpageviews/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/variar","download_url":"https://codeload.github.com/variar/wpageviews/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411232,"owners_count":20934654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-26T05:24:28.255Z","updated_at":"2026-01-17T03:47:23.430Z","avatar_url":"https://github.com/variar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wpageviews\n[![npm version](https://badge.fury.io/js/wpageviews.svg)](https://badge.fury.io/js/wpageviews)\n[![Build Status](https://travis-ci.org/variar/wpageviews.svg)](https://travis-ci.org/variar/wpageviews)\n\nSimple module which helps to get monthly page views for wikipedia pages\nbelonging to some category and all its subcategories using data from http://stats.grok.se.\n\n**Warning**: statistics is collected for **all** subcategories of given\ncategory, so getting data for high-level categories might take long. There is a random delay (500 to 2000 ms) before each request to  http://stats.grok.se.\nQueries to wikipedia API are also throttled by `nodemw` package.\n\nYou can get total page views for any period from 1 to 90 days. Note, however,\nthat stats.grok.se returns values either for 30, 60 or 90 days. Data is then\nsliced to required period. This also means that getting page views for 31 days\ntakes significantly longer than getting page views for 30 days.\n\n\n## Installation\n\n    npm install wpageviews --save\n\n## Usage\n\n    var PageViewsCollector = require('wpageviews')\n\n    var pageViewsCollector = new PageViewsCollector({\n      lang: 'en',\n      period: 7 //valid values are from 1 to 90\n    });\n\n    pageViewsCollector.getPageViews('Some category')\n    .then(function(pageViewsArray) {\n      pageViewsArray.forEach(function(pageViews) {\n        // Page title\n        console.log(pageViews.title);\n\n        // Array of categories reflecting the path to this page from root category\n        // Note that these are not the categories of the page\n        console.log(pageViews.categories.join());\n\n        // Total page view for given period\n        console.log(pageViews.views);\n      });\n    });\n\n## Tests\n\n    npm test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvariar%2Fwpageviews","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvariar%2Fwpageviews","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvariar%2Fwpageviews/lists"}