The ad API

The whole network is one small JSON API at https://ads.laneworks.net/api. The embed script uses it, the stats on this site read from it, and enrolled sites can call it directly.

Who can call it: ad serving (/serve) only answers requests originating from domains enrolled in the network — the API Evangelist family plus approved client domains. Inventory and stats endpoints are public: the program publishes its numbers. To enroll a domain, email [email protected].

Serve an ad
GET /api/v1/serve?slot=top-banner&format=notice&d=<your-hostname>

Returns one ad from the rotation (weighted random) and counts the impression against the calling domain and the named slot. Every ad is text — there is no creative to fetch, so the same payload renders in any layout; format is recorded for reporting, not for content negotiation. Requests must originate from an enrolled domain (checked via Origin/Referer); others are refused.

{
  "id": "paper-fundamentals-of-api-discovery",
  "kind": "paper",
  "title": "The Fundamentals of API Discovery",
  "short_title": "The Fundamentals of API Discovery",
  "kicker": "API DISCOVERY",
  "message": "You can't secure what you can't find.",
  "cta": "Read the paper",
  "accent": "blue",
  "advertiser": "API Evangelist",
  "target": "https://papers.apievangelist.com/papers/fundamentals-of-api-discovery/",
  "click": "https://ads.laneworks.net/api/v1/click/paper-fundamentals-of-api-discovery?d=apis.io"
}

Render kicker, message, and cta as a notice in your own styling — accent (blue, gold, red) is a hint, not a requirement. Link it to click, never straight to target, or the click won't be counted.

An optional &kind= narrows the pool to one kind of inventory — paper, report, or research for both. It never serves nothing: an unknown or empty kind falls back to the full rotation, because a blank slot is worse than an off-topic ad.

Count a click
GET /api/v1/click/{id}?d=<hostname>

Counts the click and issues a 302 to the ad's destination. The destination always comes from the inventory on file — the API is not an open redirector.

List the inventory
GET /api/v1/ads

Every ad currently in rotation: id, kind, title, kicker, message, cta, accent, and destination. Public.

Read the stats
GET /api/v1/stats

Lifetime impressions, clicks, and CTR for every ad. Public.

GET /api/v1/stats/{id}

One ad in detail: lifetime totals, a daily series for the last 60 days, and per-domain and per-slot breakdowns.

{
  "id": "paper-the-pricing-of-ai-apis",
  "impressions": 12840,
  "clicks": 96,
  "ctr": 0.75,
  "days": [ { "date": "2026-07-10", "impressions": 412, "clicks": 3 } ],
  "domains": [ { "domain": "apievangelist.com", "impressions": 6210, "clicks": 51 } ]
}
GET /api/v1/timeseries

Network-wide numbers over time: a daily series across the whole rotation (bucket it into days, weeks, or months on the client), plus lifetime per-domain and per-slot totals. Powers the Analytics page. Public.

{
  "impressions": 320177, "clicks": 1847, "ctr": 0.58,
  "days":    [ { "date": "2026-07-11", "impressions": 3533, "clicks": 36 } ],
  "domains": [ { "domain": "apis.io", "impressions": 244093, "clicks": 134, "ctr": 0.05 } ],
  "slots":   [ { "slot": "top-banner", "impressions": 289000, "clicks": 1500, "ctr": 0.52 } ]
}
GET /api/v1/timeseries?domain=apis.io
GET /api/v1/timeseries?slot=top-banner

The same daily series scoped to one domain or one slot — the day×dimension crosstab. Collected from the network going forward (lifetime per-dimension totals above reach back further).

Newsletters and email
GET /api/v1/pixel/{id}.png?d=newsletter&s=email

Email clients don't run JavaScript, so a newsletter writes the ad's text into its own template and drops this 1×1 transparent pixel beside it to count the view. Wrap the text in the click redirect:

<a href="https://ads.laneworks.net/api/v1/click/{id}?d=newsletter&s=email">
  <strong>{kicker}</strong> {message} — {cta} →
</a>
<img src="https://ads.laneworks.net/api/v1/pixel/{id}.png?d=newsletter&s=email"
     width="1" height="1" alt="">

/api/v1/banner/{id}.png is the same endpoint under its old name — it used to redirect to a banner PNG, and now returns the pixel, so newsletters already in the wild keep counting.

Embed on your site

Enrolled sites don't need to call the API by hand — include the embed once and place slots wherever ads should render. Three text layouts:

<script async src="https://ads.laneworks.net/embed.js"></script>

<!-- full-width notice (below the top nav, or at the end of the content) -->
<div data-laneworks-ad="top-banner"></div>

<!-- stacked notice (sidebars) -->
<div data-laneworks-ad="sidebar" data-laneworks-format="rectangle"></div>

<!-- edge-to-edge announcement bar; existing content is the fallback -->
<div data-laneworks-ad="announcement" data-laneworks-format="strip">
  <!-- static fallback shown until the ad loads -->
</div>

The rectangle and leaderboard format names are kept from the banner era so existing placements keep working — they now select the stacked and full-width text layouts.

The slot name is free-form (top-banner, sidebar, content-bottom, …) and every impression and click is broken down per slot in the public stats.

No cookies, no fingerprinting, no third parties. The only things recorded are the ad id, the day, and the domain the ad appeared on.