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

# Get a single Ad Library ad

> Get one ad's advertiser, body, platforms, dates, and status by its archive id.

<Note>
  Drives a real Chrome browser session and is slower than the rest of this API — Facebook's Ad Library serves a JS-execution challenge no other Facebook surface here requires.
</Note>


## OpenAPI

````yaml get /v1/facebook/adLibrary/ad
openapi: 3.1.0
info:
  title: Scrapio
  version: 1.0.0
  description: >-
    Turn any URL into structured data. Fetch raw HTML, crawl sites, extract
    structured content, interact with dynamic pages, and search the web through
    one API.
  contact:
    name: Scrapio Support
    url: https://scrapio.dev
  license:
    name: Proprietary
servers:
  - url: https://api.scrapio.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: System
  - name: Fetch
  - name: Crawl
  - name: Map
  - name: Interact
  - name: Search
  - name: Google
  - name: Fast Search
  - name: Jobs
  - name: YouTube
  - name: Amazon
  - name: Walmart
  - name: Booking
  - name: Agoda
  - name: Airbnb
  - name: AutoTrader
  - name: ChatGPT
  - name: Perplexity
  - name: Gemini
  - name: Bing
  - name: Reddit
  - name: Instagram
  - name: Twitter
  - name: Facebook
  - name: Hacker News
  - name: GitHub
  - name: TikTok
  - name: Apple App Store
  - name: Target
  - name: Monitors
paths:
  /v1/facebook/adLibrary/ad:
    get:
      tags:
        - Facebook
      summary: Get a single Ad Library ad
      description: >-
        Retrieves one ad from Facebook's public Ad Library by its archive id —
        advertiser, body, platforms, dates, and active status. Driven by a real
        browser session (Ad Library serves a JS-execution challenge no other
        Facebook endpoint here does), priced accordingly. Requires a Starter
        plan or higher.
      operationId: getFacebookAd
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: Structured ad detail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FacebookAdResponse'
        '400':
          description: Missing id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Facebook dedicated endpoints require a Starter plan or higher.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The requested ad could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Daily credit cap exceeded, or Facebook rate-limited the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Facebook blocked the request or returned an unusable response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            The Facebook execution backend is unavailable (cf-bypass
            unconfigured).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl
            "https://api.scrapio.dev/v1/facebook/adLibrary/ad?id=1249043200627555"
            \
              -H "Authorization: Bearer $SCRAPIO_API_KEY"
components:
  schemas:
    FacebookAdResponse:
      type: object
      properties:
        provider:
          type: string
          enum:
            - facebook
        request_id:
          type: string
        ad:
          type: object
          properties:
            id:
              anyOf:
                - type: string
                - type: 'null'
            page_id:
              anyOf:
                - type: string
                - type: 'null'
            page_name:
              anyOf:
                - type: string
                - type: 'null'
            page_profile_picture_url:
              anyOf:
                - type: string
                - type: 'null'
            is_active:
              anyOf:
                - type: boolean
                - type: 'null'
            start_time:
              anyOf:
                - type: string
                - type: 'null'
            end_time:
              anyOf:
                - type: string
                - type: 'null'
            publisher_platforms:
              type: array
              items:
                type: string
            body:
              anyOf:
                - type: string
                - type: 'null'
            title:
              anyOf:
                - type: string
                - type: 'null'
            link_url:
              anyOf:
                - type: string
                - type: 'null'
            cta_text:
              anyOf:
                - type: string
                - type: 'null'
            spend:
              anyOf:
                - type: string
                - type: 'null'
            reach_estimate:
              anyOf:
                - type: number
                - type: 'null'
          required:
            - id
            - page_id
            - page_name
            - page_profile_picture_url
            - is_active
            - start_time
            - end_time
            - publisher_platforms
            - body
            - title
            - link_url
            - cta_text
            - spend
            - reach_estimate
          additionalProperties: false
      required:
        - provider
        - request_id
        - ad
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
        diagnostics:
          type: object
          properties:
            outcome:
              type: string
              enum:
                - failed
            retryable:
              type: boolean
            blocked:
              type: boolean
            timed_out:
              type: boolean
          required:
            - outcome
            - retryable
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````