Skip to content

Search Display 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:
[ 1728, 1729, 1723, 1724 ]
networksArray of integers
Example:
[ 19481, 19484 ]
publishersArray of integers
Example:
[ 49, 31 ]
search_fieldArray of objects
Example:
[ { "type": "text", "text": "skills" }, { "type": "without_owner_name", "text": "codefinity.com" } ]
POST
/v2/ads/display/search
curl -i -X POST \
  https://api.adflex.io/api/v2/ads/display/search \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "page": 1,
    "advanced_order": {
      "orderby": "newest",
      "order": "desc"
    },
    "placements": [
      1728,
      1729,
      1723,
      1724
    ],
    "networks": [
      19481,
      19484
    ],
    "publishers": [
      49,
      31
    ],
    "search_field": [
      {
        "type": "text",
        "text": "skills"
      },
      {
        "type": "without_owner_name",
        "text": "codefinity.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 } }