# Search in mega ads

Endpoint: POST /ads/mega/search
Version: 2.0.0

## Request fields (application/json):

  - `api_key` (string)
    Your API Key token.
    Example: "YOUR_API_KEY_HERE"

  - `last_hit` (integer)
    after first page send the current timestamp in seconds

  - `page` (integer)
    Example: 1

## Response 200 fields (application/json):

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

  - `meta` (object, required)

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

  - `meta.message` (string,null)

  - `data` (object, required)

  - `data.ads` (array)

  - `data.ads.id` (integer)
    Ad's 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 link. Present only when proper information is available.
    Example: "google.com"

  - `data.ads.similarweb` (integer)
    Domain's monthly traffic. 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)
    Ad's url in the platform. Present only when platform is not native or display.
    Example: "https://x.com/10000"

  - `data.ads.owner` (any) — one of:
    - FacebookOwner:
      - `id` (integer)
        Example: 100000
      - `name` (string)
        Example: "facebook"
      - `avatar_url` (string)
        Owner's avatar url
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `is_verified` (boolean)
        Owner is verified
    - MetaOwner:
      - `id` (integer)
        Example: 346860
      - `avatar_url` (string)
        Example: "https://cdn.adflex.io/example-148x148.jpg"
      - `name` (string)
        Example: "FRM Tegelwerk"
      - `is_verified` (boolean)
    - NativeOwner:
      - `id` (integer)
        Example: 100
      - `name` (string)
        Example: "google.com"
      - `avatar_url` (string)
        Example: "https://cdn.adflex.io/example-100x100.png"
    - DisplayOwner:
      - `id` (integer)
        Example: 100
      - `name` (string)
        Example: "google.com"
      - `avatar_url` (string)
        Example: "https://cdn.adflex.io/example-100x100.png"
    - PinterestOwner:
      - `id` (integer)
        Example: 100000
      - `name` (string)
        Example: "test"
      - `avatar_url` (string)
        Owner's avatar url
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `is_verified` (boolean)
        Owner is verified
    - RedditOwner:
      - `id` (integer)
        Example: 100000
      - `name` (string)
        Example: "test"
      - `avatar_url` (string)
        Owner's avatar url
        Example: "https://cdn.adflex.io/example-100x100.png"
    - TiktokOwner:
      - `id` (integer)
        Example: 100000
      - `name` (string)
        Example: "test"
      - `avatar_url` (string)
        Owner's avatar url
        Example: "https://cdn.adflex.io/example-100x100.png"
    - XOwner:
      - `id` (integer)
        Example: 100000
      - `name` (string)
        Example: "test"
      - `avatar_url` (string)
        Owner's avatar url
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `is_verified` (boolean)
        Owner is verified
        Example: true
    - YoutubeOwner:
      - `id` (integer)
        Example: 100000
      - `name` (string)
        Example: "test"
      - `avatar_url` (string)
        Owner's avatar url
        Example: "https://cdn.adflex.io/example-100x100.png"

  - `data.ads.attachments` (array) — one of:
    - FacebookAttachments:
      - `id` (integer)
        Example: 10
      - `type` (string)
        Enum: "image", "video"
      - `url` (string)
        if attachment is video it's video file path otherwise it is image path
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `thumbnail` (string)
        if attachment is video it is thumbnail path
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `subtitle` (string)
        Example: "test"
    - MetaAttachments:
      - `id` (integer)
        Example: 10
      - `type` (string)
        Enum: same as `type` in "FacebookAttachments" (2 values)
      - `url` (string)
        Example: "https://cdn.adflex.io/example-1440x1446.jpg"
      - `thumbnail` (string)
        if attachment is video it is thumbnail path
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `subtitle` (string)
    - NativeAttachments:
      - `id` (integer)
        Example: 10
      - `type` (string)
        Enum: "image", "video", "clip"
      - `url` (string)
        Example: "https://cdn.adflex.io/example-1440x1446.jpg"
      - `thumbnail` (string)
        if attachment is video it is thumbnail path
        Example: "https://cdn.adflex.io/example-100x100.png"
    - DisplayAttachments:
      - `id` (integer)
        Example: 10
      - `type` (string)
        Enum: same as `type` in "NativeAttachments" (3 values)
      - `url` (string)
        Example: "https://cdn.adflex.io/example-1440x1446.jpg"
      - `thumbnail` (string)
        if attachment is video it is thumbnail path
        Example: "https://cdn.adflex.io/example-100x100.png"
    - PinterestAttachments:
      - `id` (integer)
        Example: 10
      - `type` (string)
        Enum: same as `type` in "FacebookAttachments" (2 values)
      - `url` (string)
        if attachment is video it's video file path otherwise it is image path
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `thumbnail` (string)
        if attachment is video it is thumbnail path
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `subtitle` (string)
        Example: "test"
      - `duration` (integer)
        Example: 15
    - RedditAttachments:
      - `id` (integer)
        Example: 10
      - `type` (string)
        Enum: same as `type` in "FacebookAttachments" (2 values)
      - `url` (string)
        Example: "https://cdn.adflex.io/example-1440x1446.jpg"
      - `thumbnail` (string)
        Example: "https://cdn.adflex.io/example-100x100.png"
    - TiktokAttachments:
      - `id` (integer)
        Example: 10
      - `type` (string)
        Example: "video"
      - `url` (string)
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `thumbnail` (string)
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `duration` (integer)
        Example: 15
    - XAttachments:
      - `id` (integer)
        Example: 10
      - `type` (string)
        Enum: same as `type` in "FacebookAttachments" (2 values)
      - `url` (string)
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `thumbnail` (string)
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `subtitle` (string)
        Example: "test"
      - `duration` (integer)
        Example: 15
    - YoutubeAttachments:
      - `id` (integer)
        Example: 10
      - `type` (string)
        Example: "youtube"
      - `youtube_id` (string)
        Example: "34frFg5BYf"
      - `thumbnail` (string)
        Example: "https://cdn.adflex.io/example-100x100.png"
      - `duration` (integer)
        Example: 15

  - `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 request page
    Example: 1

  - `data.has_next_page` (boolean)
    Defines that next page has ads or not

  - `data.last_hit` (integer)
    after first page send the current timestamp in seconds
    Example: 12321321


