
Page Views API
An open-source API to count visitors on any page.
Is this your product? Claim it to edit the listing, post updates and answer questions. Prove it with an email address at the product's domain (the listing becomes Claimed), or put the LotsDirectory badge on your website (the listing becomes Verified, and its link to your website is followed while the badge is live).
Description
An open-source API to count visitors on any page. Simple, no setup, no dashboard.
About Page Views API
What is Page Views API?
Page Views API is an open-source, serverless page counter and REST API for tracking website visits without accounts or dashboards.
What Page Views API does
Page Views API counts visitors using a lightweight tracking script and provides a REST endpoint to display view counts. It features strict path matching, handles Single Page Application navigation, deduplicates visitors every 30 minutes via hashed identifiers, and requires no cookies or database dashboards.
Who Page Views API is for
For creators and developers looking to track page views and count visitors on any page without dashboards or accounts.
How Page Views API works
Developers add a script tag specifying their domain and path. When a visitor lands on that path, the script triggers an API request that hashes visitor details for Redis deduplication, incrementing the counter read via GET /api/v1/views.
Key features
- Precision path tracking using strict pathname matching before triggering requests.
- REST API views endpoint supporting cross-origin requests to read counts and display them anywhere.
- SPA navigation compatibility hooking into history.pushState and popstate events.
- Visitor deduplication counting each visitor once every 30 minutes per site and path.
- Privacy protection storing no IP addresses, setting no cookies, and reading no local storage.
- Short-lived visitor tokens generated from a 16-character SHA-256 hash with Redis TTL expiration.
Facts from ratneshc.com, checked 14 October 2026
- Open-source project built by Ratnesh with code available on GitHub.
- Counts visitors once every 30 minutes per site and path using Redis deduplication.
- Uses no cookies, no local storage, and stores no IP addresses.
- Provides a REST API to read view counts with cross-origin request support.
Written from Page Views API's own website (Homepage, Docs). The maker can claim this listing to edit it.
Categories
Frequently asked questions
Does Page Views API use cookies or local storage?
No. The tracking script sets no cookies and reads no local storage, storing zero personal data.
How does visitor deduplication work?
The API generates a 16-character SHA-256 hash from the IP address and User-Agent, counting visitors once every 30 minutes per path.
Can Page Views API be used with Single Page Applications?
Yes. The script listens to history.pushState and popstate events to track client-side route changes in React, Vue, and Next.js.
Who built Page Views API?
Page Views API is an open-source project built by Ratnesh with source code available on GitHub.