{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Ad Details Scraper",
    "description": "Scrape LinkedIn ad details from the Ad Library: impressions range, impressions by country, run dates, who paid, targeted languages, locations and criteria (job, company, audience), CTA, landing page and UTM parameters. By ad URL, company or keyword. No login.",
    "version": "0.1",
    "x-build-id": "nQDph3vReSqASs0OT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blueskyscraper~linkedin-ad-details-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blueskyscraper-linkedin-ad-details-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/blueskyscraper~linkedin-ad-details-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blueskyscraper-linkedin-ad-details-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/blueskyscraper~linkedin-ad-details-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blueskyscraper-linkedin-ad-details-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": {
          "adUrls": {
            "title": "🔗 Ad URLs or IDs",
            "type": "array",
            "description": "Single ads from the LinkedIn Ad Library: <code>https://www.linkedin.com/ad-library/detail/1560106944</code> or just <code>1560106944</code>. Every ad comes back with its details.",
            "items": {
              "type": "string"
            }
          },
          "companies": {
            "title": "🏢 Companies",
            "type": "array",
            "description": "Get details for a company's ads, one company per line: a LinkedIn company page (<code>https://www.linkedin.com/company/hubspot/</code>), a company ID (<code>68529</code>) or a name. Every ad found is opened and returned with impressions, countries and targeting.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "🔍 Search terms",
            "type": "array",
            "description": "Or search the Ad Library and open every ad found: a keyword from the ad copy (<code>cybersecurity</code>), an advertiser name, a payer name or a company ID, depending on <b>Search by</b>.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "🔎 Search by",
            "enum": [
              "keyword",
              "advertiser",
              "payer",
              "companyId"
            ],
            "type": "string",
            "description": "How to read the search terms. <b>Keyword</b> finds ads whose copy contains the word; <b>Advertiser</b> matches the company or person shown on the ad (partial names match: <code>hubspot</code> also returns HubSpot partners); <b>Payer</b> matches the \"Paid for by\" entity; <b>Company ID</b> returns exactly one company's ads.",
            "default": "keyword"
          },
          "countries": {
            "title": "🌍 Countries",
            "type": "array",
            "description": "Keep only ads shown in these countries — two-letter codes: <code>DE</code>, <code>FR</code>, <code>NL</code>, <code>US</code>… LinkedIn publishes impressions and targeting for ads that reached the EU: an EU country here gives detail rows with every field filled. Empty = all countries.",
            "items": {
              "type": "string"
            }
          },
          "maxAdsPerSearch": {
            "title": "💯 Ads per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many ads to take from each search line, newest first. LinkedIn serves 24 per page; up to 5,000 per search per run.",
            "default": 10
          },
          "dateRange": {
            "title": "📅 Date range",
            "enum": [
              "any",
              "last-30-days",
              "current-month",
              "current-year",
              "last-year"
            ],
            "type": "string",
            "description": "Keep only ads that ran in this period. For exact dates use Start date / End date below instead.",
            "default": "any"
          },
          "startDate": {
            "title": "Start date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Custom range start, YYYY-MM-DD (for example <code>2026-01-01</code>). Overrides Date range."
          },
          "endDate": {
            "title": "End date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Custom range end, YYYY-MM-DD (for example <code>2026-03-31</code>). Overrides Date range."
          },
          "sortOrder": {
            "title": "Order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Newest ads first (LinkedIn's default) or oldest first.",
            "default": "newest"
          },
          "onlyNewRowsStore": {
            "title": "🔁 Only new ads — memory name",
            "pattern": "^[A-Za-z0-9-]{0,63}$",
            "type": "string",
            "description": "Give this run a name — <code>my-ads-watch</code> — and the Actor remembers every ad it delivered under that name. Every later run with the same name writes and charges <b>only ads you have not received before</b>. Schedule the Actor daily to get a feed of new LinkedIn ads instead of the whole list each time. Leave empty to get everything found, every time."
          },
          "maxConcurrency": {
            "title": "Parallel ad pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many ad pages to open at once when details are on. 4 is safe; higher is faster but gets more refusals.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}