> ## 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.

# /linkedin/ad_library/ads

> Get a single LinkedIn Ad Library ad by its id

**Price:** 1 credit

**⚠️ Common errors:** 412: Ad not found. Verify the ad id.



## OpenAPI

````yaml /openapi/ad-transparency.json post /api/linkedin/ad_library/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/linkedin/ad_library/ads:
    post:
      tags:
        - /linkedin/ad_library
      summary: /linkedin/ad_library/ads
      description: |-
        Get a single LinkedIn Ad Library ad by its id

        **Price:** 1 credit

        **⚠️ Common errors:** 412: Ad not found. Verify the ad id.
      operationId: __api_linkedin_ad_library_ads_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkedinAdsPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LinkedinAd'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LinkedinAdsPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        ad:
          type: string
          minLength: 1
      type: object
      required:
        - ad
    LinkedinAd:
      properties:
        '@type':
          type: string
          default: LinkedinAd
        id:
          type: string
        url:
          type: string
        advertiser:
          anyOf:
            - $ref: '#/components/schemas/LinkedinAdvertiser'
            - type: 'null'
        is_promoted:
          type: boolean
          default: false
        ad_format:
          anyOf:
            - type: string
            - type: 'null'
        creative_type:
          anyOf:
            - type: string
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
        headline:
          anyOf:
            - type: string
            - type: 'null'
        cta_text:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        video:
          anyOf:
            - type: string
            - type: 'null'
        video_preview:
          anyOf:
            - type: string
            - type: 'null'
        payer:
          anyOf:
            - type: string
            - type: 'null'
        ran_from:
          anyOf:
            - type: string
            - type: 'null'
        ran_to:
          anyOf:
            - type: string
            - type: 'null'
        impressions:
          anyOf:
            - type: string
            - type: 'null'
        impressions_by_country:
          items:
            $ref: '#/components/schemas/LinkedinAdCountryImpressions'
          type: array
          default: []
        targeting:
          anyOf:
            - $ref: '#/components/schemas/LinkedinAdTargeting'
            - type: 'null'
        creatives:
          items:
            $ref: '#/components/schemas/LinkedinAdCreative'
          type: array
          default: []
      type: object
      required:
        - id
        - url
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    LinkedinAdvertiser:
      properties:
        '@type':
          type: string
          default: LinkedinAdvertiser
        id:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        company_url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    LinkedinAdCountryImpressions:
      properties:
        '@type':
          type: string
          default: LinkedinAdCountryImpressions
        country:
          type: string
        percentage:
          anyOf:
            - type: integer
            - type: 'null'
      type: object
      required:
        - country
    LinkedinAdTargeting:
      properties:
        '@type':
          type: string
          default: LinkedinAdTargeting
        segments:
          items:
            $ref: '#/components/schemas/LinkedinAdTargetingSegment'
          type: array
          default: []
        parameters:
          items:
            $ref: '#/components/schemas/LinkedinAdTargetingParameter'
          type: array
          default: []
      type: object
    LinkedinAdCreative:
      properties:
        '@type':
          type: string
          default: LinkedinAdCreative
        creative_type:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        video:
          anyOf:
            - type: string
            - type: 'null'
        video_preview:
          anyOf:
            - type: string
            - type: 'null'
        headline:
          anyOf:
            - type: string
            - type: 'null'
        cta_text:
          anyOf:
            - type: string
            - 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
    LinkedinAdTargetingSegment:
      properties:
        '@type':
          type: string
          default: LinkedinAdTargetingSegment
        name:
          type: string
        value:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - name
    LinkedinAdTargetingParameter:
      properties:
        '@type':
          type: string
          default: LinkedinAdTargetingParameter
        name:
          type: string
        targeted:
          type: boolean
          default: false
        excluded:
          type: boolean
          default: false
      type: object
      required:
        - name
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````