{
  "openapi": "3.0.1",
  "info": {
    "title": "Meta Ad Transcript Scraper - Video Ads to Text",
    "description": "Meta ad transcript scraper, no login: Facebook and Instagram video ads from the Meta Ad Library turned into text in bulk, inside the Actor. Rows carry the transcript, timed segments, language, hook and confidence beside the ad copy and call to action. CSV, API, schedules; pay per transcript.",
    "version": "0.1",
    "x-build-id": "fs7mrM4Snc8kjr3oe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~meta-ad-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-meta-ad-transcript-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/automation_craft~meta-ad-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-meta-ad-transcript-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/automation_craft~meta-ad-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-meta-ad-transcript-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Words to search the Meta Ad Library for, as its search box takes them (for example fitness app). Each search transcribes the video ads it finds, up to \"Transcripts per search\". Leave every target field empty to run a 3 ad sample.",
            "items": {
              "type": "string"
            }
          },
          "advertisers": {
            "title": "Advertisers",
            "type": "array",
            "description": "Advertisers whose video ads to transcribe: the exact page name as the Ad Library shows it (HelloFresh), the page id, the Facebook page URL or the advertiser's Ad Library page link (with view_all_page_id). A name is used only when exactly one page carries it; otherwise a free row lists the candidates.",
            "items": {
              "type": "string"
            }
          },
          "adUrls": {
            "title": "Ad Library links or ad ids",
            "type": "array",
            "description": "Single ads: an Ad Library link with ?id= (the ad's \"Copy link\") or the bare ad id. An Ad Library search link (with q= or view_all_page_id=) is read as a search with its own filters. An id the Ad Library does not have is a free row.",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Meta video URLs",
            "type": "array",
            "description": "Direct video files on Meta's video CDN (video...fbcdn.net, the video_sd_url or video_hd_url of any Ad Library row). These links expire after 1 to 4 days; an expired one is a free row.",
            "items": {
              "type": "string"
            }
          },
          "dataset": {
            "title": "Dataset of an Ad Library run",
            "type": "string",
            "description": "Pick the dataset of a finished run of any Ad Library scraper: up to 10,000 rows are read, each row's ad id and video links are used, and an ad whose links have expired is read again from the Ad Library by its id."
          },
          "rows": {
            "title": "Pasted rows",
            "type": "array",
            "description": "Rows of an Ad Library run pasted as JSON (any scraper's shape): each row's ad id and every Meta video link in it are used. Up to 2,000 rows."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Countries of the Ad Library to search: two letter codes (US, GB, DE ...), three letter codes (USA, GBR, DEU ...) or names in English, German, French, Spanish, Italian or Portuguese, or ALL. Each search and advertiser is read in every country listed. US when left empty.",
            "items": {
              "type": "string"
            }
          },
          "activeStatus": {
            "title": "Active status",
            "enum": [
              "active",
              "inactive",
              "all"
            ],
            "type": "string",
            "description": "Ads running now (active, the default when left out), ads that stopped, or both."
          },
          "mediaType": {
            "title": "Ad format",
            "enum": [
              "video",
              "all",
              "image",
              "meme",
              "image_and_meme",
              "none"
            ],
            "type": "string",
            "description": "Video ads (the default when left out). The other formats of the Ad Library give image and text ads, which are free rows unless \"Read image ad text\" is on."
          },
          "adType": {
            "title": "Ad category",
            "enum": [
              "all",
              "political",
              "housing",
              "employment",
              "financial"
            ],
            "type": "string",
            "description": "The Ad Library's ad category filter. All when left out."
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Only ads shown on these platforms. Every platform when left empty.",
            "items": {
              "type": "string",
              "enum": [
                "facebook",
                "instagram",
                "audience_network",
                "messenger",
                "whatsapp",
                "threads"
              ],
              "enumTitles": [
                "Facebook",
                "Instagram",
                "Audience Network",
                "Messenger",
                "WhatsApp",
                "Threads"
              ]
            }
          },
          "adLanguages": {
            "title": "Ad copy languages",
            "type": "array",
            "description": "Two letter codes of the languages of the ad copy the Ad Library filters by (en, es, de ...). Every language when left empty. To filter by the spoken language use \"Spoken languages\".",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "any_words",
              "exact_phrase"
            ],
            "type": "string",
            "description": "How the Ad Library matches the search terms. Any of the words when left out."
          },
          "sort": {
            "title": "Order",
            "enum": [
              "relevance",
              "impressions_desc",
              "impressions_asc",
              "most_recent"
            ],
            "type": "string",
            "description": "The order the Ad Library returns ads in. Relevance when left out."
          },
          "dateFrom": {
            "title": "Shown from",
            "type": "string",
            "description": "Only ads shown on or after this day: YYYY-MM-DD, today, yesterday or \"7 days\", \"3 months\"."
          },
          "dateTo": {
            "title": "Shown until",
            "type": "string",
            "description": "Only ads shown on or before this day, in the same forms as \"Shown from\"."
          },
          "launchedAfter": {
            "title": "Launched after",
            "type": "string",
            "description": "Only ads whose start date is on or after this day (YYYY-MM-DD or \"30 days\"); older ads are skipped free before any download."
          },
          "targetedCountryOnly": {
            "title": "Targeted at the country only",
            "type": "boolean",
            "description": "Only ads targeted at the chosen country, not ads that merely reached it."
          },
          "adTextContains": {
            "title": "Ad copy contains",
            "type": "array",
            "description": "Only ads whose copy (text, headline, caption) contains one of these words or phrases, as whole words. Others are skipped free before any download.",
            "items": {
              "type": "string"
            }
          },
          "onePerAdvertiser": {
            "title": "One ad per advertiser",
            "type": "boolean",
            "description": "Transcribe at most one ad of each advertiser in the run."
          },
          "pageCategories": {
            "title": "Advertiser categories",
            "type": "array",
            "description": "Transcribe only ads whose advertiser's page carries one of these categories, as the Ad Library names them (for example Health/beauty, Restaurant, Public figure); compared without letter case. An ad whose page category is not known is left out. Free.",
            "items": {
              "type": "string"
            }
          },
          "maxAdsPerSearch": {
            "title": "Transcripts per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many ads each search, advertiser and country may deliver as transcripts (10 when left out). Ads without speech, already delivered or filtered out do not count."
          },
          "maxAds": {
            "title": "Transcripts per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most transcripts this run delivers (20 when left out); a safety cap on the bill."
          },
          "videosPerAd": {
            "title": "Videos per ad",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Ads with several creatives (dynamic and carousel ads) carry several videos: how many of them to transcribe, each its own row and transcript (1 when left out)."
          },
          "minDurationSeconds": {
            "title": "Shortest video (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Skip videos shorter than this, free and before download."
          },
          "maxDurationSeconds": {
            "title": "Longest video (seconds)",
            "minimum": 1,
            "maximum": 86400,
            "type": "integer",
            "description": "Skip videos longer than this, free and before download."
          },
          "transcribeSeconds": {
            "title": "Seconds transcribed per video",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "The most audio transcribed per video (600 when left out); a longer video is transcribed to this point and its row says where it was cut."
          },
          "spokenLanguage": {
            "title": "Spoken language",
            "type": "string",
            "description": "The language spoken in the videos as a two letter code (en, es, de ...) when you know it; it skips language detection and helps short ads. auto when left out."
          },
          "spokenLanguages": {
            "title": "Spoken languages",
            "type": "array",
            "description": "Only transcribe videos whose detected spoken language is one of these codes (en, es ...); others are free rows, stopped after detection.",
            "items": {
              "type": "string"
            }
          },
          "hookSeconds": {
            "title": "Hook length (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "The opening line: the words spoken in the first N seconds after speech begins (3 when left out)."
          },
          "wordTimestamps": {
            "title": "Word timestamps",
            "type": "boolean",
            "description": "Add every word with its start and end time and its probability. Free."
          },
          "subtitles": {
            "title": "Subtitles (SRT and WebVTT)",
            "type": "boolean",
            "description": "Add the transcript as SRT and WebVTT subtitle text. Free."
          },
          "sceneCuts": {
            "title": "Scene cuts and pacing",
            "type": "boolean",
            "description": "Add the estimated times of the video's hard cuts and the cuts per minute. Free."
          },
          "translateToEnglish": {
            "title": "Translate to English",
            "type": "boolean",
            "description": "Add an English translation of the speech of non English videos (the speech model's own translation). Charged per started minute translated."
          },
          "onScreenText": {
            "title": "Read on-screen text",
            "enum": [
              "off",
              "silent",
              "all"
            ],
            "type": "string",
            "description": "Read the text shown on screen from frames of the video (OCR inside the Actor): off (the default when left out), only for videos without speech, or for every video. Charged per frame with new text."
          },
          "maxTextFrames": {
            "title": "Frames read per video",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "The most frames read for on-screen text per video (6 when left out): the first frame after each scene cut, spread over the video."
          },
          "imageAdText": {
            "title": "Read image ad text",
            "type": "boolean",
            "description": "For image ads (Ad format: all or image), read the text in the picture. Charged as one text frame per image with text."
          },
          "adDetails": {
            "title": "Ad details",
            "type": "boolean",
            "description": "Add the Ad Library's detail record of each transcribed ad: advertiser facts and, for ads shown in the EU, the reach figures. Charged per ad."
          },
          "saveMediaFiles": {
            "title": "Save media files",
            "enum": [
              "none",
              "audio",
              "video"
            ],
            "type": "string",
            "description": "Save the audio track or the video of each transcribed ad to this run's key-value store, with its link on the row. Charged per file."
          },
          "saveImageFiles": {
            "title": "Save image files",
            "type": "boolean",
            "description": "Save the image file of each image ad to this run's key-value store, with its link on the row (one Media file event per image). Image ads are read when the media type includes images."
          },
          "advertiserActiveAds": {
            "title": "Advertiser active ad count",
            "type": "boolean",
            "description": "Add the number of ads each transcribed ad's advertiser has active in the Ad Library (one extra page read per advertiser and country, kept for the run). Free; when the run's allowance of unpaid work is spent, the count is left empty with the reason."
          },
          "includeRawData": {
            "title": "Include raw data",
            "type": "boolean",
            "description": "Add the Ad Library's own record of the ad, as it answered, to each row (rawAd). Rows of video links or pasted rows without a fresh read carry none."
          },
          "memoryName": {
            "title": "Memory name",
            "type": "string",
            "description": "A short name for a memory kept across runs (a watchlist): a video delivered under it is never transcribed or charged again; later runs return a free row for it, or skip it with \"New ads only\"."
          },
          "newAdsOnly": {
            "title": "New ads only",
            "type": "boolean",
            "description": "With a memory name: skip the videos the memory holds, without a row and without a download."
          },
          "resetMemory": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget everything the memory holds before this run."
          },
          "runTag": {
            "title": "Run tag",
            "type": "string",
            "description": "A label copied onto every row of this run, for your own sorting."
          },
          "advertiserSummary": {
            "title": "Advertiser summary rows",
            "type": "boolean",
            "description": "Add one free row per advertiser at the end: transcripts, seconds, languages, calls to action and the hooks heard."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}