CPAlead Logo

CPAlead offers various API services for pulling offers, fetching offers for specific users, conversion polling, and reversal data.

Pulls a list of available offers with JSON return format.

https://cpalead.com/dashboard/reports/campaign_json.php?id={Your_Publisher_ID}
HTTP Parameter Description

format

JSON or JSONP format.

country

Only show offers from country, pass two letter ISO country code.

sort

By default, this API sorts by an advanced formula which favors EPC. Use this option to sort by Conversion.

show

Limit amount of offers returned to X number. Can improve API speeds.

incentive

"Y" or "N" to show Incentive, or Non-Incentive offers.

offer_type

By default, this API shows all available offer types, use this field to filter certain offer types. Available offer types: survey, trial, purchase, pinsubmit, mobile, and download. offer_type may also be a comma-delimited list of offer types, e.x. &offer_type=survey,download,pinsubmit

device

Use this only if you're NOT using the UA targeting parameter. By default, the API will show all available device types if you're not targeting by UA. Use this field to only display certain device types. Available offer types: ios, android, and desktop. Device may also be a comma-delimited list of offer types. Example: &device=ios,android,desktop

Targetting Parameters, useful mostly for JSONP polling when needing to pull offers client-side for a specific user rather then pulling all offers.

HTTP Parameter Description

callback

JSONP callback function name. Only used for JSONP format. If using jQuery getJSON, use callback=? and jQuery will automatically fill function name in for you. See JSONP example.

subid

Enable subid tracking and pass your users subid, variable will be available for postback.

geoip

Geo target offers based on your users IP address, use a value of "user" to use the IP address of the client calling this script, this is useful for JSONP calls.

ua

Pass us your visitor's Useragent and we will detect if they are using an Android phone, iOS phone, or desktop device and we will display offers for that device only. Pass "user" to use the Useragent of the client calling this script, this is useful for JSONP calls.

Return Data Example

JSONP Example

Pulls a list of available offers with RSS return format.

https://cpalead.com/dashboard/reports/campaign_rss.php?id={Your_Publisher_ID}
HTTP Parameter Description

country

Only show offers from country, pass two letter ISO country code.

sort

By default, this API sorts by an advanced formula which favors EPC. Use this option to sort by Conversion.

show

Limit amount of offers returned to X number. Can improve API speeds.

offer_type

By default, this API shows all available offer types, use this field to filter certain offer types. Available offer types: survey, trial, purchase, pinsubmit, mobile, and download. offer_type may also be a comma-delimited list of offer types, e.x. &offer_type=survey,download,pinsubmit

device

Use this only if you're NOT using the UA targeting parameter. By default, the API will show all available device types if you're not targeting by UA. Use this field to only display certain device types. Available offer types: ios, android, and desktop. Device may also be a comma-delimited list of offer types. Example: &device=ios,android,desktop

Targetting Parameters, useful mostly for pulling offers for a specific user rather then pulling all offers.

HTTP Parameter Description

subid

Enable subid tracking and pass your users subid, variable will be available for postback.

geoip

Geo target offers based on your users IP address, use a value of "user" to use the IP address of the client calling this script, this is useful for JSONP calls.

ua

Pass us your visitor's Useragent and we will detect if they are using an Android phone, iOS phone, or desktop device and we will display offers for that device only. Pass "user" to use the Useragent of the client calling this script, this is useful for JSONP calls.

Return Data Example

Pulls a list of available offers with Tab-Delimited CSV return format.

https://cpalead.com/dashboard/reports/campaign_csv.php?id={Your_Publisher_ID}
HTTP Parameter Description

country

Only show offers from country, pass two letter ISO country code.

sort

By default, this API sorts by an advanced formula which favors EPC. Use this option to sort by Conversion.

show

Limit amount of offers returned to X number. Can improve API speeds.

offer_type

By default, this API shows all available offer types, use this field to filter certain offer types. Available offer types: survey, trial, purchase, pinsubmit, mobile, and download. offer_type may also be a comma-delimited list of offer types, e.x. &offer_type=survey,download,pinsubmit

device

Use this only if you're NOT using the UA targeting parameter. By default, the API will show all available device types if you're not targeting by UA. Use this field to only display certain device types. Available offer types: ios, android, and desktop. Device may also be a comma-delimited list of offer types. Example: &device=ios,android,desktop

Targetting Parameters, useful mostly for pulling offers for a specific user rather then pulling all offers.

HTTP Parameter Description

subid

Enable subid tracking and pass your users subid, variable will be available for postback.

geoip

Geo target offers based on your users IP address, use a value of "user" to use the IP address of the client calling this script, this is useful for JSONP calls.

ua

Pass us your visitor's Useragent and we will detect if they are using an Android phone, iOS phone, or desktop device and we will display offers for that device only. Pass "user" to use the Useragent of the client calling this script, this is useful for JSONP calls.

Return Data Example

Conversion API allows you to ping CPAlead to test for conversions, useful for making custom apps. Pass subid in as a subid or ip address, or "user" to have our system use the ip address of the client calling this script (useful for JSONP calls).

For push-type conversion service (Postback), see our Postback Documentation.

https://cpalead.com/dashboard/reports/conversion_api.php?id={Your_Publisher_ID}
HTTP Parameter Description

format

JSON or JSONP format.

callback

JSONP callback function name. Only used for JSONP format. If using jQuery getJSON, use callback=? and jQuery will automatically fill function name in for you.

subid

Lookup conversion based on subid, pass subid or users ip address, pass "user" to use the ip address of the client calling this script (useful for JSONP calls).

Return Data Example

Use this API to download your list of bad leads between two dates. Useful for sorting out bad traffic.

https://cpalead.com/dashboard/reports/badleads_api.php?id={Your_Publisher_ID}&key={Your_Secret_Key}

Your Secret Key:

Login to your account to retrieve your secret key.
HTTP Parameter Description

format

JSON or JSONP format.

date_start

Starting date to use when pulling bad leads. Format: yyyy-mm-dd

date_end

End date to use when pulling bad leads. A maximum of one month can be pulled at a time.

Return Data Example