{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Ads Tracker — New & Changed Ads",
    "description": "Observe public LinkedIn Ad Library searches and compare saved runs. Export verified ad IDs, advertiser identity, available ad copy and source links; receive new and changed observations with before-and-after values. Bounded searches never infer stopped ads.",
    "version": "0.1",
    "x-build-id": "uVfombhYb0bD7o5Kf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/agency-shift~linkedin-ads-competitor-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-agency-shift-linkedin-ads-competitor-tracker",
        "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/agency-shift~linkedin-ads-competitor-tracker/runs": {
      "post": {
        "operationId": "runs-sync-agency-shift-linkedin-ads-competitor-tracker",
        "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/agency-shift~linkedin-ads-competitor-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-agency-shift-linkedin-ads-competitor-tracker",
        "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": [
          "searchUrls"
        ],
        "properties": {
          "searchUrls": {
            "title": "Public Ad Library search URLs",
            "minItems": 1,
            "maxItems": 5,
            "type": "array",
            "description": "Copy 1–5 search URLs from LinkedIn Ad Library. Include an advertiser or keyword filter. Advertiser-name searches can match several companies; use the exact advertiser URL filter when attribution matters.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Two-letter uppercase country code. Any countries parameter in a search URL must match this value. This is a source search filter, not proof of every country an ad targets.",
            "default": "US"
          },
          "exactAdvertiserUrl": {
            "title": "Exact advertiser company URL (optional)",
            "type": "string",
            "description": "Only retain details whose public advertiser company URL exactly matches this URL. LinkedIn numeric company IDs and slugs are not automatically resolved as aliases. Nonmatching ads still consume bounded detail requests. Requires Fetch each ad detail page."
          },
          "mode": {
            "title": "Run mode",
            "enum": [
              "snapshot",
              "changes"
            ],
            "type": "string",
            "description": "Snapshot exports observed ads each run. Changes compares stored history for the same user, Actor, monitor, search URL, country and exact advertiser filter. Detail mode is a separate history scope.",
            "default": "snapshot"
          },
          "maxResults": {
            "title": "Maximum output records",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Caps delivered dataset records charged at $0.00038 each. This does not cap source requests in Changes mode or separate platform usage. The maximum Actor charge is an event-fee ceiling, not a total usage budget.",
            "default": 25
          },
          "maxAdsPerSearch": {
            "title": "Maximum ads examined per search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Caps distinct listing ads examined. In detail mode this also caps ad detail requests including failures and exact-filter exclusions.",
            "default": 25
          },
          "maxPagesPerSearch": {
            "title": "Maximum search pages per search",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Caps source search pages before further requests are made.",
            "default": 3
          },
          "maxRequests": {
            "title": "Maximum total source requests",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard ceiling on combined listing and detail source requests, including unsuccessful requests. Bounds source work before another request; no automatic retries or proxy upgrades. Separate platform usage can accrue even if no records are delivered.",
            "default": 100
          },
          "monitorName": {
            "title": "Monitor name",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,49}$",
            "type": "string",
            "description": "Reuse this name in Changes mode for persistent history. A new name creates a separate baseline.",
            "default": "default"
          },
          "emitInitialSnapshot": {
            "title": "Output initial baseline",
            "type": "boolean",
            "description": "When disabled, seed the first Changes baseline without initial ad-record fees. Startup and platform usage still apply. Later newly observed and changed records incur the ad-record service fee.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Unblocker is selected by default because direct and residential requests were blocked in validation. Usage is billed separately from Actor fees at your plan rates: 10 Unblocker units per successful source request, plus compute and storage. Disable or choose another proxy explicitly if appropriate; no automatic upgrade.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "UNBLOCKER"
              ]
            }
          },
          "includeDetails": {
            "title": "Fetch each ad detail page",
            "type": "boolean",
            "description": "Default false: collect listing previews with fewer requests; copy may be shortened and company URL, payer, CTA or dates may be absent. True adds one source request per examined ad, increasing separate platform usage even for ads excluded by the exact advertiser filter. Required for exact advertiser URL filtering. Changing this setting creates a separate baseline.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}