Mailwal

API

Newsletters, issues and full-text search, available as read-only JSON.

Get an API key

Sign in with your approved GitHub account to access the newsletter archive and manage your API keys.

Authentication

Send your key in the Authorization header with every request. A browser session alone does not grant API access. Keep keys private and use them from your server or scripts.

curl -H 'Authorization: Bearer YOUR_API_KEY' \
  'https://mailwal.com/api/v1/search?q=interest+rates&limit=3'

Keys are shown once and stay valid after you sign out. You can have up to 10 keys and revoke any key from your account. Missing, invalid or revoked keys receive 401.

Endpoints

GET /api/v1/newsletters
Every available newsletter, most recently published first.
GET /api/v1/newsletters/{slug}
One newsletter.
GET /api/v1/newsletters/{slug}/issues?limit=20&cursor=…
Its issues, newest first. The response’s next cursor identifies the following page, or is null.
GET /api/v1/issues?limit=20&cursor=…
The newest issues across all newsletters.
GET /api/v1/issues/{id}
One issue with its cleaned contentHtml, contentText and links.
GET /api/v1/search?q=…&limit=20&offset=0
BM25 search across subjects, bodies, summaries and topics. Exact matches come first; eligible queries with fewer than five exact matches also return typo-tolerant results, identified by matchType: "approximate". Quote a phrase for an exact match; prefix a word with - to exclude it. OR, {a b} (any of), parentheses, +word (no typo matching), a AROUND 5 b, from:, subject:, topic:, has:image|link|summary, after:/before: (YYYY/MM/DD) and newer_than:/older_than: (7d, 2m, 1y) work as in the archive; is: and label: describe a reader and match nothing here. Results are ranked by relevance and recency. The snippet is HTML-escaped with matches in <mark>.

Limits and responses

Each issue includes language: a language code such as en or fr, mul for multilingual content, und when undetermined, other for another language, or null while detection is pending. Search by issue language with lang:fr or language:fr.

Up to 120 requests per minute per account, with an additional per-client search limit. A 429 response includes Retry-After. Page sizes range from 1 to 50; search offsets range from 0 to 1000.

Responses are not cached. Browser clients can use CORS with the Authorization header. The API returns only published newsletters and visible issues.