> ## 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/search

> Search the LinkedIn Ad Library by keyword, advertiser, payer, country and date

**Price:** 5 credits per 24 results



## OpenAPI

````yaml /openapi/ad-transparency.json post /api/linkedin/ad_library/ads/search
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/search:
    post:
      tags:
        - /linkedin/ad_library
      summary: /linkedin/ad_library/ads/search
      description: >-
        Search the LinkedIn Ad Library by keyword, advertiser, payer, country
        and date


        **Price:** 5 credits per 24 results
      operationId: __api_linkedin_ad_library_ads_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkedinAdsSearchPayload'
      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:
    LinkedinAdsSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        keyword:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        company_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
        payer:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        countries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
        date_option:
          anyOf:
            - $ref: '#/components/schemas/LinkedinAdDateOption'
            - type: 'null'
        impressions_min:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
        impressions_max:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
        impressions_unit:
          $ref: '#/components/schemas/LinkedinAdImpressionsUnit'
          default: Thousand
        targeting_included:
          anyOf:
            - items:
                $ref: '#/components/schemas/LinkedinAdTargetingFacet'
              type: array
            - type: 'null'
        targeting_excluded:
          anyOf:
            - items:
                $ref: '#/components/schemas/LinkedinAdTargetingFacet'
              type: array
            - type: 'null'
        sort:
          $ref: '#/components/schemas/LinkedinAdSort'
          default: newest
        count:
          type: integer
          minimum: 1
      type: object
      required:
        - count
    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
    LinkedinAdDateOption:
      type: string
      enum:
        - last-30-days
        - current-month
        - current-year
        - last-year
    LinkedinAdImpressionsUnit:
      type: string
      enum:
        - Thousand
        - Million
    LinkedinAdTargetingFacet:
      type: string
      enum:
        - LANGUAGE
        - LOCATION
        - AUDIENCE
        - DEMOGRAPHIC
        - COMPANY
        - EDUCATION
        - JOB
        - INTERESTS_AND_TRAITS
    LinkedinAdSort:
      type: string
      enum:
        - newest
        - oldest
    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

````