Kenya Government Tenders API - Cloudflare Workers
# Kenya Tenders API — AI-Powered Government Tender Intelligence
A Cloudflare Worker-based SaaS API providing real-time access to Kenyan government tender data from the Public Procurement Information Portal (PPIP). Features AI-powered bid matching with scoring and recommendations, webhook notifications for new tenders, subscription-based keyword/county alerts, and tiered pricing. Data synced hourly via cron job.
Base URL: `
kenya-tenders-api.shelflix.…`
## Quick Start
```bash
git clone
github.com
cd "Your env"
npm install
npx wrangler dev
# Requires 8 KV namespaces configured in wrangler.toml
```
Test with the included key: `tk_test123_testsecret123`
## API
### Public
| Method | Path | Description |
|--------|------|-------------|
| GET | `/v1/health` | System status, last sync, version |
| GET | `/` | Landing page with live test UI |
### Auth Required (api_key query param or Authorization: Bearer)
| Method | Path | Description |
|--------|------|-------------|
| POST | `/v1/keys` | Create API key `{name, email}` |
| GET | `/v1/tenders` | List tenders with filters (county, category, keyword, page) |
| GET | `/v1/tenders/:id` | Full tender details with match score |
| GET | `/v1/opportunities/trending` | Top 10 procurement categories |
| GET | `/v1/opportunities/count-by-county` | Tenders per county |
| GET | `/v1/opportunities/match` | AI matching with scores and recommendations |
| GET | `/v1/opportunities/high-value` | Recent high-bid-security tenders |
| POST | `/v1/subscriptions` | Create keyword/county alert |
| GET | `/v1/subscriptions` | List subscriptions |
| DELETE | `/v1/subscriptions/:id` | Remove subscription |
| POST | `/v1/webhooks` | Register webhook URL |
| GET | `/v1/webhooks` | List webhooks |
| DELETE | `/v1/webhooks/:id` | Remove webhook |
| GET | `/v1/webhooks/:id/deliveries` | Delivery history (last 50) |
## Architecture
```
PPIP API --(hourly cron)--> TENDER_CACHE KV --> API Layer …