> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Ads ad API

> Get one ad's details from Meta, Google, TikTok, LinkedIn, Microsoft or Pinterest. Call the Ads ad API for JSON. 2 credits per call.

* **Endpoint:** `ads.ad`
* **Returns:** `data` has `adId`, `adUrl`, `pageId`, `pageName`, `pageUrl`, `pageAvatarUrl`, `pageCategories`, `pageLikes`, `isActive`, `firstShownAt`, `lastShownAt`, `platforms`, `format`, `text`, `linkUrl`, `linkTitle`, `linkDescription`, `ctaText`, `imageUrls`, `videoUrls`, `cards`, `versions`, `categories`, `paidBy`, `spendMin`, `spendMax`, `spendCurrency`, `impressionsMin`, `impressionsMax`, `reachMin`, `reachMax`, `countries`, `advertiserDescription`, `advertiserCategory`, `advertiserVerification`, `advertiserInstagram`, `advertiserInstagramFollowers`, `audienceAgeGender`, `audienceRegions`, `euReachTotal`, `euReachByCountry`, `payers`, `advertiserId`, `advertiserName`, `advertiserUrl`, `domain`, `daysShown`, `previewUrl`, `imageUrl`, `advertiserCountry`, `advertiserIsVerified`, `variations`, `regions`, `targetingIncluded`, `targetingExcluded`, `headline`, `videoUrl`, `thumbnailUrl`, `objective`, `category`, `audienceSizeMin`, `audienceSizeMax`, `languages`, `interests`, `creativeType`, `advertiserAvatarUrl`, `postedBy`, `targeting`, `targetingUsed`, `linkCaption`, `advertisers`, `links`, `reachByCountry`, `ageRanges`, `genders`, `audienceTypes`, `isCommercial`.
* **Cost:** 2 credits per call. Failed calls cost nothing.
* **Paging:** No.

