{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Ad Library Scraper — Ads, Creatives & Advertisers",
    "description": "Scrape LinkedIn's Ad Library into clean JSON: ad creatives, copy, CTA, advertiser & payer, EU impressions and targeting. Search by company or keyword. $4 per 1,000 ads.",
    "version": "0.1",
    "x-build-id": "GmaracfxFOO3a3FEJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jaybird~linkedin-ad-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jaybird-linkedin-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/jaybird~linkedin-ad-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-jaybird-linkedin-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/jaybird~linkedin-ad-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-jaybird-linkedin-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",
        "properties": {
          "detailLevel": {
            "title": "Detail level",
            "enum": [
              "basic",
              "enriched"
            ],
            "type": "string",
            "description": "Basic (default) returns card-visible fields with no per-ad request at $0.50 / 1,000 ads; LinkedIn may truncate long card copy. Enriched visits every ad detail page for full copy/CTA/landing page where disclosed, advertiser URL, payer, and EU transparency fields at $1.50 / 1,000 ads.",
            "default": "basic"
          },
          "companies": {
            "title": "Companies or advertisers",
            "type": "array",
            "description": "Company names (e.g. \"HubSpot\") or LinkedIn company-page URLs (e.g. https://www.linkedin.com/company/hubspot). Each entry becomes one advertiser search. LinkedIn matches advertiser names loosely, so a search for \"HubSpot\" also returns other advertisers with HubSpot in their name — every result carries `advertiserName` and `advertiserLinkedInUrl` so you can filter exactly.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Free-text search across ad copy. Runs as its own query in addition to any company searches."
          },
          "payer": {
            "title": "Paying entity",
            "type": "string",
            "description": "Search the public 'Paid for by' field. Runs as its own query in addition to company and keyword searches."
          },
          "countries": {
            "title": "Countries (ISO codes)",
            "type": "array",
            "description": "Two-letter ISO 3166-1 country codes to filter where ads were shown, e.g. [\"US\", \"DE\", \"NL\"]. Leave empty for worldwide. Note: ads shown in the EU expose extra transparency data (run dates, impressions, targeting) that other ads do not.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          "startDate": {
            "title": "Start date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only return ads shown on or after this date (YYYY-MM-DD). The Ad Library holds ads for one year after their last impression."
          },
          "endDate": {
            "title": "End date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only return ads shown on or before this date (YYYY-MM-DD)."
          },
          "impressionsMinValue": {
            "title": "Minimum impressions",
            "minimum": 1,
            "type": "integer",
            "description": "Minimum impression threshold. Combine with the minimum unit; LinkedIn applies this to ads with disclosed impression data."
          },
          "impressionsMinUnit": {
            "title": "Minimum impression unit",
            "enum": [
              "none",
              "thousand",
              "million"
            ],
            "type": "string",
            "description": "Scale used for the minimum impression value.",
            "default": "thousand"
          },
          "impressionsMaxValue": {
            "title": "Maximum impressions",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum impression threshold. Combine with the maximum unit."
          },
          "impressionsMaxUnit": {
            "title": "Maximum impression unit",
            "enum": [
              "none",
              "thousand",
              "million"
            ],
            "type": "string",
            "description": "Scale used for the maximum impression value.",
            "default": "thousand"
          },
          "includedTargetingFacetCategories": {
            "title": "Must use these targeting categories",
            "type": "array",
            "description": "Only return ads that include these disclosed targeting-category types. Allowed: LANGUAGE, LOCATION, AUDIENCE, DEMOGRAPHIC, COMPANY, EDUCATION, JOB, INTERESTS_AND_TRAITS.",
            "items": {
              "type": "string"
            }
          },
          "excludedTargetingFacetCategories": {
            "title": "Must exclude these targeting categories",
            "type": "array",
            "description": "Only return ads that explicitly exclude values in these targeting-category types. Allowed: LANGUAGE, LOCATION, AUDIENCE, DEMOGRAPHIC, COMPANY, EDUCATION, JOB, INTERESTS_AND_TRAITS.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "DESCENDING",
              "ASCENDING",
              "MOST_IMPRESSIONS"
            ],
            "type": "string",
            "description": "Order applied by LinkedIn before pagination.",
            "default": "DESCENDING"
          },
          "maxAdsPerQuery": {
            "title": "Max ads per query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap per advertiser, payer, or keyword query. Each stored ad emits exactly one basic or enriched billing event.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}