web-traffic-api
v1.0.1
Published
Top website / web traffic leaderboard via the Trends API live feeds. Competitive intel as JSON.
Maintainers
Readme
Website traffic-rank API
Live global site rank. There is no source: "web traffic" (that string is 400).
Key: trendsapi.ai/#get-key. Full contract: trendsapi-ai/trendsapi.
Install
npm install web-traffic-apiimport { TrendsAPI } from "web-traffic-api";
const client = new TrendsAPI({ apiKey: process.env.TRENDSAPI_KEY });
const sites = await client.getTopWebsites({ limit: 25 });getTopWebsites() presets type: "Top Websites". Official full client: trendsapi.
Call
| Field | Value |
|---|---|
| Endpoint | POST https://api.trendsapi.ai/api |
| Auth | Authorization: Bearer $TRENDSAPI_KEY |
| Mode | get_top_trends |
| type | Top Websites (exact capitalization) |
| Optional | category, limit, offset |
curl -sS -X POST https://api.trendsapi.ai/api \
-H "Authorization: Bearer $TRENDSAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"mode":"get_top_trends","type":"Top Websites","limit":25}'Parsed data is [rank, hostname] pairs.
Search interest in a domain is a different question:
curl -sS -X POST https://api.trendsapi.ai/api \
-H "Authorization: Bearer $TRENDSAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"mode":"get_growth","source":"google search","keyword":"nytimes.com","percent_growth":["12M"]}'Do not plot those as the same metric. This is third-party rank estimation, not Google Analytics.
Site: trendsapi.ai/trends/web-traffic.
License
MIT. See LICENSE.
