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

# /facebook/ads

> Get a Facebook Ad Library ad by Library ID

**Price:** 5 credits

**⚠️ Common errors:** 412: Ad not found. Verify the Library ID.



## OpenAPI

````yaml /openapi/ad-transparency.json post /api/facebook/ads
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/facebook/ads:
    post:
      tags:
        - /facebook/ads
      summary: /facebook/ads
      description: |-
        Get a Facebook Ad Library ad by Library ID

        **Price:** 5 credits

        **⚠️ Common errors:** 412: Ad not found. Verify the Library ID.
      operationId: __api_facebook_ads_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FacebookAdsPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FacebookAd'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FacebookAdsPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        ad:
          type: string
          minLength: 1
      type: object
      required:
        - ad
    FacebookAd:
      properties:
        '@type':
          type: string
          default: FacebookAd
        id:
          type: string
        url:
          type: string
        is_active:
          type: boolean
          default: false
        started_at:
          anyOf:
            - type: integer
            - type: 'null'
        ended_at:
          anyOf:
            - type: integer
            - type: 'null'
        platforms:
          items:
            type: string
          type: array
          default: []
        country:
          anyOf:
            - type: string
            - type: 'null'
        categories:
          items:
            type: string
          type: array
          default: []
        collation_count:
          anyOf:
            - type: integer
            - type: 'null'
        advertiser:
          anyOf:
            - $ref: '#/components/schemas/FacebookAdvertiser'
            - type: 'null'
        creatives:
          items:
            $ref: '#/components/schemas/FacebookAdCreative'
          type: array
          default: []
        text:
          anyOf:
            - type: string
            - type: 'null'
        caption:
          anyOf:
            - type: string
            - type: 'null'
        cta_text:
          anyOf:
            - type: string
            - type: 'null'
        cta_type:
          anyOf:
            - type: string
            - type: 'null'
        link_url:
          anyOf:
            - type: string
            - type: 'null'
        link_description:
          anyOf:
            - type: string
            - type: 'null'
        display_format:
          anyOf:
            - type: string
            - type: 'null'
        is_reshared:
          type: boolean
          default: false
        contains_sensitive_content:
          type: boolean
          default: false
        total_active_time:
          anyOf:
            - type: integer
            - type: 'null'
        branded_content:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
        additional_info:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
        currency:
          anyOf:
            - type: string
            - type: 'null'
        spend_range:
          anyOf:
            - type: string
            - type: 'null'
        reach_estimate:
          anyOf:
            - type: string
            - type: 'null'
        impressions_range:
          anyOf:
            - type: string
            - type: 'null'
        disclaimer_label:
          anyOf:
            - type: string
            - type: 'null'
        fev_info:
          anyOf:
            - $ref: '#/components/schemas/FacebookAdFevInfo'
            - type: 'null'
      type: object
      required:
        - id
        - url
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    FacebookAdvertiser:
      properties:
        '@type':
          type: string
          default: FacebookAdvertiser
        id:
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
        alias:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        categories:
          items:
            type: string
          type: array
          default: []
        like_count:
          anyOf:
            - type: integer
            - type: 'null'
        byline:
          anyOf:
            - type: string
            - type: 'null'
        is_deleted:
          type: boolean
          default: false
      type: object
      required:
        - id
    FacebookAdCreative:
      properties:
        '@type':
          type: string
          default: FacebookAdCreative
        image:
          anyOf:
            - type: string
            - type: 'null'
        image_resized:
          anyOf:
            - type: string
            - type: 'null'
        video:
          anyOf:
            - type: string
            - type: 'null'
        video_preview:
          anyOf:
            - type: string
            - type: 'null'
        cards:
          items:
            $ref: '#/components/schemas/FacebookAdCard'
          type: array
          default: []
      type: object
    FacebookAdFevInfo:
      properties:
        '@type':
          type: string
          default: FacebookAdFevInfo
        authorized_entity_text:
          anyOf:
            - type: string
            - type: 'null'
        submitted_on:
          anyOf:
            - type: string
            - type: 'null'
        phone:
          anyOf:
            - type: string
            - type: 'null'
        email:
          anyOf:
            - type: string
            - type: 'null'
        website:
          anyOf:
            - type: string
            - type: 'null'
        address:
          anyOf:
            - type: string
            - type: 'null'
        additional_info:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
    FacebookAdCard:
      properties:
        '@type':
          type: string
          default: FacebookAdCard
        text:
          anyOf:
            - type: string
            - type: 'null'
        caption:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        video:
          anyOf:
            - type: string
            - type: 'null'
        video_preview:
          anyOf:
            - type: string
            - type: 'null'
        link_url:
          anyOf:
            - type: string
            - type: 'null'
        link_description:
          anyOf:
            - type: string
            - type: 'null'
        cta_text:
          anyOf:
            - type: string
            - type: 'null'
        cta_type:
          anyOf:
            - type: string
            - type: 'null'
      type: object
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````