# Search ads across platforms

Endpoint: POST /v2/ads/mega/search
Version: 2.0.0
Security: ApiKeyAuth

## Request fields (application/json):

  - `last_hit` (integer)
    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.

  - `page` (integer)
    Requested page number. Each page returns up to 18 ads. The page size is fixed and cannot be changed.

  - `advanced_order` (object)

  - `advanced_order.orderby` (string)

  - `advanced_order.order` (string)

  - `platforms` (array)

  - `search_field` (array)

  - `search_field.type` (string)

  - `search_field.text` (string)

## Response 200 fields (application/json):

  - `status` (string, required)
    Enum: "ok", "failed"

  - `meta` (object, required)

  - `meta.code` (integer)
    Example: 1000

  - `meta.message` (string)
    Example: null

  - `data` (object, required)

  - `data.ads` (array)

  - `data.ads.id` (integer)
    Ad ID
    Example: 1234

  - `data.ads.is_bookmarked` (boolean)
    Example: true

  - `data.ads.platform` (string)
    Enum: "facebook", "meta", "native", "display", "pinterest", "reddit", "tikTok", "x", "youTube"

  - `data.ads.title` (string)
    Ad's title. Present only when proper information is available.
    Example: test title

  - `data.ads.display_url` (string)
    Ad's target domain. Present only when proper information is available.
    Example: google.com

  - `data.ads.similarweb` (integer)
    Estimated monthly domain visits. Present only when proper information is available.
    Example: 1500

  - `data.ads.last_seen` (string)
    last updated time. Present only when proper information is available.
    Example: 10 minutes ago

  - `data.ads.post_url` (string)
    URL of the ad on the platform. Present only when platform is not native or display.
    Example: https://x.com/10000

  - `data.ads.owner` (any)

  - `data.ads.owner.id` (integer)
    Example: 100000

  - `data.ads.owner.name` (string)
    Example: facebook

  - `data.ads.owner.avatar_url` (string)
    Owner's avatar url
    Example: https://cdn.adflex.io/example-100x100.png

  - `data.ads.owner.is_verified` (boolean)
    Owner is verified

  - `data.ads.owner.avatar_url` (string)
    Example: https://cdn.adflex.io/example-148x148.jpg

  - `data.ads.owner.is_verified` (boolean)
    Example: false

  - `data.ads.attachments` (array)

  - `data.ads.attachments.id` (integer)
    Example: 10

  - `data.ads.attachments.type` (string)
    Enum: "image", "video"

  - `data.ads.attachments.url` (string)
    For video attachments, the video URL; for image attachments, the image URL
    Example: https://cdn.adflex.io/example-100x100.png

  - `data.ads.attachments.thumbnail` (string)
    Thumbnail URL for video attachments
    Example: https://cdn.adflex.io/example-100x100.png

  - `data.ads.attachments.subtitle` (string)
    Example: test

  - `data.ads.attachments.duration` (integer)
    Example: 15

  - `data.ads.attachments.youtube_id` (string)
    Example: 34frFg5BYf

  - `data.ads.stats` (array)
    Example: [{"tooltip":"View","value":10,"icon":"eye"},{"tooltip":"Like","value":10,"icon":"like"},{"tooltip":"Repost","value":10,"icon":"arrow-rotate"}]

  - `data.ads.stats.tooltip` (string)

  - `data.ads.stats.value` (integer)

  - `data.ads.stats.icon` (string)

  - `data.ads.metadata` (array)
    Example: [{"tooltip":"Region","value":["flag-ar","flag-de","flag-fr"]},{"tooltip":"Estimated Impression","value":10},{"tooltip":"Days Running","value":"15 Days"}]

  - `data.ads.metadata.tooltip` (string)

  - `data.ads.metadata.value` (any)

  - `data.current_page` (integer)
    Current page number
    Example: 1

  - `data.has_next_page` (boolean)
    Indicates whether more results are available

  - `data.last_hit` (integer)
    The timestamp in seconds used for snapshot pagination
    Example: 12321321

