{
  "openapi": "3.0.1",
  "info": {
    "title": "Ad Library Scraper [$2/1K💰] | Meta+Google+TikTok+LinkedIn Ads",
    "description": "Scrape Meta Ad Library, Google Ads Transparency Center, TikTok and LinkedIn ads in one run: ad copy, CTAs, destination URLs, creative assets, run dates and publisher platforms in one unified dataset. Built for competitor ad research, creative intelligence and campaign monitoring. $2 per 1,000 ads.",
    "version": "0.1",
    "x-build-id": "ADrZzKADRcTFfGJFk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ahmed_jasarevic~ad-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ahmed_jasarevic-ad-library-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/ahmed_jasarevic~ad-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ahmed_jasarevic-ad-library-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/ahmed_jasarevic~ad-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ahmed_jasarevic-ad-library-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",
        "required": [
          "query"
        ],
        "properties": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Brand name, domain or keyword, e.g. \"nike\", \"nike.com\", \"meal prep\", \"temu\". Meta, Google and LinkedIn match on this. TikTok uses its full EU/UK/CH ad library for those countries; elsewhere (e.g. US) it searches Creative Center Top Ads when logged-in cookies are provided, otherwise it filters Top Ads client-side."
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Which ad libraries to scrape. Meta uses direct HTTP; Google, TikTok and LinkedIn use a headless browser.",
            "items": {
              "type": "string",
              "enum": [
                "meta",
                "google",
                "tiktok",
                "linkedin"
              ],
              "enumTitles": [
                "Meta Ad Library",
                "Google Ads Transparency",
                "TikTok (Ad Library / Creative Center)",
                "LinkedIn Ad Library"
              ]
            },
            "default": [
              "meta",
              "google",
              "tiktok",
              "linkedin"
            ]
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (US, GB, DE, FR, RS, HR...). Filters ads by country on all four platforms. TikTok uses the full Commercial Content Library for EU/UK/CH countries and Creative Center Top Ads elsewhere.",
            "default": "US"
          },
          "maxItems": {
            "title": "Max ads per platform",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Each platform paginates automatically until it reaches this many ads (or runs out of results). Default 10 keeps test runs quick and cheap; raise it (up to 10000) for full exports.",
            "default": 10
          },
          "metaActiveOnly": {
            "title": "Meta: active ads only",
            "type": "boolean",
            "description": "When on, only ads that are currently running are returned. Turn off to include inactive ads too.",
            "default": true
          },
          "metaMediaType": {
            "title": "Meta: media type",
            "enum": [
              "all",
              "image",
              "video",
              "meme",
              "none"
            ],
            "type": "string",
            "description": "Filter Meta ads by media type.",
            "default": "all"
          },
          "tiktokOrderBy": {
            "title": "TikTok: sort ads by",
            "enum": [
              "for_you",
              "ctr",
              "like"
            ],
            "type": "string",
            "description": "Top Ads ranking metric for countries without a full TikTok ad library (e.g. US). \"for_you\" is TikTok's default mix; \"ctr\" and \"like\" sort by that metric. Each sort also acts as a separate result set. Ignored for EU/UK/CH, which use the Commercial Content Library.",
            "default": "for_you"
          },
          "tiktokPeriodDays": {
            "title": "TikTok: period in days",
            "type": "integer",
            "description": "How far back Top Ads are taken from: 7, 30 or 180. Used in the anonymous Top Ads sweep only; ignored for EU/UK/CH (Commercial Content Library always searches the last 30 days) and in logged-in keyword mode (always uses the widest 180-day window, which contains the shorter periods).",
            "default": 30
          },
          "tiktokIndustry": {
            "title": "TikTok: industry filter (optional)",
            "type": "string",
            "description": "Industry key as used by Creative Center, e.g. \"label_23110000000\". Leave empty for all industries."
          },
          "tiktokObjective": {
            "title": "TikTok: objective filter (optional)",
            "type": "string",
            "description": "Campaign objective key, e.g. \"campaign_objective_conversion\". Leave empty for all objectives."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy. Strongly recommended: Meta's GraphQL pagination beyond the first 30 ads needs a residential exit, and Google, TikTok and LinkedIn throttle anonymous/datacenter traffic."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}