publish.link

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.

How it works. You send a product (name, description, link, seller) with a budget (clicks, or impressions for pricing 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_…"
      }
    }
  }
}
ToolWhat it does
list_network_sitesMedia sites that show publish.link network ads, with what they cover. Ads are placed by content, never by who the reader is.
get_balanceYour prepaid balance in won, whether billing is on, the lowest price per click and the smallest prepayment.
list_ledgerPrepayments, refunds and corrections, and what valid clicks and impressions cost per day (last 90 days).
list_campaignsYour 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_campaignOne campaign.
create_campaignSubmit 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_campaignChange 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_campaignStop showing a campaign for now.
resume_campaignShow a paused campaign again.
delete_campaignDelete a campaign and its counts for good.
campaign_statsImpressions, valid clicks, excluded clicks (bots, repeats, no balance) and money spent, by day and by site (last 90 days).

REST

CallWhat it does
GET /api/v1/ads/meWho the key belongs to.
GET /api/v1/ads/sitesNetwork sites and what they cover.
GET /api/v1/ads/balancePrepaid balance, whether billing is on, lowest click price.
GET /api/v1/ads/ledgerPrepayments, refunds, corrections, and click spend per day.
GET /api/v1/ads/campaignsYour campaigns.
POST /api/v1/ads/campaignsSubmit 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, /resumeStop or restart showing it.
DELETE /api/v1/ads/campaigns/{id}Delete it with its counts.
GET /api/v1/ads/campaigns/{id}/statsImpressions 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).
descriptionOne or two sentences on what it is and who it is for. The matcher reads this to decide which content it fits.
keywordsComma-separated words that should bring it up.
imagehttps URL of a square image.
pricePrice 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.
hookOptional. 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.
pricingHow you pay: "cpc" per valid click (default), or "cpm" per 1,000 impressions.
budget_clicksThe campaign stops after this many valid clicks. Required with pricing "cpc"; with "cpm" optional (a ceiling on clicks).
cpcWith pricing "cpc": won you pay per valid click. Optional: without it the lowest price applies. Not under the lowest price (see get_balance).
budget_impressionsWith pricing "cpm" (required there): the campaign stops after this many impressions. Bots are not counted.
cpmWith 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_capOptional. 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_onFirst day (YYYY-MM-DD, Korea time). Optional.
ends_onLast 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_capThe 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_reviewWaiting for review.
rejectedNot approved; review_note says why. Change it and it is reviewed again.
scheduled, running, endedBefore, within and after its dates (Korea time).
pausedYou paused it.
budget_spentIts valid clicks reached budget_clicks, or for pricing cpm its impressions reached budget_impressions. Raise the budget to continue.
no_balanceYour 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.