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

# Trigger Ad Library Scrapes

> Queue broad public-ad library scrapes across configured providers.



## OpenAPI

````yaml /openapi.json post /api/v1/admin/integrations/meta-ad-library/scrapes
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/integrations/meta-ad-library/scrapes:
    post:
      tags:
        - Admin
      summary: Trigger Ad Library Scrapes
      description: Queue broad public-ad library scrapes across configured providers.
      operationId: >-
        trigger_ad_library_scrapes_api_v1_admin_integrations_meta_ad_library_scrapes_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminAdLibraryScrapeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminAdLibraryScrapeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AdminAdLibraryScrapeRequest:
      properties:
        scrapers:
          items:
            type: string
          type: array
          maxItems: 10
          title: Scrapers
        website_url:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Website Url
        country:
          anyOf:
            - type: string
              maxLength: 8
            - type: 'null'
          title: Country
        start_time:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Start Time
        end_time:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: End Time
        sort_type:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
          title: Sort Type
        active_status:
          anyOf:
            - type: string
              maxLength: 20
            - type: 'null'
          title: Active Status
        brand_names:
          items:
            type: string
          type: array
          maxItems: 200
          title: Brand Names
        brand_domains:
          items:
            type: string
          type: array
          maxItems: 200
          title: Brand Domains
        page_ids:
          items:
            type: string
          type: array
          maxItems: 200
          title: Page Ids
        page_urls:
          items:
            type: string
          type: array
          maxItems: 200
          title: Page Urls
        total_limit:
          type: integer
          maximum: 10000
          minimum: 1
          title: Total Limit
          default: 100
        page_size:
          type: integer
          maximum: 100
          minimum: 1
          title: Page Size
          default: 100
        meta_method:
          anyOf:
            - type: string
              maxLength: 40
            - type: 'null'
          title: Meta Method
      type: object
      title: AdminAdLibraryScrapeRequest
    AdminAdLibraryScrapeResponse:
      properties:
        requested_at:
          type: string
          format: date-time
          title: Requested At
        enqueued:
          type: integer
          title: Enqueued
        skipped:
          type: integer
          title: Skipped
        website_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Website Url
        discovered_social_links:
          additionalProperties:
            type: string
          type: object
          title: Discovered Social Links
        jobs:
          items:
            $ref: '#/components/schemas/AdminAdLibraryScrapeJob'
          type: array
          title: Jobs
        skipped_items:
          items:
            $ref: '#/components/schemas/AdminAdLibraryScrapeSkippedItem'
          type: array
          title: Skipped Items
      type: object
      required:
        - requested_at
        - enqueued
        - skipped
      title: AdminAdLibraryScrapeResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AdminAdLibraryScrapeJob:
      properties:
        job_id:
          type: string
          title: Job Id
        scraper:
          type: string
          title: Scraper
        provider:
          type: string
          title: Provider
        platform:
          type: string
          title: Platform
        country:
          type: string
          title: Country
        advertiser_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Advertiser Name
        advertiser_domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Advertiser Domain
        facebook_page_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Facebook Page Id
        facebook_page_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Facebook Page Url
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
        start_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Start Time
        end_time:
          anyOf:
            - type: string
            - type: 'null'
          title: End Time
        sort_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Sort Type
        active_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Active Status
      type: object
      required:
        - job_id
        - scraper
        - provider
        - platform
        - country
        - limit
        - offset
      title: AdminAdLibraryScrapeJob
    AdminAdLibraryScrapeSkippedItem:
      properties:
        scraper:
          type: string
          title: Scraper
        provider:
          type: string
          title: Provider
        platform:
          type: string
          title: Platform
        advertiser_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Advertiser Name
        advertiser_domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Advertiser Domain
        facebook_page_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Facebook Page Id
        facebook_page_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Facebook Page Url
        reason:
          type: string
          title: Reason
      type: object
      required:
        - scraper
        - provider
        - platform
        - reason
      title: AdminAdLibraryScrapeSkippedItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````