## Example

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.ads.ad({ network: "meta", ad: "1234567890123456" });
  console.log(result.data);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.ads.ad(network="meta", ad="1234567890123456")
  print(result["data"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/ads/ad \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"network":"meta","ad":"1234567890123456"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy ads ad 1234567890123456 --network meta
  ```
</CodeGroup>


## OpenAPI

````yaml api-reference/openapi.json POST /v1/ads/ad
openapi: 3.1.0
info:
  title: Stophy API
  version: '1'
  description: >-
    Every endpoint is a POST that takes its input as a JSON object body. Unknown
    fields are rejected with 400.


    Responses leave out empty values: null, empty strings, empty objects and
    empty nested lists are not sent.


    x-credits is what one call costs. Every call costs the same, whatever it
    returns.


    When a response has a cursor, send it back with the same input to get the
    next page.
servers:
  - url: https://api.stophy.dev
security:
  - apiKey: []
paths:
  /v1/ads/ad:
    post:
      summary: >-
        Get one ad's details from Meta, Google, TikTok, LinkedIn, Microsoft or
        Pinterest
      description: Costs 2 credits per call.
      operationId: adsAd
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    ad:
                      type: string
                    network:
                      type: string
                      const: meta
                  required:
                    - ad
                    - network
                  additionalProperties: false
                - type: object
                  properties:
                    advertiser:
                      type: string
                    ad:
                      type: string
                    network:
                      type: string
                      const: google
                  required:
                    - ad
                    - network
                  additionalProperties: false
                - type: object
                  properties:
                    ad:
                      type: string
                    network:
                      type: string
                      const: tiktok
                  required:
                    - ad
                    - network
                  additionalProperties: false
                - type: object
                  properties:
                    ad:
                      type: string
                    network:
                      type: string
                      const: linkedin
                  required:
                    - ad
                    - network
                  additionalProperties: false
                - type: object
                  properties:
                    ad:
                      type: string
                      pattern: ^\d{1,20}$
                    network:
                      type: string
                      const: microsoft
                  required:
                    - ad
                    - network
                  additionalProperties: false
                - type: object
                  properties:
                    ad:
                      type: string
                    network:
                      type: string
                      const: pinterest
                  required:
                    - ad
                    - network
                  additionalProperties: false
      responses:
        '200':
          description: The data, and the credits this call used.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            x-credits-used:
              $ref: '#/components/headers/CreditsUsed'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            x-cache:
              $ref: '#/components/headers/Cache'
            x-cache-age:
              $ref: '#/components/headers/CacheAge'
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                  - creditsUsed
                  - requestId
                properties:
                  success:
                    const: true
                  data:
                    anyOf:
                      - type: object
                        additionalProperties: false
                        properties:
                          adId:
                            type: string
                          adUrl:
                            type: string
                            format: uri
                          pageId:
                            type: string
                          pageName:
                            type: string
                          pageUrl:
                            type: string
                            format: uri
                          pageAvatarUrl:
                            type: string
                            format: uri
                          pageCategories:
                            type: array
                            items:
                              type: string
                          pageLikes:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          isActive:
                            type: boolean
                          firstShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          lastShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          platforms:
                            type: array
                            items:
                              type: string
                          format:
                            type: string
                          text:
                            type: string
                          linkUrl:
                            type: string
                            format: uri
                          linkTitle:
                            type: string
                          linkDescription:
                            type: string
                          ctaText:
                            type: string
                          imageUrls:
                            type: array
                            items:
                              type: string
                              format: uri
                          videoUrls:
                            type: array
                            items:
                              type: string
                              format: uri
                          cards:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                text:
                                  type: string
                                linkUrl:
                                  type: string
                                  format: uri
                                linkTitle:
                                  type: string
                                ctaText:
                                  type: string
                                imageUrl:
                                  type: string
                                  format: uri
                                videoUrl:
                                  type: string
                                  format: uri
                              required: []
                          versions:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          categories:
                            type: array
                            items:
                              type: string
                          paidBy:
                            type: string
                          spendMin:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          spendMax:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          spendCurrency:
                            type: string
                            pattern: ^[A-Z]{3}$
                            description: ISO 4217 currency code, e.g. USD.
                          impressionsMin:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          impressionsMax:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          reachMin:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          reachMax:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          countries:
                            type: array
                            items:
                              type: string
                          advertiserDescription:
                            type: string
                          advertiserCategory:
                            type: string
                          advertiserVerification:
                            type: string
                          advertiserInstagram:
                            type: string
                          advertiserInstagramFollowers:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          audienceAgeGender:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                age:
                                  type: string
                                female:
                                  type: number
                                male:
                                  type: number
                                unknown:
                                  type: number
                              required:
                                - female
                                - male
                                - unknown
                          audienceRegions:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                region:
                                  type: string
                                share:
                                  type: number
                              required:
                                - share
                          euReachTotal:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          euReachByCountry:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                country:
                                  type: string
                                age:
                                  type: string
                                female:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                male:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                unknown:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                              required:
                                - female
                                - male
                                - unknown
                          payers:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                paidBy:
                                  type: string
                                beneficiary:
                                  type: string
                              required: []
                        required:
                          - adUrl
                          - isActive
                          - versions
                      - type: object
                        additionalProperties: false
                        properties:
                          adId:
                            type: string
                          adUrl:
                            type: string
                            format: uri
                          advertiserId:
                            type: string
                          advertiserName:
                            type: string
                          advertiserUrl:
                            type: string
                            format: uri
                          domain:
                            type: string
                          format:
                            type: string
                            enum:
                              - text
                              - image
                              - video
                              - unknown
                          firstShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          lastShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          daysShown:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          previewUrl:
                            type: string
                            format: uri
                          imageUrl:
                            type: string
                            format: uri
                          advertiserCountry:
                            type: string
                          advertiserIsVerified:
                            type: boolean
                          paidBy:
                            type: string
                          impressionsMin:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          impressionsMax:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          variations:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                previewUrl:
                                  type: string
                                  format: uri
                                imageUrl:
                                  type: string
                                  format: uri
                                videoUrl:
                                  type: string
                                  format: uri
                              required: []
                          regions:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                country:
                                  type: string
                                firstShownAt:
                                  type: string
                                  format: date-time
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                lastShownAt:
                                  type: string
                                  format: date-time
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                impressionsMin:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                impressionsMax:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                              required: []
                          targetingIncluded:
                            type: array
                            items:
                              type: string
                          targetingExcluded:
                            type: array
                            items:
                              type: string
                        required:
                          - adUrl
                          - advertiserUrl
                          - format
                      - type: object
                        additionalProperties: false
                        properties:
                          adId:
                            type: string
                          adUrl:
                            type: string
                            format: uri
                          advertiserName:
                            type: string
                          headline:
                            type: string
                          firstShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          lastShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          reachMin:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          reachMax:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          videoUrl:
                            type: string
                            format: uri
                          thumbnailUrl:
                            type: string
                            format: uri
                          imageUrls:
                            type: array
                            items:
                              type: string
                              format: uri
                          advertiserId:
                            type: string
                          advertiserCountry:
                            type: string
                          paidBy:
                            type: string
                          linkUrl:
                            type: string
                            format: uri
                          ctaText:
                            type: string
                          objective:
                            type: string
                          category:
                            type: string
                          audienceSizeMin:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          audienceSizeMax:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          impressionsMin:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          impressionsMax:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          countries:
                            type: array
                            items:
                              type: string
                          languages:
                            type: array
                            items:
                              type: string
                          interests:
                            type: string
                          regions:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                country:
                                  type: string
                                impressionsMin:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                impressionsMax:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                ages:
                                  type: array
                                  items:
                                    type: string
                                genders:
                                  type: array
                                  items:
                                    type: string
                              required: []
                        required:
                          - adUrl
                      - type: object
                        additionalProperties: false
                        properties:
                          adId:
                            type: string
                          adUrl:
                            type: string
                            format: uri
                          creativeType:
                            type: string
                          format:
                            type: string
                          advertiserName:
                            type: string
                          advertiserUrl:
                            type: string
                            format: uri
                          advertiserAvatarUrl:
                            type: string
                            format: uri
                          postedBy:
                            type: string
                          text:
                            type: string
                          headline:
                            type: string
                          imageUrls:
                            type: array
                            items:
                              type: string
                              format: uri
                          paidBy:
                            type: string
                          ctaText:
                            type: string
                          videoUrls:
                            type: array
                            items:
                              type: string
                              format: uri
                          firstShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          lastShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          impressionsMin:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          impressionsMax:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          countries:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                country:
                                  type: string
                                share:
                                  type: number
                              required: []
                          targeting:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                parameter:
                                  type: string
                                description:
                                  type: string
                              required: []
                          targetingUsed:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                parameter:
                                  type: string
                                isTargeted:
                                  type: boolean
                                isExcluded:
                                  type: boolean
                              required:
                                - isTargeted
                                - isExcluded
                        required:
                          - adUrl
                      - type: object
                        additionalProperties: false
                        properties:
                          adId:
                            type: string
                          advertiserId:
                            type: string
                          advertiserName:
                            type: string
                          headline:
                            type: string
                          text:
                            type: string
                          linkUrl:
                            type: string
                            format: uri
                          linkCaption:
                            type: string
                          imageUrls:
                            type: array
                            items:
                              type: string
                              format: uri
                          paidBy:
                            type: string
                          firstShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          lastShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          impressionsMin:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          impressionsMax:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          countries:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                country:
                                  type: string
                                share:
                                  type: number
                              required: []
                          targeting:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                type:
                                  type: string
                                isExcluded:
                                  type: boolean
                              required:
                                - isExcluded
                        required: []
                      - type: object
                        additionalProperties: false
                        properties:
                          adId:
                            type: string
                          adUrl:
                            type: string
                            format: uri
                          headline:
                            type: string
                          text:
                            type: string
                          advertisers:
                            type: array
                            items:
                              type: string
                          imageUrl:
                            type: string
                            format: uri
                          videoUrl:
                            type: string
                            format: uri
                          links:
                            type: array
                            items:
                              type: string
                              format: uri
                          firstShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          lastShownAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          reachMin:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          reachMax:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          reachByCountry:
                            type: array
                            items:
                              type: object
                              additionalProperties: false
                              properties:
                                country:
                                  type: string
                                reachMin:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                reachMax:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                              required: []
                          countries:
                            type: array
                            items:
                              type: string
                          ageRanges:
                            type: array
                            items:
                              type: string
                          genders:
                            type: array
                            items:
                              type: string
                          interests:
                            type: array
                            items:
                              type: string
                          audienceTypes:
                            type: array
                            items:
                              type: string
                          isCommercial:
                            type: boolean
                        required:
                          - adUrl
                          - isCommercial
                  creditsUsed:
                    type: integer
                  requestId:
                    type: string
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
components:
  headers:
    RequestId:
      description: The request id. Quote it when you report a problem.
      schema:
        type: string
    CreditsUsed:
      description: Credits this call used.
      schema:
        type: integer
    RateLimitLimit:
      description: Requests allowed in the current window.
      schema:
        type: integer
    RateLimitRemaining:
      description: Requests left in the current window.
      schema:
        type: integer
    RateLimitReset:
      description: Unix time in seconds when the current window resets.
      schema:
        type: integer
    Cache:
      description: hit if this result came from the cache, miss if it was fetched live.
      schema:
        type: string
    CacheAge:
      description: Seconds since the returned result was written to the cache.
      schema:
        type: integer
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  responses:
    Error:
      description: The request failed. retryable says whether trying again can help.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          const: false
        error:
          type: object
          required:
            - code
            - message
            - retryable
            - requestId
          properties:
            code:
              type: string
              enum:
                - agentCodeCompleted
                - agentCodeNotFound
                - agentEmailMismatch
                - cliSessionCompleted
                - cliSessionExists
                - cliSessionNotFound
                - forbidden
                - insufficientCredits
                - internalError
                - invalidCliSession
                - invalidCliVerifier
                - invalidRequest
                - notFound
                - rateLimited
                - sourceChanged
                - sourceRefused
                - sourceTimeout
                - sourceUnavailable
                - tooManyInFlight
                - unauthorized
                - unsupportedMediaType
            message:
              type: string
            retryable:
              type: boolean
            retryAfterSeconds:
              type: integer
            requestId:
              type: string
            requiredCredits:
              type: number
            availableCredits:
              type: number
            billingUrl:
              type: string
              const: https://stophy.dev/billing
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````