Ads API and MCP
Put product ads on publish.link media sites from your own program or AI agent. Ads are matched to the content a person is reading, never to who they are, and every campaign is reviewed before it runs.
cpm) and optional dates. After it is approved, it is offered on network sites that take network ads. On each site an AI reads the content and shows your card only next to content a reader would plausibly want it for, and never next to reports of deaths, disasters, crime or similar. The card always carries an ad label and your seller name. It stops when the budget is used or the end date passes.Getting a key
Keys are issued by publish.link. Ask through publish.link. A key looks like pl_ads_… and goes in every request:
Authorization: Bearer pl_ads_…
Keep it secret; we keep only its hash. If it leaks, ask for a new one and the old one stops working at once.
MCP
The same operations are an MCP server (Streamable HTTP, JSON responses, no session): https://publish.link/mcp.
Claude Code
claude mcp add --transport http publish-link-ads https://publish.link/mcp --header "Authorization: Bearer pl_ads_…"
Other clients (JSON config)
{
"mcpServers": {
"publish-link-ads": {
"type": "http",
"url": "https://publish.link/mcp",
"headers": {
"Authorization": "Bearer pl_ads_…"
}
}
}
}
| Tool | What it does |
|---|---|
list_network_sites | Media sites that show publish.link network ads, with what they cover. Ads are placed by content, never by who the reader is. |
get_balance | Your prepaid balance in won, whether billing is on, the lowest price per click and the smallest prepayment. |
list_ledger | Prepayments, refunds and corrections, and what valid clicks and impressions cost per day (last 90 days). |
list_campaigns | Your campaigns with their state (in_review, rejected, paused, scheduled, ended, budget_spent, no_balance, running), valid clicks used and, for cpm campaigns, impressions used. |
get_campaign | One campaign. |
create_campaign | Submit a product ad, paid per click (budget_clicks) or per 1,000 impressions (pricing "cpm", budget_impressions). It is reviewed before it runs: an AI looks first and may approve a clear case for an advertiser publish.link has approved before; otherwise a person reviews it. Once approved it appears next to content it fits, on network sites, until the budget or end date. |
update_campaign | Change a campaign. Changing what the card says or where it goes sends it back to review; budget, dates, price, pacing and frequency cap do not. |
pause_campaign | Stop showing a campaign for now. |
resume_campaign | Show a paused campaign again. |
delete_campaign | Delete a campaign and its counts for good. |
campaign_stats | Impressions, valid clicks, excluded clicks (bots, repeats, no balance) and money spent, by day and by site (last 90 days). |
REST
| Call | What it does |
|---|---|
GET /api/v1/ads/me | Who the key belongs to. |
GET /api/v1/ads/sites | Network sites and what they cover. |
GET /api/v1/ads/balance | Prepaid balance, whether billing is on, lowest click price. |
GET /api/v1/ads/ledger | Prepayments, refunds, corrections, and click spend per day. |
GET /api/v1/ads/campaigns | Your campaigns. |
POST /api/v1/ads/campaigns | Submit a campaign (goes to review). |
GET /api/v1/ads/campaigns/{id} | One campaign. |
PATCH /api/v1/ads/campaigns/{id} | Change it. A change to the card or link goes back to review. |
POST /api/v1/ads/campaigns/{id}/pause, /resume | Stop or restart showing it. |
DELETE /api/v1/ads/campaigns/{id} | Delete it with its counts. |
GET /api/v1/ads/campaigns/{id}/stats | Impressions and clicks by day and by site, last 90 days. |
Example
curl -X POST https://publish.link/api/v1/ads/campaigns \
-H "Authorization: Bearer pl_ads_…" -H "content-type: application/json" \
-d '{"name":"Nano hardware wallet","description":"A small device that keeps crypto keys offline, for people starting to hold coins themselves.","keywords":"hardware wallet, cold wallet, self-custody","url":"https://shop.example.com/nano","seller":"Example Shop","price":"$79","budget_clicks":500,"starts_on":"2026-12-01","ends_on":"2026-12-31"}'
Fields
| Field | |
|---|---|
name (required) | Product name as shown on the card (up to 120 characters). |
description | One or two sentences on what it is and who it is for. The matcher reads this to decide which content it fits. |
keywords | Comma-separated words that should bring it up. |
image | https URL of a square image. |
price | Price as shown, e.g. "129,000원" or "$99". |
url (required) | https URL a click goes to. |
seller (required) | Who sells it; shown on the card next to the ad label. |
hook | Optional. One plain sentence (up to 90 characters, no link) that Linky says above the card inside its panel, in the language of the sites it runs on. |
pricing | How you pay: "cpc" per valid click (default), or "cpm" per 1,000 impressions. |
budget_clicks | The campaign stops after this many valid clicks. Required with pricing "cpc"; with "cpm" optional (a ceiling on clicks). |
cpc | With pricing "cpc": won you pay per valid click. Optional: without it the lowest price applies. Not under the lowest price (see get_balance). |
budget_impressions | With pricing "cpm" (required there): the campaign stops after this many impressions. Bots are not counted. |
cpm | With pricing "cpm": won you pay per 1,000 impressions. Required while billing is on. |
pacing | "even" (default) spreads the budget over the days up to ends_on; "asap" shows the card wherever it fits until the budget is used. Without ends_on both behave as "asap". |
freq_cap | Optional. At most this many impressions per visitor per day (Korea time). Visitors are told apart by a daily, salted hash; no one is identified. |
starts_on | First day (YYYY-MM-DD, Korea time). Optional. |
ends_on | Last day (YYYY-MM-DD, Korea time). Optional. |
The description matters most: it is what the AI reads to decide which content your product fits. Say what it is and who it is for.
Review
Every new campaign, and every change to what its card says or where it links, is reviewed before it runs. An AI looks first, for misleading claims, products that are illegal or adult, gambling, weapons or drugs, and promises of easy money or guaranteed returns. It approves a campaign by itself only when all of these are clearly absent, the card clearly reads as a normal product or service ad, and publish.link has already approved another campaign of yours. Otherwise the campaign waits for a person, and review_note says what they will look at. The AI never rejects a campaign; only a person does.
Pricing, pacing and frequency
pricing: "cpc" | The default. You pay per valid click, up to budget_clicks. |
pricing: "cpm" | You pay cpm won per 1,000 impressions, up to budget_impressions. An impression is a card the reader's page actually put on screen; bots are not counted, nor one visitor seeing the card more than freq_cap (or 20) times a day. Clicks are still counted and shown in your stats, and not charged. |
pacing: "even" | The default. With an ends_on, each day may use the budget left divided by the days left, spread over the hours of the day (Korea time), so the campaign is seen until its last day. |
pacing: "asap" | The card is shown wherever it fits until the budget is used. |
freq_cap | The card is not shown again to a visitor who has seen it this many times today. |
Where several cards fit the same content, the order is: sponsorships (arranged with publish.link), then the others by what they are expected to earn (price × the card's click rate) and how well they fit. Paying more never puts a card next to content it does not fit.
curl -X POST https://publish.link/api/v1/ads/campaigns \
-H "Authorization: Bearer pl_ads_…" -H "content-type: application/json" \
-d '{"name":"Nano hardware wallet","description":"A small device that keeps crypto keys offline.","url":"https://shop.example.com/nano","seller":"Example Shop","pricing":"cpm","cpm":3000,"budget_impressions":100000,"pacing":"even","freq_cap":3,"ends_on":"2026-12-31"}'
States
in_review | Waiting for review. |
rejected | Not approved; review_note says why. Change it and it is reviewed again. |
scheduled, running, ended | Before, within and after its dates (Korea time). |
paused | You paused it. |
budget_spent | Its valid clicks reached budget_clicks, or for pricing cpm its impressions reached budget_impressions. Raise the budget to continue. |
no_balance | Your prepaid balance no longer covers a click (or, for cpm, an impression). It runs again once a prepayment is booked. |
Privacy
No reader is identified. Matching uses the content of the page; counts are per day and per site. Nothing about a reader is passed to you.
Billing
Prepaid, in won. You transfer a prepayment; publish.link books it to your balance. Each valid click takes the campaign's cpc (or the lowest price, if you set none) from the balance. A cpm campaign is charged cpm / 1,000 per impression instead; impressions are booked to the balance every few minutes. When the balance no longer covers a click or an impression, your campaigns stop until the next prepayment.
A click is valid unless it comes from a bot or crawler, or repeats a click by the same visitor on the same campaign within 24 hours. Excluded clicks are shown in your stats and never charged. To tell repeats apart we keep only a daily, salted hash, never an address.
While publish.link has not set its prices, billing is off: clicks and impressions are counted and checked, nothing is charged.