CPAlead Publisher API
Publisher API Documentation
Use these APIs to pull offers, check conversions, and download reversals. If you want, you can also use the OpenAPI file below with your own API tools.
This page is public. Replace placeholder values like
{PUBLISHER_ID}
and
{API_KEY}
with your own values after you sign in.
Overview
What this API is designed for
Offer Sync
Pull available offers, filter by device or country, and use
updated_since
for incremental refreshes.
Tracking Safety
Most accounts do not receive native CPC offers. Boost-click offers can appear, but they keep their normal rank.
OpenAPI File
The public OpenAPI file is available at /api/openapi.json .
01
API Oferte
Returns a JSON list of available offers. Lower offer_rank values show first.
Clasament & plăți pe țară
- Each offer includes an offer_rank where 1 is the highest ranked offer. Results stay in offer_rank order from low to high.
- Unele oferte plătesc sume diferite în funcție de țară. Dacă o ofertă include o listă "payouts_per_country", folosiți plata care se potrivește codului de țară din două litrere al utilizatorului (de ex., US, CA, GB). Dacă țara lor nu se află în listă, folosiți plata implicită afișată în "amount".
- Some offers pay by event. If an offer includes an "events" list, use each event name, description, and amount for the completed event. Event amounts are already adjusted to your publisher payout split.
Note despre API-ul de Oferte
- Most accounts do not receive native CPC offers. If CPAlead enables CPC API access for your account, native CPC offers can appear and the amount field is your publisher payout.
- Dacă o ofertă are boost clicks, își păstrează totuși rangul normal. Nu este mutată în partea de sus doar pentru că are boost clicks.
- Folosirea linkului exact returnat de API păstrează cea mai bună atribuire. Dacă salvați sau reconstruiți linkurile în sistemul dvs., clicurile tot funcționează.
- If CPAlead enables CPC API access for your publisher account, native CPC offers can appear in the Offers API. Boosted CPA, CPI, or CPE offers can also include publisher-only CPC rewards.
- For native CPC offers, use the amount field. For boosted offers, boost_click_balance shows the remaining boost clicks. The API shows cpc_reward_type, cpc_payout_us, cpc_payout_not_us, or both payout fields based on the offer target countries. CPC API rewards do not fire publisher postbacks.
Endpoint
https://www.cpalead.com/api/offers?id={PUBLISHER_ID}
Parametri de interogare HTTP disponibili
| Parametru HTTP | Descriere |
|---|---|
| id | Required. Your publisher ID. |
| country |
Afișați doar ofertele din țară, transmițând codul țării ISO din două litrere Folosiți country=user pentru a obține automat oferte pentru țara utilizatorului
|
| limit | Limitați numărul de oferte returnate. Acest lucru poate accelera apelurile API. Valoarea implicită este 2500, iar valoarea maximă este 5000. |
| type |
By default this API returns CPA, CPI, and CPE offers. Publishers with CPC API access can also receive native CPC offers and boosted offers with CPC rewards. You can request payout types with a comma-separated list, for example
&type=cpi,cpe,cpr
|
| updated_since |
Only return offers updated on or after this date. You can use YYYY-MM-DD or a full ISO date and time, for example
&updated_since=2026-04-01T00:00:00Z
|
| fields |
Returnați doar câmpurile ofertei de care aveți nevoie. Folosiți o listă separată prin virgulă, de exemplu
Available fields:
Use "description" for the short offer description. Use "long_description" when you want the longer marketplace description. |
| include_long_description |
Set this to 0 or false to leave long_description out of the default Offers API response. If your fields list includes long_description, it will still be returned.
&include_long_description=0
|
| offerwall_offers | Boolean (adevărat|fals). Folosiți adevărat dacă doriți și oferte marcate pentru offerwall-uri. Ofertele CPC tot nu sunt incluse, iar ofertele cu boost-click păstrează rangul lor normal. |
| device |
Folosiți acest lucru doar dacă nu utilizați direcționarea automată după dispozitiv. Implicit, API-ul poate returna toate tipurile de dispozitive. Folosiți acest câmp pentru a returna doar anumite tipuri de dispozitive. Valori disponibile: ios, android, mobile și desktop. Device poate fi și o listă separată prin virgulă, de exemplu: Pentru a obține doar oferte CPI / CPE (care necesită doar instalarea pentru conversie - folosiți device=ios,android Folosiți |
| subid / subid2 / subid3 |
SubID tracking lets you pass extra data into CPAlead tracking links. CPAlead stores the value with clicks and conversions and returns it in publisher postbacks when available. If you do not pass subid, CPAlead will not add one automatically. Use a user ID, wallet ID, or click reference when you need to credit a specific visitor. You can also use a shared value for a page, site, sub-affiliate, keyword, or traffic source, but shared values are for reporting and segmentation and cannot identify one visitor for rewards. O a doua variabilă subid pentru date suplimentare O a treia variabilă subid pentru date suplimentare |
| gaid / idfa |
Dacă aveți un Google Advertising ID (GAID) pentru mobil, folosiți această variabilă pentru a completa automat gaid-ul în linkul dvs. de tracking Dacă aveți un Apple Identifier For Advertisers (IDFA) pentru mobil, folosiți această variabilă pentru a completa automat idfa-ul în linkul dvs. de tracking |
| format / callback |
Format JSON sau JSONP. JSON este implicit Numele funcției de callback JSONP. Folosit doar pentru formatul JSONP. Dacă folosiți jQuery getJSON, folosiți callback=? și jQuery va completa automat numele funcției pentru dvs. Consultați exemplul JSONP |
Exemplu de răspuns
Exemplu de cod
02
API Conversii
Limită: 1 cerere pe minut
API-ul de Conversii vă permite să trimiteți ping către CPAlead pentru a testa conversiile, util pentru crearea de aplicații personalizate. Transmiteți subid ca subid sau adresă IP, sau "user" pentru ca sistemul nostru să folosească adresa IP a clientului care apelează acest script (util pentru apeluri JSONP)
Pentru serviciul de conversii de tip push (Server-to-Server Postback), consultați Documentația noastră Postback
Endpoint
https://www.cpalead.com/api/conversions?id={PUBLISHER_ID}&api_key={API_KEY}
Parametri de interogare HTTP disponibili
| Parametru HTTP | Descriere |
|---|---|
| id | Required. Your publisher ID. |
| api_key | Required. Your API key. |
| subid | Necesar. Căutare conversie pe baza subid-ului, transmiteți subid sau adresa IP a utilizatorului, transmiteți "user" pentru a folosi adresa IP a clientului care apelează acest script (util pentru apeluri JSONP) |
| offer_id | Opțional. Va verifica conversia doar pentru acest ID de ofertă (campanie) |
| format / callback | Format JSON sau JSONP. JSON este implicit Numele funcției de callback JSONP. Folosit doar pentru formatul JSONP. Dacă folosiți jQuery getJSON, folosiți callback=? și jQuery va completa automat numele funcției pentru dvs. Consultați exemplul JSONP |
Exemplu de răspuns
03
API Anulări
Limită: 1 cerere pe minut
Folosiți acest API pentru a descărca lista dvs. de lead-uri nevalide între două date. Util pentru sortarea traficului prost
Endpoint
https://www.cpalead.com/api/reversals?id={PUBLISHER_ID}&api_key={API_KEY}
Parametri de interogare HTTP disponibili
| Parametru HTTP | Descriere |
|---|---|
| id | Required. Your publisher ID. |
| api_key | Required. Your API key. |
| start_date | Data de început de folosit la preluarea lead-urilor nevalide. Format: yyyy-mm-dd |
| end_date | Data de sfârșit de folosit la preluarea lead-urilor nevalide. Se poate prelua cel mult o lună odată |
| format / callback | Format JSON sau JSONP. JSON este implicit Numele funcției de callback JSONP. Folosit doar pentru formatul JSONP. Dacă folosiți jQuery getJSON, folosiți callback=? și jQuery va completa automat numele funcției pentru dvs. Consultați exemplul JSONP |
Exemplu de răspuns