SShortSingh.
Back to feed

Wikipedia Pageviews API Gives Free Daily Article View Counts in Python

0
·4 views

A tutorial explains how to retrieve daily page view counts for Wikipedia articles using the free Wikimedia Pageviews API, which requires no API key. The author describes the structure of the per-article endpoint and notes that requests must include a descriptive User-Agent header or they will receive an HTTP 403 error. The post provides standard-library Python code for querying single articles or lists, including handling of rate limits and retries. It also covers practical limits such as request-per-minute thresholds, the July 2015 start of available history, and the need to query one article per request. The guide suggests uses like ranking topics by public interest or detecting spikes after news events.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Solo Founders Rise as AI Lowers Build Costs, But Early Revenue Falls

AI tools are making it far cheaper for a single engineer to build and ship a software product, shifting the economics of starting a company. Carta data shows single-founder startups grew from about 24 percent of new companies in 2019 to 36 percent in early 2025, and Stripe Atlas reported a record share of solo-founded incorporations in mid-2026. Some AI-native firms reach very high revenue per employee, yet median first-half revenue for solo-founded startups fell 23 percent in 2025. The article argues that when building becomes easy for everyone, a product alone offers little protection, so durable advantage must come from domain expertise, distribution and trust.

0
ProgrammingDEV Community ·

Terrascope: mapa-múndi interativo no terminal com aviões, clima e terremotos

Terrascope é um mapa-múndi interativo que roda em terminal, exibindo países, cidades, aeronaves ao vivo, clima, radar meteorológico, terremotos e as faixas de dia e noite. O mapa é desenhado com caracteres Braille e cores do terminal, e ganha mais detalhes conforme o usuário aplica zoom. Na primeira execução, os arquivos de mapa maiores são baixados para um cache local e reaproveitados depois, o que permite também um modo offline. O programa pode ser instalado via pipx, Homebrew ou Nix, com requisitos como Python 3.10 ou superior e suporte a UTF-8, e é voltado para macOS e Linux, com WSL como alternativa no Windows. Segundo o projeto, não há telemetria nem rastreamento de dados.

0
ProgrammingDEV Community ·

Why adding nodes can worsen a hot partition in sharded systems

A sharded cluster can be throttled by one overloaded node even when average CPU looks low, because a hash spreads keys evenly but not traffic. A simulator using a Zipf traffic model showed the busiest partition carrying 6.6 times its fair share under skew, and doubling partitions raised that ratio to 12.8. The article distinguishes hot ranges, fixed by changing key shape or automatic splitting, from hot keys, which cannot be split and must be handled by reducing traffic. Suggested remedies include caching, serving reads from replicas, and salting hot keys, which in one simulation cut the ratio from 6.6x to 2.5x. The author recommends alerting on per-partition maximum load and skew rather than averages.

0
ProgrammingDEV Community ·

How to look up a company registration number by name without an API key

A supplier entering the name "Marimekko" for Finland could match either Marimekko Oyj or Marimekko Services Oy, so picking the first search result risks linking to the wrong legal entity. The walkthrough shows how to fetch candidate companies with one HTTP request using a search endpoint, then retrieve the national registration number from the matching profile. It also demonstrates cross-checking a Business ID against Finland's official open-data register, which confirmed the name and number in the example. The guide advises storing registry numbers as text with their scheme and jurisdiction, and recording lifecycle status and check dates. It concludes that a brand name alone is insufficient and that unresolved matches should be verified via the legal name or Business ID.