# Offers API (v3)

## Use Case

Our offers API allow you to pull offers compatible with virtual currency applications and display them natively on your website or app. This API will return a complete list of offers available on the AdGate Media platform. You will need to store this list within your application and decide which offers to display to your users.

It is recommended to get a fresh list of offers every 10 minutes. Please do not use live traffic to request offers; the API should be called periodically from the backend.

## Limitations

There are certain features that are available via the AdGate Rewards offer wall that are currently not accessible via the offers API.

These include:

* A page that displays user history
* Access to thousands of market research surveys via the AdGate Rewards routing system

Please keep this in mind prior to implementation.

## API

**Method:** GET\
**Base URL:** <https://api.adgatemedia.com/v3/offers>

### Required Parameters

| Parameter  | Description                                                                                                      | Type        | Example                            |
| ---------- | ---------------------------------------------------------------------------------------------------------------- | ----------- | ---------------------------------- |
| aff        | Your affiliate ID. Can be found on the [Offers API page](http://panel.adgatemedia.com/affiliate/api/keys).       | Any Integer | `60000`                            |
| api\_key   | Your API key. Can be found on the [Offers API page](http://panel.adgatemedia.com/affiliate/api/keys).            | Any String  | `941bd1fecf7e6596823b895e04df3a0c` |
| wall\_code | Wall code that can be found on the [AdGate Rewards page](https://panel.adgatemedia.com/affiliate/vc-walls/index) | String      | `nQug`                             |

### Optional Parameters

| Parameter  | Description                                                                                                                                                                                                                                 | Type    | Example             |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------- |
| countries  | Filter by specific countries. Accepts a list of comma separated country codes.                                                                                                                                                              | String  | `gb,us,ca`          |
| offer      | Filter by specific offers. Accepts a list of comma separated offer IDs.                                                                                                                                                                     | String  | `4849,5201,4809`    |
| paymin     | Filter by offers above a minimum payout. Values are in USD.                                                                                                                                                                                 | Decimal | `0.50`              |
| minepc     | Filter by offers above a minimum EPC. Values are in USD.                                                                                                                                                                                    | Decimal | `0.05`              |
| categories | Filter by offers in certain categories. Accepts a comma separated list of category IDs. Please see the table below for the category ID list.                                                                                                | String  | `4,10,11`           |
| platform   | Filter by specific platforms. Accepts a list of comma separated platforms from this list: `desktop`, `smartphone`, `tablet`                                                                                                                 | String  | `smartphone,tablet` |
| orderby    | <p>Order results by either <code>payout</code>,<code>epc</code> , or <code>id</code>(offer id) in descending order.</p><p><code>payout</code> is calculated as the maximum payout from the offer's events. Default is <code>epc</code>.</p> | String  | `payout`            |
| take       | Limit the number of results to X. By default all results are returned.                                                                                                                                                                      | Integer | `200`               |
| skip       | Skips the first X number of results. Useful when combined with limiting (see above). By default, no offers are skipped.                                                                                                                     | Integer |                     |

#### Category List

| Category ID | Category Name        |
| ----------- | -------------------- |
| 1           | Android              |
| 2           | Downloads            |
| 3           | Email Submits        |
| 4           | Free                 |
| 10          | iPad                 |
| 11          | iPhone               |
| 12          | Lead Gen             |
| 13          | Credit Card Required |
| 14          | Mobile Subscription  |
| 16          | Surveys              |
| 17          | Videos               |
| 18          | CPC                  |
| 19          | Pay Per Call         |
| 20          | Cash Back            |
| 21          | CPI                  |
| 22          | CPE                  |
| 23          | CPA                  |

### Response

Note that country abbreviations use the ISO standard, e.g. GB instead of UK.

#### Sample Response

```json5
[
    {
        "status": "success",
        "data": [
            {
                "id": 100677,
                "name": "Final Fantasy XV iPhone CPE (US) (Incentive)",
                "product_id": "01JEEDPNV72ZX4FFY81K2HSSTC",
                "product_name": "Product #1",
                "anchor": "Final Fantasy XV",
                "description": "Be the hero of your own Final Fantasy XV adventure in the brand new mobile strategy game Final Fantasy XV!",
                "requirements": "Install and Reach Citadel level 10.",
                "pending_time": 60,
                "translations": {
                    "de": {
                        "anchor": "Final Fantasy XV",
                        "description": "Sei der Held deines eigenen Final Fantasy XV Abenteuers im brandneuen mobilen Strategiespiel Final Fantasy XV!",
                        "requirements": "Installieren und Erreichen der Zitadellebene 10!"
                    }
                },
                "device_targeting": {
                    "browsers": [
                        {"name": "chrome mobile"}
                    ],
                    "operating_systems": [
                        {
                            "name": "android",
                            "min_version": "4.4",
                            "max_version": null
                        }
                    ],
                    "devices": [
                        {"name": "samsung"}
                    ],
                    "platforms": [
                        {"name": "smartphone"},
                        {"name": "tablet"}
                    ]
                },
                "geo_targeting": {
                    "countries": [
                        {"country_code": "US"},
                        {"country_code": "CA"}
                    ],
                    "states": [
                        {"geoname_id": 5883102, "name": "Alberta"}
                    ],
                    "cities": [
                        {"geoname_id": 5913490, "name": "Calgary"}
                    ],
                    "postal_codes": [
                        {"code": "T1X 0L3"}
                    ]
                },
                "demographic_targeting": {
                    "age": {
                        "exclude": false,
                        "unknown_allowed": false,
                        "options": [
                            {
                                "min_age": 18,
                                "max_age": 25
                            },
                            {
                                "min_age": 60,
                                "max_age": null
                            }
                        ]
                    },
                    "gender": {
                        "exclude": false,
                        "unknown_allowed": true,
                        "options": [
                            "male",
                            "female"
                        ]
                    }
                },
                "creatives": {
                    "icon": "<https://linkhere>"
                },
                "epc": 1.98,
                "categories": [
                    "iPhone"
                ],
                "events": [
                    {
                        "id": "a9bf882a-5e06-49de-8cf7-a708ac653636",
                        "name": "install app",
                        "payout_type": "flat",
                        "payout": 1.30,
                        "is_cpc": false,
                        "event_type_id": 1,
                        "multiple_conversions_allowed": false,
                        "translations": {
                            "de": {
                                "label": "App installieren",
                            }
                        },
                    },
                    {
                        "id": "68c2dabe-c5f6-4785-9ea2-582fc039fe09",
                        "name": "make an in-app purchase",
                        "payout_type": "flat",
                        "payout": 20,
                        "is_cpc": false,
                        "event_type_id": 2,
                        "multiple_conversions_allowed": true,
                        "multiple_conversions_rules": {
                            "rule_type": "INTERVAL",
                            "x_conversions": 1,
                            "every_y_seconds": 60
                        },
                        "translations": {
                            "de": {
                                "label": "einen In-App-Kauf tätigen",
                            }
                        },
                    }
                ],
                "click_url": "<https://agm.mobi/vc/nQ/offers/100677?s1=>",
                "support_url": "<https://wall.adgaterewards.com/offer/contact/nQ/100677?s1=>",
                "preview_url": "<https://itunes.apple.com/app/final-fantasy-xv-a-new-empire/id1186994231?mt=8>",
                "country_stats": [
                    {
                        "country_code": "US",
                        "mobile_rank": 1,
                        "desktop_rank": 442
                    },
                    {
                        "country_code": "CA",
                        "mobile_rank": 259,
                        "desktop_rank": 189
                    }
                ],
                "session_hours": 720
            },
            "roas_goals": [
                {
                    "day": 7,
                    "goal": 1.33,
                    "roas": 0.89
                }
            ],
            "roas": [
                {
                    "day": 7,
                    "goal": 1.33,
                    "roas": 0.89
                }
            ],
            ......
        ]
    }
]
```

#### Response Parameters

<table data-header-hidden><thead><tr><th width="283.6555819477434">Key Name</th><th>Description</th></tr></thead><tbody><tr><td>Key Name</td><td>Description</td></tr><tr><td>id</td><td>AdGate offer id.</td></tr><tr><td>name</td><td>AdGate's internal offer name, <em>not to be displayed to end-users.</em></td></tr><tr><td>product_id</td><td>A unique string shared between offers which belong to same product, e.g. same mobile app.</td></tr><tr><td>product_name</td><td>The offer's product name.</td></tr><tr><td>anchor</td><td>Offer title as shown to the end-user.</td></tr><tr><td>country_stats</td><td>Mobile and desktop ranks that indicate how well the offer performs compared to other offers within the same country. If API options are provided that filter the results, such as categories or platform, the ranks are calculated within the filtered result set. Note: the ranking algorithm is subject to change in the future. Please allow for gaps in the numeric ranks.</td></tr><tr><td>description</td><td>Offer description.</td></tr><tr><td>requirements</td><td>Offer requirements. The user must complete these requirements in order to convert.</td></tr><tr><td>pending_time</td><td>Time in minutes that a reward will be held from the user following completion.</td></tr><tr><td>translations</td><td>Available translations for the offer <code>anchor</code>, <code>description</code> and <code>requirements</code>.</td></tr><tr><td>device_targeting</td><td></td></tr><tr><td>device_targeting.browsers[].name</td><td><p>If present, the offer requires one of the specified browsers.<br>Possible values are:</p><ul><li><code>chrome</code></li><li><code>firefox</code></li><li><code>safari</code></li><li><code>edge</code></li><li><code>internet explorer</code></li><li><code>chrome mobile</code></li><li><code>mobile safari</code></li></ul><p>(More values may be added in the future)</p></td></tr><tr><td>device_targeting.platforms[].name</td><td><p>If present, the offer requires one of the specified platforms.</p><p>Possible values are:</p><ul><li><code>smartphone</code></li><li><code>tablet</code></li><li><code>desktop</code></li></ul><p>(More values may be added in the future)</p></td></tr><tr><td>device_targeting.devices[].name</td><td><p>If present, the offer requires one of the specified device manufacturers.</p><p>Possible values are:</p><ul><li><code>samsung</code></li></ul><p>(More values may be added in the future)</p></td></tr><tr><td>device_targeting.device_models[].name</td><td><p>If present, the offer requires one of the specified device models.</p><p>Possible values are:</p><ul><li><code>iphone</code></li><li><code>ipad</code></li></ul><p>(More values may be added in the future)</p></td></tr><tr><td>device_targeting.operating_systems[].name</td><td><p>If present, the offer requires one of the specified operating systems.</p><p>Possible values are:</p><ul><li><code>windows</code></li><li><code>mac os</code></li><li><code>ios</code></li><li><code>android</code></li></ul><p>(More values may be added in the future)</p></td></tr><tr><td>device_targeting.operating_systems[].min_version</td><td>Minimum version number of the operating system above. If there is no minimum version requirement, this value will be <em>null</em>.</td></tr><tr><td>device_targeting.operating_systems[].min_version</td><td>Maximum version number of the operating system above. If there is no minimum version requirement, this value will be <em>null</em>.</td></tr><tr><td>geo_targeting</td><td></td></tr><tr><td>geo_targeting.countries[].country_code</td><td>The two-letter country codes this offer is available to. If no countries are provided, all countries are permitted. Use "GB" for the UK.</td></tr><tr><td>geo_targeting.states[].geoname_id</td><td>The states/regions that the offer is limited to, provided by the geoname ID. You may find a searchable and downloadable database of geoname IDs from <a href="https://www.geonames.org/">https://www.geonames.org/</a></td></tr><tr><td>geo_targeting.states[].name</td><td>The name of the state/region as provided by Geonames.</td></tr><tr><td>geo_targeting.cities[].geoname_id</td><td>The cities that the offer is limited to, provided by the geoname ID.</td></tr><tr><td>geo_targeting.cities[].name</td><td>The name of the city as provided by Geonames.</td></tr><tr><td>geo_targeting.postal_codes[].code</td><td>The postal code the offer is limited to.</td></tr><tr><td>demographic_targeting.age.exclude</td><td>Whether to exclude the specified age groups from the targeting.</td></tr><tr><td>demographic_targeting.age.unknown_allowed</td><td>Whether to allow users with unknown or unspecified age.</td></tr><tr><td>demographic_targeting.age.options[].min_age</td><td>The minimum age for the range (inclusive).</td></tr><tr><td>demographic_targeting.age.options[].max_age</td><td>The maximum age for the range (inclusive).</td></tr><tr><td>demographic_targeting.gender.exclude</td><td>Whether to exclude the specified gender groups from the targeting.</td></tr><tr><td>demographic_targeting.gender.unknown_allowed</td><td>Whether to allow users with unknown or unspecified gender.</td></tr><tr><td>demographic_targeting.gender.options[]</td><td>An array of strings specifying the genders.</td></tr><tr><td>creatives</td><td>Object of key-values representing creatives, such as the offer's icon.</td></tr><tr><td>epc</td><td>Network-wide EPCs</td></tr><tr><td>categories</td><td>An array of offer categories (listed above)</td></tr><tr><td>events</td><td>An array of offer events.</td></tr><tr><td>event.id</td><td>UUID of the event</td></tr><tr><td>event.name</td><td>Event title</td></tr><tr><td>event.payout_type</td><td>One of "flat" or "dynamic". Flat payouts don't change. Dynamic payouts vary. Only 'flat' events are served at the moment.</td></tr><tr><td>event.payout</td><td>The dollar amount.</td></tr><tr><td>event.is_cpc</td><td>Boolean. Indicates if the offer event is CPC (cost-per-click).</td></tr><tr><td>event.multiple_conversions_allowed</td><td>Boolean. Indicates if the offer event allows multiple conversions for a single user (IP), according to the rules specified in "multiple_conversions_rules".</td></tr><tr><td>event.multiple_conversions_rules</td><td>Only present if "multiple_conversions_allowed" is <strong>true</strong>. It is an object with the following values:<br><br><strong>rule_type:</strong> Can be one of "UNLIMITED" or "INTERVAL". "UNLIMITED" means that the offer event can be completed an indefinite amount of times without time limit. "INTERVAL" means the offer event can be completed a certain amount of times in a given amount of time, in the format "allow X conversions every Y seconds".<br> <strong>x_conversions:</strong> Integer when the rule type is "INTERVAL", "null" otherwise.<br> <strong>every_y_seconds:</strong> Integer when the rule type is "INTERVAL", "null" otherwise.<br><br>More attempts than the rule allows will not result in a conversion.</td></tr><tr><td>event.event_type_id</td><td>ID used to identify the  event type</td></tr><tr><td>event.translations</td><td>Available translations for the event name (<code>label</code>).</td></tr><tr><td>click_url</td><td>Tracking link. The <code>s1</code> parameter should include the ID of the user accessing the offer. The ID can be any string up to 255 characters long. <code>s2</code>,<code>s3</code>,<code>s4</code> and <code>s5</code> subids are available.</td></tr><tr><td>support_url</td><td>The URL the user can access to get support in case they are not rewarded. The <code>s1</code> parameter is required (see <code>click_url</code> above for info.) Note that most offers require waiting at least one hour after clicking an offer to be able to contact support.</td></tr><tr><td>preview_url</td><td>Preview of the offer's landing page.</td></tr><tr><td>app_metadata.app_id</td><td>App ID on the mobile app store. It can be either App Store or Google Play Store app ID.</td></tr><tr><td>app_metadata.categories</td><td>An array of app metadata categories.</td></tr><tr><td>app_metadata.screenshot_urls</td><td>An array of app metadata screenshot URLs.</td></tr><tr><td>app_metadata.video_urls</td><td>An array of app metadata video URLs.</td></tr><tr><td>is_game</td><td>Whether the offer is a game offer</td></tr><tr><td>session_hours</td><td>The maximum number of hours that a user has to complete the offer after clicking it.</td></tr><tr><td>roas_goals</td><td>Offer-level ROAS: one object per configured cohort day that we support, with goal vs observed ROAS for the offer network-wide.</td></tr><tr><td>roas</td><td>Offer + affiliate (wall) level: same cohort idea, but scoped to this wall’s / affiliate’s traffic on the offer. Same object shape as roas_goals.</td></tr></tbody></table>

#### Offer Event Types

The following table shows the list of offer event type ids that can be retrieved in the API:

| ID   | Type                     |
| ---- | ------------------------ |
| 1    | Install                  |
| 2    | Event                    |
| 3    | Purchase                 |
| 4    | Dynamic Event: Adjust    |
| 5    | Dynamic Event: Playtime  |
| 6    | Dynamic Event: AppsFluer |
| NULL | N/A                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.prodegeads.com/publisher-apis/offers-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
