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

# /twitter/ads/search

> Search X (Twitter) Ads Repository promoted tweets by advertiser, EU/EEA country and date range

**Price:** 5 credits per 50 results

**⚠️ Common errors:** 412: Advertiser not found. Verify the handle.



## OpenAPI

````yaml /openapi/ad-transparency.json post /api/twitter/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/twitter/ads/search:
    post:
      tags:
        - /twitter/ads
      summary: /twitter/ads/search
      description: >-
        Search X (Twitter) Ads Repository promoted tweets by advertiser, EU/EEA
        country and date range


        **Price:** 5 credits per 50 results


        **⚠️ Common errors:** 412: Advertiser not found. Verify the handle.
      operationId: __api_twitter_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/TwitterAdsSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TwitterAd'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TwitterAdsSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        advertiser:
          type: string
          minLength: 1
        countries:
          items:
            $ref: '#/components/schemas/TwitterAdsCountry'
          type: array
          minItems: 1
          default:
            - FR
        start_date:
          type: string
        end_date:
          type: string
        count:
          type: integer
          minimum: 1
      type: object
      required:
        - advertiser
        - start_date
        - end_date
        - count
    TwitterAd:
      properties:
        '@type':
          type: string
          default: TwitterAd
        tweet_id:
          type: string
        line_item_id:
          anyOf:
            - type: string
            - type: 'null'
        account_id:
          anyOf:
            - type: string
            - type: 'null'
        country:
          anyOf:
            - type: string
            - type: 'null'
        advertiser:
          anyOf:
            - $ref: '#/components/schemas/TwitterAdAccount'
            - type: 'null'
        funding_instrument:
          anyOf:
            - $ref: '#/components/schemas/TwitterAdFundingInstrument'
            - type: 'null'
        approval_status:
          anyOf:
            - type: string
            - type: 'null'
        impression_count:
          anyOf:
            - type: integer
            - type: 'null'
        reach_count:
          anyOf:
            - type: integer
            - type: 'null'
        targeting:
          items:
            $ref: '#/components/schemas/TwitterAdTargeting'
          type: array
          default: []
      type: object
      required:
        - tweet_id
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    TwitterAdsCountry:
      type: string
      enum:
        - AX
        - AL
        - AD
        - AT
        - BY
        - BE
        - BA
        - BG
        - HR
        - CY
        - CZ
        - DK
        - EE
        - FO
        - FI
        - FR
        - DE
        - GI
        - GR
        - GG
        - HU
        - IS
        - IE
        - IM
        - IT
        - JE
        - XK
        - LV
        - LI
        - LT
        - LU
        - MK
        - MT
        - MD
        - MC
        - ME
        - NL
        - 'NO'
        - PL
        - PT
        - RO
        - SM
        - RS
        - SK
        - SI
        - ES
        - SJ
        - SE
        - CH
        - UA
        - GB
        - VA
    TwitterAdAccount:
      properties:
        '@type':
          type: string
          default: TwitterAdAccount
        name:
          anyOf:
            - type: string
            - type: 'null'
        is_deleted:
          type: boolean
          default: false
      type: object
    TwitterAdFundingInstrument:
      properties:
        '@type':
          type: string
          default: TwitterAdFundingInstrument
        type:
          anyOf:
            - type: string
            - type: 'null'
        currency:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    TwitterAdTargeting:
      properties:
        '@type':
          type: string
          default: TwitterAdTargeting
        name:
          anyOf:
            - type: string
            - type: 'null'
        type:
          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
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````