Skip to content

Search Native ads

Request

Security
ApiKeyAuth
Bodyapplication/jsonrequired
last_hitinteger, (int64)

Snapshot timestamp returned in data.last_hit by the page 1 response. Omit this field for page 1. For page 2 and later, resend the original value unchanged while using the same filters and sorting. This value does not expire.

pageinteger, >= 1

Requested page number. Each page returns up to 18 ads. The page size is fixed and cannot be changed.

Default:1
Example:1
advanced_orderobject
Example:
{ "orderby": "newest", "order": "desc" }
placementsArray of integers
Example:
[ 1082, 1083 ]
networksArray of integers
Example:
[ 19462, 19463 ]
publishersArray of integers
Example:
[ 79 ]
search_fieldArray of objects
Example:
[ { "type": "text", "text": "service" }, { "type": "without_owner_name", "text": "resultspulse.com" } ]
POST
/v2/ads/native/search
curl -i -X POST \
  https://api.adflex.io/api/v2/ads/native/search \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "page": 1,
    "advanced_order": {
      "orderby": "newest",
      "order": "desc"
    },
    "placements": [
      1082,
      1083
    ],
    "networks": [
      19462,
      19463
    ],
    "publishers": [
      79
    ],
    "search_field": [
      {
        "type": "text",
        "text": "service"
      },
      {
        "type": "without_owner_name",
        "text": "resultspulse.com"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
statusstringrequired
Enum:"ok""failed"
metaobjectrequired
dataobjectrequired
Response
{ "status": "ok", "meta": { "code": 1000, "message": null }, "data": { "ads": [ … ], "current_page": 1, "has_next_page": true, "last_hit": 12321321 } }