REST API Reference
Programmatic access to wpnews.pro's curated AI/tech news index. JSON + CORS · OpenAI tool definitions out of the box · MCP server included. Free tier 10k req/day, no card required.
Overview overview
The wpnews API exposes the same index that powers the website: AI/tech articles, topics, entities, comparisons, and trends. Everything is JSON over HTTPS with CORS open to the world — you can call it from a browser, a curl script, an LLM tool, or an MCP server without proxy.
The base URL is https://api.wpnews.pro. All endpoints are prefixed with /v1. Every JSON response includes data, meta, and (if applicable) pagination envelopes.
Design principles
- Cursor-paginated. No offset/limit foot-guns. Pass
?after=<cursor>frommeta.next. - ETag everything. Honour
If-None-Match— you'll get 304s for free. - Tool-ready. Every endpoint has an OpenAI tool definition at
/v1/tools.jsonand an MCP manifest at/v1/mcp. - No surprise charges. Webhook deliveries are counted separately and visible from the dashboard.
curl -H "X-API-Key: $KEY" https://api.wpnews.pro/v1/news.
Authentication auth
Authenticate every request with an API key in the X-API-Key header. Keys are scoped per-environment and rotate on demand.
api-keys
-H "X-API-Key: $WPNEWS_KEY"
response
{
"data": {
"key_id": "wpk_2f7a91",
"tier": "pro",
"quota": { "limit": 1000000, "used": 12483, "resets": "2026-05-21T00:00:00Z" },
"scopes": ["read:news", "read:topics", "write:webhooks"]
},
"meta": { "request_id": "req_8c0d23" }
}
rate-limits
Each tier has a per-day quota and a burst limit. Headers X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset ship on every response.
| tier | daily quota | burst | concurrent |
|---|---|---|---|
| free | 10,000 | 20 / sec | 4 |
| pro | 1,000,000 | 120 / sec | 32 |
| enterprise | unlimited | custom | custom |
Endpoints endpoints
Seven endpoints cover the surface area. Most are GET-only, idempotent, and cache-friendly.
GET /v1/news
-H "X-API-Key: $WPNEWS_KEY"
parameters
| name | type | req | description |
|---|---|---|---|
| limit | int | no | 1–100, default 10 |
| topic | string | no | topic slug, e.g. ai-models |
| entity | string | no | filter by entity slug |
| since | ISO8601 | no | articles published on/after |
| after | cursor | no | opaque cursor from meta.next |
| sort | enum | no | one of recent, trending, relevance |
GET /v1/news/:slug
GET /v1/topics
GET /v1/entities
/v1/entities/graph for the full graph.GET /v1/compare/:slug
POST /v1/webhooks
-H "X-API-Key: $WPNEWS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://you.dev/hook","topics":["ai-models"],"secret":"whsec_..."}'
body
| name | type | req | description |
|---|---|---|---|
| url | string | yes | https endpoint, max 2 KB body POSTed on each event |
| topics | string[] | no | filter to topic slugs, default * |
| entities | string[] | no | filter to entity slugs |
| secret | string | yes | used to sign payloads, sent in X-WPN-Signature |
Webhooks webhooks
We deliver every new article matching your filter to your registered URL with an HMAC-SHA256 signature in X-WPN-Signature. Retries: 5 attempts with exponential backoff over 24h. Inspect deliveries and replay from the dashboard.
hmac_sha256(secret, body) and compare hex-string with the header. Mismatch = drop the request.
Errors errors
Errors use standard HTTP status codes. The response body always includes error.code (machine-readable) and error.message (human).
| status | code | meaning |
|---|---|---|
| 200 | ok | Request succeeded. |
| 304 | not_modified | ETag matched; body intentionally empty. |
| 400 | bad_request | Malformed parameters. See error.message. |
| 401 | unauthorized | Missing or invalid X-API-Key. |
| 403 | forbidden | Key is valid but scope insufficient. |
| 404 | not_found | Resource not in the index. |
| 429 | rate_limited | Quota exhausted. Inspect X-RateLimit-Reset. |
| 500 | internal | On us. Retry with backoff. |
| 503 | degraded | Indexing pipeline lag > 5 min. Read OK, fresh content delayed. |