{
  "data": {
    "id": "ILmZ6pHxWaNitnSY6",
    "actId": "JPBhxiopXxn0s7Mqp",
    "userId": "tnBVjt3CXmcUrEE3L",
    "startedAt": "2026-11-24T03:26:21.172Z",
    "finishedAt": "2026-11-24T03:26:33.777Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CI"
    },
    "stats": {
      "durationMillis": 12527,
      "runTimeSecs": 12.527,
      "computeUnits": 0.013918888888888889,
      "imageSizeBytes": 358398976
    },
    "options": {
      "useCache": true,
      "betaPackages": false,
      "memoryMbytes": 4096,
      "diskMbytes": 8192
    },
    "createdByOrganizationMemberUserId": "F2Aeb3gE2syjqz9xC",
    "exitCode": 0,
    "inputSchema": "{\n  \"title\": \"X Ads Repository EU Transparency Scraper Input\",\n  \"description\": \"Resolve X advertiser handles and collect their EU-served ads from the public Digital Services Act Ads Repository, with optional monthly or daily delivery windows, creative enrichment and CSV delivery reports.\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"mode\": {\n      \"sectionCaption\": \"Advertisers and markets\",\n      \"title\": \"Mode\",\n      \"type\": \"string\",\n      \"description\": \"`ads` collects ad rows. `advertisers` only resolves handles, @handles, profile URLs or numeric IDs. `deliveryReport` uses X's public CSV export workflow for exact flight dates, funding entity, excluded segments and enforcement fields.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"ads\",\n        \"advertisers\",\n        \"deliveryReport\"\n      ],\n      \"enumTitles\": [\n        \"Collect ads\",\n        \"Resolve advertiser profiles\",\n        \"CSV delivery reports\"\n      ],\n      \"default\": \"ads\",\n      \"prefill\": \"ads\"\n    },\n    \"advertisers\": {\n      \"title\": \"Advertisers\",\n      \"type\": \"array\",\n      \"description\": \"X handles such as `Tesla`, `@Tesla`, profile URLs such as `https://x.com/Tesla`, or numeric advertiser IDs.\",\n      \"editor\": \"stringList\",\n      \"prefill\": [\n        \"Tesla\"\n      ],\n      \"items\": {\n        \"type\": \"string\"\n      }\n    },\n    \"marketPreset\": {\n      \"title\": \"Market preset\",\n      \"type\": \"string\",\n      \"description\": \"EU market set to query. A non-empty `countries` list overrides this preset. The repository covers the EU-27 only: Switzerland, Norway and the UK are not EU markets.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"eu27\",\n        \"dach\",\n        \"nordics\",\n        \"benelux\",\n        \"southern\",\n        \"central_eastern\",\n        \"custom\"\n      ],\n      \"enumTitles\": [\n        \"All EU-27\",\n        \"DACH (Germany, Austria)\",\n        \"Nordics (Denmark, Finland, Sweden)\",\n        \"Benelux (Belgium, Netherlands, Luxembourg)\",\n        \"Southern Europe\",\n        \"Central and Eastern Europe\",\n        \"Custom country list\"\n      ],\n      \"default\": \"eu27\",\n      \"prefill\": \"custom\"\n    },\n    \"countries\": {\n      \"title\": \"Custom countries\",\n      \"type\": \"array\",\n      \"description\": \"Two-letter EU country codes such as `FR`, `DE`, `ES`. Overrides the preset when non-empty. Codes outside the EU-27 are ignored and reported in the run status.\",\n      \"editor\": \"stringList\",\n      \"prefill\": [\n        \"FR\"\n      ],\n      \"items\": {\n        \"type\": \"string\"\n      }\n    },\n    \"startDate\": {\n      \"sectionCaption\": \"Delivery window and grouping\",\n      \"title\": \"Start date (inclusive)\",\n      \"type\": \"string\",\n      \"description\": \"First delivery date in `YYYY-MM-DD` format. The public repository starts on 2023-08-26. Leave blank for 90 days before today.\",\n      \"editor\": \"datepicker\",\n      \"prefill\": \"2025-11-01\"\n    },\n    \"endDate\": {\n      \"title\": \"End date (inclusive)\",\n      \"type\": \"string\",\n      \"description\": \"Last delivery date in `YYYY-MM-DD` format. Leave blank for today.\",\n      \"editor\": \"datepicker\",\n      \"prefill\": \"2025-11-30\"\n    },\n    \"dateGranularity\": {\n      \"title\": \"Date granularity\",\n      \"type\": \"string\",\n      \"description\": \"`range` returns one row per ad and country with metrics for the whole window. `monthly` returns one row per ad, country and calendar month with that month's impressions and reach. `daily` returns exact first and last delivery dates plus per-day impressions for windows up to 92 days.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"range\",\n        \"monthly\",\n        \"daily\"\n      ],\n      \"enumTitles\": [\n        \"Whole range\",\n        \"Monthly breakdown\",\n        \"Daily delivery dates\"\n      ],\n      \"default\": \"range\",\n      \"prefill\": \"range\"\n    },\n    \"groupBy\": {\n      \"title\": \"Group rows by\",\n      \"type\": \"string\",\n      \"description\": \"`ad` keeps the DSA row per post, line item and country. `creative` merges the same post across countries into one row with `countries`, `impressionsByCountry` and `reachByCountry`; reach is then a sum across countries. Creative grouping requires `dateGranularity=range`.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"ad\",\n        \"creative\"\n      ],\n      \"enumTitles\": [\n        \"Ad x country rows\",\n        \"One row per creative\"\n      ],\n      \"default\": \"ad\",\n      \"prefill\": \"ad\"\n    },\n    \"searchTerms\": {\n      \"sectionCaption\": \"Filters and output\",\n      \"title\": \"Keyword filter\",\n      \"type\": \"array\",\n      \"description\": \"Keep ads whose creative text, card title, landing URL/domain, targeting summary, account name or advertiser name contains any of these terms. Creative enrichment is enabled automatically when this filter is used.\",\n      \"editor\": \"stringList\",\n      \"default\": [],\n      \"prefill\": [],\n      \"items\": {\n        \"type\": \"string\"\n      }\n    },\n    \"minImpressions\": {\n      \"title\": \"Minimum impressions\",\n      \"type\": \"integer\",\n      \"description\": \"Drop rows with fewer impressions in the selected window or month. 0 disables the filter.\",\n      \"editor\": \"number\",\n      \"default\": 0,\n      \"prefill\": 0,\n      \"minimum\": 0,\n      \"maximum\": 1000000000000\n    },\n    \"minReach\": {\n      \"title\": \"Minimum reach\",\n      \"type\": \"integer\",\n      \"description\": \"Drop rows with lower reach in the selected window or month. 0 disables the filter.\",\n      \"editor\": \"number\",\n      \"default\": 0,\n      \"prefill\": 0,\n      \"minimum\": 0,\n      \"maximum\": 1000000000000\n    },\n    \"maxAdsPerAdvertiser\": {\n      \"title\": \"Maximum rows per advertiser\",\n      \"type\": \"integer\",\n      \"description\": \"Cap applied to each advertiser after sorting. 0 means no per-advertiser cap.\",\n      \"editor\": \"number\",\n      \"default\": 0,\n      \"prefill\": 0,\n      \"minimum\": 0,\n      \"maximum\": 10000\n    },\n    \"maxItems\": {\n      \"title\": \"Maximum records\",\n      \"type\": \"integer\",\n      \"description\": \"Hard cap on emitted rows across all advertisers.\",\n      \"editor\": \"number\",\n      \"default\": 200,\n      \"prefill\": 1,\n      \"minimum\": 1,\n      \"maximum\": 10000\n    },\n    \"sortBy\": {\n      \"title\": \"Sort by\",\n      \"type\": \"string\",\n      \"description\": \"Sort the final rows before applying caps. `newest` uses the post creation date.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"impressions\",\n        \"reach\",\n        \"newest\"\n      ],\n      \"enumTitles\": [\n        \"Impressions\",\n        \"Reach\",\n        \"Newest post\"\n      ],\n      \"default\": \"impressions\",\n      \"prefill\": \"impressions\"\n    },\n    \"sortOrder\": {\n      \"title\": \"Sort order\",\n      \"type\": \"string\",\n      \"description\": \"Ascending or descending order for the selected sort field.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"desc\",\n        \"asc\"\n      ],\n      \"enumTitles\": [\n        \"Descending\",\n        \"Ascending\"\n      ],\n      \"default\": \"desc\",\n      \"prefill\": \"desc\"\n    },\n    \"includeCreatives\": {\n      \"title\": \"Enrich creatives\",\n      \"type\": \"boolean\",\n      \"description\": \"Resolve post text, language, author, hashtags, mentions, URLs, media, cards, app details and embed HTML through X's public oEmbed and syndication endpoints. This adds two small requests per unique post.\",\n      \"default\": true,\n      \"prefill\": false\n    },\n    \"includeEmbedHtml\": {\n      \"title\": \"Include embed HTML\",\n      \"type\": \"boolean\",\n      \"description\": \"Add the official X oEmbed blockquote HTML when creatives are enriched.\",\n      \"default\": true,\n      \"prefill\": false\n    },\n    \"includeMedia\": {\n      \"title\": \"Include media and app cards\",\n      \"type\": \"boolean\",\n      \"description\": \"Add image/video URLs, video variants, card media and app-store details when creatives are enriched.\",\n      \"default\": true,\n      \"prefill\": false\n    },\n    \"onlyNewAds\": {\n      \"sectionCaption\": \"Monitoring\",\n      \"title\": \"Only new ads\",\n      \"type\": \"boolean\",\n      \"description\": \"Remember emitted ad keys in a key-value store and skip ads seen in earlier runs. New rows get `changeType=NEW`, `firstSeenAt` and `lastSeenAt`. Works in ads and deliveryReport modes.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"monitorStoreName\": {\n      \"title\": \"Monitor store name\",\n      \"type\": \"string\",\n      \"description\": \"Key-value store used by the only-new monitor. Change it to keep separate watch lists.\",\n      \"editor\": \"textfield\",\n      \"default\": \"x-ads-repository-monitor\",\n      \"prefill\": \"x-ads-repository-monitor\"\n    },\n    \"includeAdvertiserErrors\": {\n      \"sectionCaption\": \"Reliability\",\n      \"title\": \"Include advertiser errors\",\n      \"type\": \"boolean\",\n      \"description\": \"Push a row for each advertiser that could not be resolved and for each delivery report that failed, instead of only recording it in the run log.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"reportTimeoutSecs\": {\n      \"title\": \"CSV report timeout (seconds)\",\n      \"type\": \"integer\",\n      \"description\": \"How long to wait for one delivery report. X's export queue can be slow or stay in progress; the deliveryReport mode reports a timeout row when this expires.\",\n      \"editor\": \"number\",\n      \"default\": 180,\n      \"prefill\": 60,\n      \"minimum\": 30,\n      \"maximum\": 600\n    },\n    \"retries\": {\n      \"title\": \"Retries per request\",\n      \"type\": \"integer\",\n      \"description\": \"Extra attempts after a rate limit, over-capacity response or transient network error. The repository often answers 503 Over capacity.\",\n      \"editor\": \"number\",\n      \"default\": 3,\n      \"prefill\": 3,\n      \"minimum\": 0,\n      \"maximum\": 5\n    },\n    \"requestDelayMs\": {\n      \"title\": \"Delay between requests (ms)\",\n      \"type\": \"integer\",\n      \"description\": \"Pause between repository and enrichment requests. Raise it if X starts rate-limiting the run.\",\n      \"editor\": \"number\",\n      \"default\": 150,\n      \"prefill\": 0,\n      \"minimum\": 0,\n      \"maximum\": 5000\n    },\n    \"proxyConfiguration\": {\n      \"title\": \"Proxy configuration\",\n      \"type\": \"object\",\n      \"description\": \"Optional. The actor works without a proxy and uses its own browser TLS fingerprint. Provide a proxy only if you want to route requests yourself.\",\n      \"editor\": \"proxy\"\n    }\n  },\n  \"required\": [\n    \"mode\",\n    \"advertisers\"\n  ]\n}",
    "readme": "# X Ads Repository EU Transparency Scraper\n\nCollect the ads X served in the European Union from the public Digital Services Act Ads Repository at `ads.x.com/ads-repository`. The actor reads the repository the same way a browser does — anonymous guest session, no X login, no developer app, no cookies to supply, no paid proxy — and turns it into structured rows you can filter, schedule and export.\n\nUse it to see which creatives a competitor runs in which EU member states, compare disclosed impressions and reach, rebuild monthly or daily delivery timelines, export DSA fields for transparency research, and monitor advertiser handles for new ads.\n\n## What the actor returns\n\nThe dataset uses `recordType` to distinguish rows:\n\n- **`ad`** — one row per post, line item and EU country. Metrics are for the selected window or month.\n- **`creative`** — one row per post when `groupBy=creative`, with all countries and per-country metrics.\n- **`advertiser`** — profile lookup rows from `mode=advertisers`.\n- **`deliveryReport`** — rows from X's public CSV report workflow with exact flight dates and extra DSA fields.\n- **`advertiserError`** — optional rows for handles or CSV exports that failed.\n\nPer ad you get:\n\n- Advertiser ID, handle, display name, 400×400 profile image (plus original), profile URL and verified flag.\n- Post ID, post URL, line item ID, ad account ID, account name and deleted flag.\n- Country code and name, query window, metrics scope and optional delivery month.\n- Impressions, reach and frequency. Monthly mode returns one row per month; daily mode adds `deliveryStartDate`, `deliveryEndDate`, `activeDayCount`, `impressionsByDay` and `impressionsByMonth`.\n- Funding instrument type, billing currency and approval status.\n- Full targeting list, grouped targeting by type, targeting types, count and a compact summary.\n- Creative text, language, author, post creation date, likes, replies, edited flag, hashtags, mentions, URLs, cashtags, official embed HTML, media URLs and video variants, card title/subtitle/landing URL/domain/CTA, and app-store details when the post uses an app card.\n- Provenance: `sourceUrl`, `repositoryUrl`, `scrapedAt`, and `qualityFlags` when upstream fields are missing.\n- Optional monitor fields: `changeType`, `firstSeenAt`, `lastSeenAt`, `contentHash`.\n\nCreative fields are omitted when the post is no longer available; `creativeFetchStatus` tells you whether enrichment was available, partial or unavailable.\n\n## Modes\n\n| Mode | What it does |\n|---|---|\n| `ads` | Resolve advertisers and collect ad rows. Supports whole-range, monthly and daily windows, creative grouping, filters, sorting and the only-new monitor. |\n| `advertisers` | Resolve handles, @handles, X profile URLs and numeric advertiser IDs into profile rows. |\n| `deliveryReport` | Use X's public CSV export for exact flight dates, funding entity, excluded targeting segments and enforcement fields. The export queue is upstream and can stall, so this mode is timeout-guarded and optional. |\n\n## Inputs\n\n| Input | Type | Default | What it does |\n|---|---|---|---|\n| `mode` | select | `ads` | `ads`, `advertisers` or `deliveryReport`. |\n| `advertisers` | string list | – | Handles, `@handles`, profile URLs or numeric advertiser IDs. |\n| `marketPreset` | select | `eu27` | `eu27`, `dach`, `nordics`, `benelux`, `southern`, `central_eastern` or `custom`. |\n| `countries` | string list | – | Custom EU-27 codes; overrides the preset when non-empty. |\n| `startDate` | date | – (last 90 days) | First delivery date, inclusive, `YYYY-MM-DD`. Earliest repository date is 2023-08-26. |\n| `endDate` | date | – (today) | Last delivery date, inclusive, `YYYY-MM-DD`. |\n| `dateGranularity` | select | `range` | `range`, `monthly` or `daily` (daily supports up to 92 days). |\n| `groupBy` | select | `ad` | `ad` keeps post × country rows; `creative` merges countries into one row. Creative grouping requires `dateGranularity=range`. |\n| `searchTerms` | string list | – | Keep rows whose creative text, card title, landing URL/domain, targeting summary, account name or advertiser name contains any term. Enables creative enrichment automatically. |\n| `minImpressions` | integer | `0` | Drop rows below this impression count. 0 disables it. |\n| `minReach` | integer | `0` | Drop rows below this reach. 0 disables it. |\n| `maxAdsPerAdvertiser` | integer | `0` | Cap per advertiser after sorting. 0 means no cap. |\n| `maxItems` | integer | `200` | Hard cap on emitted rows. |\n| `sortBy` | select | `impressions` | `impressions`, `reach` or `newest` (post creation date). |\n| `sortOrder` | select | `desc` | `desc` or `asc`. |\n| `includeCreatives` | boolean | `true` | Fetch post text, author, media, cards and optional embed HTML. Two small requests per unique post. |\n| `includeEmbedHtml` | boolean | `true` | Include the official X oEmbed blockquote. |\n| `includeMedia` | boolean | `true` | Include image/video URLs, video variants, card media and app details. |\n| `onlyNewAds` | boolean | `false` | Remember emitted keys and skip ads seen in earlier runs. New rows get `changeType=NEW`, `firstSeenAt` and `lastSeenAt`. |\n| `monitorStoreName` | string | `x-ads-repository-monitor` | Key-value store used by the only-new monitor. |\n| `includeAdvertiserErrors` | boolean | `false` | Push error rows for unresolved advertisers and failed CSV exports. |\n| `reportTimeoutSecs` | integer | `180` | Per-report timeout for `deliveryReport` mode. |\n| `retries` | integer | `3` | Extra attempts after rate limits, over-capacity answers and transient errors. |\n| `requestDelayMs` | integer | `150` | Delay between requests, in milliseconds. |\n| `proxyConfiguration` | proxy | – | Optional. The actor works without a proxy and uses its own browser TLS fingerprint. |\n\n## Output example\n\n```json\n{\n  \"recordType\": \"ad\",\n  \"adKey\": \"1993023282321514852_53751756_FR\",\n  \"advertiserHandle\": \"Tesla\",\n  \"postId\": \"1993023282321514852\",\n  \"postUrl\": \"https://x.com/Tesla/status/1993023282321514852\",\n  \"countryCode\": \"FR\",\n  \"queryStartDate\": \"2025-11-01\",\n  \"queryEndDate\": \"2025-11-30\",\n  \"metricsScope\": \"selectedWindow\",\n  \"impressions\": 968546,\n  \"reach\": 837677,\n  \"frequency\": 1.16,\n  \"fundingInstrumentType\": \"NonExclusiveIo\",\n  \"billingCurrency\": \"USD\",\n  \"approvalStatus\": \"Verified\",\n  \"targetingCount\": 9,\n  \"postCreatedAt\": \"2025-11-24T18:25:53+00:00\",\n  \"creativeText\": \"With Full Self-Driving Supervised engaged, you're 7x less likely to be involved in an accident\",\n  \"creativeLanguage\": \"en\",\n  \"cardType\": \"video_website\",\n  \"cardTitle\": \"Safety Report\",\n  \"destinationDomain\": \"tesla.com\",\n  \"creativeFetchStatus\": \"available\",\n  \"sourceUrl\": \"https://x.com/Tesla/status/1993023282321514852\",\n  \"scrapedAt\": \"2026-11-15T09:24:18+00:00\"\n}\n```\n\n## How it works\n\n1. Warm up `https://ads.x.com/ads-repository` and keep only the anonymous guest cookies.\n2. Resolve each advertiser with the repository's own `user-search` endpoint (numeric IDs are resolved through X's public profile redirect).\n3. Query `ads-search` for the selected EU countries and date windows. One request can cover all 27 countries. The user-facing end date is inclusive; the API end date is exclusive, so the actor adds one day.\n4. For `monthly`, query one calendar month per request and emit one row per month. For `daily`, query each day, then query the whole window once for accurate totals, and derive exact first/last delivery dates and per-day impressions.\n5. Enrich only the rows that will be emitted. Creative text and media come from X's public oEmbed and syndication endpoints.\n6. Apply filters, sorting, per-advertiser and total caps; apply the optional only-new monitor; push clean rows with empty fields omitted.\n\n## Reliability and cost\n\n- Retries with exponential backoff on 429, 5xx and Cloudflare 520/522/524, plus a fresh guest session on 403.\n- X often answers 503 Over capacity; the actor retries per request.\n- The actor is HTTP-only and runs comfortably at 512 MB. Creative enrichment is two small requests per unique post.\n- The default prefill is the smallest run with output: Tesla, France, November 2025, one row, no creative enrichment. It finishes in seconds.\n- There is no proxy requirement and no credential input. An optional proxy field exists for users who want to route requests themselves.\n\n## Limitations\n\n- **EU-27 only.** The repository covers ads served in the EU. Switzerland, Norway, Iceland, Liechtenstein and the UK are not EU markets and are not in the presets; non-EU-27 custom codes are ignored and reported in the run status.\n- **Sparse coverage.** Many advertisers have no EU rows in a given window. An empty result is a valid answer, not a scraper failure.\n- **CSV export can be slow.** X's public export queue sometimes stays in progress for minutes or does not finish. `deliveryReport` mode is timeout-guarded and reports a timeout row when enabled; the main `ads` mode uses the fast JSON API instead. Daily granularity gives exact first and last delivery dates without waiting for the CSV queue.\n- **No spend, budget or ROAS.** X does not disclose them. Impressions and reach are the disclosed metrics.\n- **No keyword search across all advertisers.** The repository only searches by exact advertiser handle. `searchTerms` filters the rows of the advertisers you provide.\n- **No reliable removal detection.** A row can disappear because the selected date window changed. The monitor reports new ads, not removed campaigns.\n- **No agency inference.** Account names are shipped as disclosed. The actor does not guess an agency.\n- **Reach sums overcount.** In `groupBy=creative` mode, reach is a sum across countries; `reachIsSumAcrossCountries=true` marks it. For exact aggregate reach, use the `ad` grouping and the range window.\n- **Creatives can disappear.** Deleted or protected posts may no longer be embeddable; those rows keep the DSA data and set `creativeFetchStatus` instead of fabricating text.\n- **Data can lag.** The repository is not a real-time ad feed.\n\n## FAQ\n\n**Do I need an X account or API key?** No. The actor uses the public Ads Repository, public oEmbed and public syndication endpoints.\n\n**Why do I get zero rows for a big brand?** The repository is sparse and EU-scoped. Try a wider date range, another market, or a different handle. The run status tells you how many advertisers and markets were queried.\n\n**What is the difference between `ads` and `deliveryReport`?** `ads` uses the fast JSON API and can rebuild monthly/daily dates itself. `deliveryReport` uses X's CSV export, which adds exact flight dates, funding entity, excluded segments and enforcement fields, but can take minutes or time out.\n\n**How do I get one row per creative instead of per country?** Set `groupBy=creative` with `dateGranularity=range`.\n\n**How do I track new ads?** Set `onlyNewAds=true` and schedule the actor. Rows not seen in earlier runs get `changeType=NEW` and first/last seen timestamps.\n\n**Why is the end date one day later in the API?** The actor treats your `endDate` as inclusive and adds one day for the repository's exclusive end parameter.\n\n## Data source and scope\n\nThe actor reads only public X transparency endpoints: `ads.x.com/ads-repository`, `publish.twitter.com/oembed` and `cdn.syndication.twimg.com`. It does not use the authenticated X Ads API, does not log in, and does not collect personal data beyond what X publishes in the repository. Coverage is limited to what X discloses for EU markets.\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "twitter-ads-repository",
      "title": "X Ads Repository EU Transparency Scraper",
      "description": "Extract EU-served X ads by advertiser from the public DSA Ads Repository: exact flight dates, impressions, reach, frequency, targeting, excluded segments, funding and creative text, with no X login.",
      "version": "1.0",
      "buildTag": "latest",
      "dockerfile": "./Dockerfile",
      "readme": "# X Ads Repository EU Transparency Scraper\n\nCollect the ads X served in the European Union from the public Digital Services Act Ads Repository at `ads.x.com/ads-repository`. The actor reads the repository the same way a browser does — anonymous guest session, no X login, no developer app, no cookies to supply, no paid proxy — and turns it into structured rows you can filter, schedule and export.\n\nUse it to see which creatives a competitor runs in which EU member states, compare disclosed impressions and reach, rebuild monthly or daily delivery timelines, export DSA fields for transparency research, and monitor advertiser handles for new ads.\n\n## What the actor returns\n\nThe dataset uses `recordType` to distinguish rows:\n\n- **`ad`** — one row per post, line item and EU country. Metrics are for the selected window or month.\n- **`creative`** — one row per post when `groupBy=creative`, with all countries and per-country metrics.\n- **`advertiser`** — profile lookup rows from `mode=advertisers`.\n- **`deliveryReport`** — rows from X's public CSV report workflow with exact flight dates and extra DSA fields.\n- **`advertiserError`** — optional rows for handles or CSV exports that failed.\n\nPer ad you get:\n\n- Advertiser ID, handle, display name, 400×400 profile image (plus original), profile URL and verified flag.\n- Post ID, post URL, line item ID, ad account ID, account name and deleted flag.\n- Country code and name, query window, metrics scope and optional delivery month.\n- Impressions, reach and frequency. Monthly mode returns one row per month; daily mode adds `deliveryStartDate`, `deliveryEndDate`, `activeDayCount`, `impressionsByDay` and `impressionsByMonth`.\n- Funding instrument type, billing currency and approval status.\n- Full targeting list, grouped targeting by type, targeting types, count and a compact summary.\n- Creative text, language, author, post creation date, likes, replies, edited flag, hashtags, mentions, URLs, cashtags, official embed HTML, media URLs and video variants, card title/subtitle/landing URL/domain/CTA, and app-store details when the post uses an app card.\n- Provenance: `sourceUrl`, `repositoryUrl`, `scrapedAt`, and `qualityFlags` when upstream fields are missing.\n- Optional monitor fields: `changeType`, `firstSeenAt`, `lastSeenAt`, `contentHash`.\n\nCreative fields are omitted when the post is no longer available; `creativeFetchStatus` tells you whether enrichment was available, partial or unavailable.\n\n## Modes\n\n| Mode | What it does |\n|---|---|\n| `ads` | Resolve advertisers and collect ad rows. Supports whole-range, monthly and daily windows, creative grouping, filters, sorting and the only-new monitor. |\n| `advertisers` | Resolve handles, @handles, X profile URLs and numeric advertiser IDs into profile rows. |\n| `deliveryReport` | Use X's public CSV export for exact flight dates, funding entity, excluded targeting segments and enforcement fields. The export queue is upstream and can stall, so this mode is timeout-guarded and optional. |\n\n## Inputs\n\n| Input | Type | Default | What it does |\n|---|---|---|---|\n| `mode` | select | `ads` | `ads`, `advertisers` or `deliveryReport`. |\n| `advertisers` | string list | – | Handles, `@handles`, profile URLs or numeric advertiser IDs. |\n| `marketPreset` | select | `eu27` | `eu27`, `dach`, `nordics`, `benelux`, `southern`, `central_eastern` or `custom`. |\n| `countries` | string list | – | Custom EU-27 codes; overrides the preset when non-empty. |\n| `startDate` | date | – (last 90 days) | First delivery date, inclusive, `YYYY-MM-DD`. Earliest repository date is 2023-08-26. |\n| `endDate` | date | – (today) | Last delivery date, inclusive, `YYYY-MM-DD`. |\n| `dateGranularity` | select | `range` | `range`, `monthly` or `daily` (daily supports up to 92 days). |\n| `groupBy` | select | `ad` | `ad` keeps post × country rows; `creative` merges countries into one row. Creative grouping requires `dateGranularity=range`. |\n| `searchTerms` | string list | – | Keep rows whose creative text, card title, landing URL/domain, targeting summary, account name or advertiser name contains any term. Enables creative enrichment automatically. |\n| `minImpressions` | integer | `0` | Drop rows below this impression count. 0 disables it. |\n| `minReach` | integer | `0` | Drop rows below this reach. 0 disables it. |\n| `maxAdsPerAdvertiser` | integer | `0` | Cap per advertiser after sorting. 0 means no cap. |\n| `maxItems` | integer | `200` | Hard cap on emitted rows. |\n| `sortBy` | select | `impressions` | `impressions`, `reach` or `newest` (post creation date). |\n| `sortOrder` | select | `desc` | `desc` or `asc`. |\n| `includeCreatives` | boolean | `true` | Fetch post text, author, media, cards and optional embed HTML. Two small requests per unique post. |\n| `includeEmbedHtml` | boolean | `true` | Include the official X oEmbed blockquote. |\n| `includeMedia` | boolean | `true` | Include image/video URLs, video variants, card media and app details. |\n| `onlyNewAds` | boolean | `false` | Remember emitted keys and skip ads seen in earlier runs. New rows get `changeType=NEW`, `firstSeenAt` and `lastSeenAt`. |\n| `monitorStoreName` | string | `x-ads-repository-monitor` | Key-value store used by the only-new monitor. |\n| `includeAdvertiserErrors` | boolean | `false` | Push error rows for unresolved advertisers and failed CSV exports. |\n| `reportTimeoutSecs` | integer | `180` | Per-report timeout for `deliveryReport` mode. |\n| `retries` | integer | `3` | Extra attempts after rate limits, over-capacity answers and transient errors. |\n| `requestDelayMs` | integer | `150` | Delay between requests, in milliseconds. |\n| `proxyConfiguration` | proxy | – | Optional. The actor works without a proxy and uses its own browser TLS fingerprint. |\n\n## Output example\n\n```json\n{\n  \"recordType\": \"ad\",\n  \"adKey\": \"1993023282321514852_53751756_FR\",\n  \"advertiserHandle\": \"Tesla\",\n  \"postId\": \"1993023282321514852\",\n  \"postUrl\": \"https://x.com/Tesla/status/1993023282321514852\",\n  \"countryCode\": \"FR\",\n  \"queryStartDate\": \"2025-11-01\",\n  \"queryEndDate\": \"2025-11-30\",\n  \"metricsScope\": \"selectedWindow\",\n  \"impressions\": 968546,\n  \"reach\": 837677,\n  \"frequency\": 1.16,\n  \"fundingInstrumentType\": \"NonExclusiveIo\",\n  \"billingCurrency\": \"USD\",\n  \"approvalStatus\": \"Verified\",\n  \"targetingCount\": 9,\n  \"postCreatedAt\": \"2025-11-24T18:25:53+00:00\",\n  \"creativeText\": \"With Full Self-Driving Supervised engaged, you're 7x less likely to be involved in an accident\",\n  \"creativeLanguage\": \"en\",\n  \"cardType\": \"video_website\",\n  \"cardTitle\": \"Safety Report\",\n  \"destinationDomain\": \"tesla.com\",\n  \"creativeFetchStatus\": \"available\",\n  \"sourceUrl\": \"https://x.com/Tesla/status/1993023282321514852\",\n  \"scrapedAt\": \"2026-11-15T09:24:18+00:00\"\n}\n```\n\n## How it works\n\n1. Warm up `https://ads.x.com/ads-repository` and keep only the anonymous guest cookies.\n2. Resolve each advertiser with the repository's own `user-search` endpoint (numeric IDs are resolved through X's public profile redirect).\n3. Query `ads-search` for the selected EU countries and date windows. One request can cover all 27 countries. The user-facing end date is inclusive; the API end date is exclusive, so the actor adds one day.\n4. For `monthly`, query one calendar month per request and emit one row per month. For `daily`, query each day, then query the whole window once for accurate totals, and derive exact first/last delivery dates and per-day impressions.\n5. Enrich only the rows that will be emitted. Creative text and media come from X's public oEmbed and syndication endpoints.\n6. Apply filters, sorting, per-advertiser and total caps; apply the optional only-new monitor; push clean rows with empty fields omitted.\n\n## Reliability and cost\n\n- Retries with exponential backoff on 429, 5xx and Cloudflare 520/522/524, plus a fresh guest session on 403.\n- X often answers 503 Over capacity; the actor retries per request.\n- The actor is HTTP-only and runs comfortably at 512 MB. Creative enrichment is two small requests per unique post.\n- The default prefill is the smallest run with output: Tesla, France, November 2025, one row, no creative enrichment. It finishes in seconds.\n- There is no proxy requirement and no credential input. An optional proxy field exists for users who want to route requests themselves.\n\n## Limitations\n\n- **EU-27 only.** The repository covers ads served in the EU. Switzerland, Norway, Iceland, Liechtenstein and the UK are not EU markets and are not in the presets; non-EU-27 custom codes are ignored and reported in the run status.\n- **Sparse coverage.** Many advertisers have no EU rows in a given window. An empty result is a valid answer, not a scraper failure.\n- **CSV export can be slow.** X's public export queue sometimes stays in progress for minutes or does not finish. `deliveryReport` mode is timeout-guarded and reports a timeout row when enabled; the main `ads` mode uses the fast JSON API instead. Daily granularity gives exact first and last delivery dates without waiting for the CSV queue.\n- **No spend, budget or ROAS.** X does not disclose them. Impressions and reach are the disclosed metrics.\n- **No keyword search across all advertisers.** The repository only searches by exact advertiser handle. `searchTerms` filters the rows of the advertisers you provide.\n- **No reliable removal detection.** A row can disappear because the selected date window changed. The monitor reports new ads, not removed campaigns.\n- **No agency inference.** Account names are shipped as disclosed. The actor does not guess an agency.\n- **Reach sums overcount.** In `groupBy=creative` mode, reach is a sum across countries; `reachIsSumAcrossCountries=true` marks it. For exact aggregate reach, use the `ad` grouping and the range window.\n- **Creatives can disappear.** Deleted or protected posts may no longer be embeddable; those rows keep the DSA data and set `creativeFetchStatus` instead of fabricating text.\n- **Data can lag.** The repository is not a real-time ad feed.\n\n## FAQ\n\n**Do I need an X account or API key?** No. The actor uses the public Ads Repository, public oEmbed and public syndication endpoints.\n\n**Why do I get zero rows for a big brand?** The repository is sparse and EU-scoped. Try a wider date range, another market, or a different handle. The run status tells you how many advertisers and markets were queried.\n\n**What is the difference between `ads` and `deliveryReport`?** `ads` uses the fast JSON API and can rebuild monthly/daily dates itself. `deliveryReport` uses X's CSV export, which adds exact flight dates, funding entity, excluded segments and enforcement fields, but can take minutes or time out.\n\n**How do I get one row per creative instead of per country?** Set `groupBy=creative` with `dateGranularity=range`.\n\n**How do I track new ads?** Set `onlyNewAds=true` and schedule the actor. Rows not seen in earlier runs get `changeType=NEW` and first/last seen timestamps.\n\n**Why is the end date one day later in the API?** The actor treats your `endDate` as inclusive and adds one day for the repository's exclusive end parameter.\n\n## Data source and scope\n\nThe actor reads only public X transparency endpoints: `ads.x.com/ads-repository`, `publish.twitter.com/oembed` and `cdn.syndication.twimg.com`. It does not use the authenticated X Ads API, does not log in, and does not collect personal data beyond what X publishes in the repository. Coverage is limited to what X discloses for EU markets.\n",
      "input": {
        "title": "X Ads Repository EU Transparency Scraper Input",
        "description": "Resolve X advertiser handles and collect their EU-served ads from the public Digital Services Act Ads Repository, with optional monthly or daily delivery windows, creative enrichment and CSV delivery reports.",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "mode": {
            "sectionCaption": "Advertisers and markets",
            "title": "Mode",
            "type": "string",
            "description": "`ads` collects ad rows. `advertisers` only resolves handles, @handles, profile URLs or numeric IDs. `deliveryReport` uses X's public CSV export workflow for exact flight dates, funding entity, excluded segments and enforcement fields.",
            "editor": "select",
            "enum": [
              "ads",
              "advertisers",
              "deliveryReport"
            ],
            "enumTitles": [
              "Collect ads",
              "Resolve advertiser profiles",
              "CSV delivery reports"
            ],
            "default": "ads",
            "prefill": "ads"
          },
          "advertisers": {
            "title": "Advertisers",
            "type": "array",
            "description": "X handles such as `Tesla`, `@Tesla`, profile URLs such as `https://x.com/Tesla`, or numeric advertiser IDs.",
            "editor": "stringList",
            "prefill": [
              "Tesla"
            ],
            "items": {
              "type": "string"
            }
          },
          "marketPreset": {
            "title": "Market preset",
            "type": "string",
            "description": "EU market set to query. A non-empty `countries` list overrides this preset. The repository covers the EU-27 only: Switzerland, Norway and the UK are not EU markets.",
            "editor": "select",
            "enum": [
              "eu27",
              "dach",
              "nordics",
              "benelux",
              "southern",
              "central_eastern",
              "custom"
            ],
            "enumTitles": [
              "All EU-27",
              "DACH (Germany, Austria)",
              "Nordics (Denmark, Finland, Sweden)",
              "Benelux (Belgium, Netherlands, Luxembourg)",
              "Southern Europe",
              "Central and Eastern Europe",
              "Custom country list"
            ],
            "default": "eu27",
            "prefill": "custom"
          },
          "countries": {
            "title": "Custom countries",
            "type": "array",
            "description": "Two-letter EU country codes such as `FR`, `DE`, `ES`. Overrides the preset when non-empty. Codes outside the EU-27 are ignored and reported in the run status.",
            "editor": "stringList",
            "prefill": [
              "FR"
            ],
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "sectionCaption": "Delivery window and grouping",
            "title": "Start date (inclusive)",
            "type": "string",
            "description": "First delivery date in `YYYY-MM-DD` format. The public repository starts on 2023-08-26. Leave blank for 90 days before today.",
            "editor": "datepicker",
            "prefill": "2025-11-01"
          },
          "endDate": {
            "title": "End date (inclusive)",
            "type": "string",
            "description": "Last delivery date in `YYYY-MM-DD` format. Leave blank for today.",
            "editor": "datepicker",
            "prefill": "2025-11-30"
          },
          "dateGranularity": {
            "title": "Date granularity",
            "type": "string",
            "description": "`range` returns one row per ad and country with metrics for the whole window. `monthly` returns one row per ad, country and calendar month with that month's impressions and reach. `daily` returns exact first and last delivery dates plus per-day impressions for windows up to 92 days.",
            "editor": "select",
            "enum": [
              "range",
              "monthly",
              "daily"
            ],
            "enumTitles": [
              "Whole range",
              "Monthly breakdown",
              "Daily delivery dates"
            ],
            "default": "range",
            "prefill": "range"
          },
          "groupBy": {
            "title": "Group rows by",
            "type": "string",
            "description": "`ad` keeps the DSA row per post, line item and country. `creative` merges the same post across countries into one row with `countries`, `impressionsByCountry` and `reachByCountry`; reach is then a sum across countries. Creative grouping requires `dateGranularity=range`.",
            "editor": "select",
            "enum": [
              "ad",
              "creative"
            ],
            "enumTitles": [
              "Ad x country rows",
              "One row per creative"
            ],
            "default": "ad",
            "prefill": "ad"
          },
          "searchTerms": {
            "sectionCaption": "Filters and output",
            "title": "Keyword filter",
            "type": "array",
            "description": "Keep ads whose creative text, card title, landing URL/domain, targeting summary, account name or advertiser name contains any of these terms. Creative enrichment is enabled automatically when this filter is used.",
            "editor": "stringList",
            "default": [],
            "prefill": [],
            "items": {
              "type": "string"
            }
          },
          "minImpressions": {
            "title": "Minimum impressions",
            "type": "integer",
            "description": "Drop rows with fewer impressions in the selected window or month. 0 disables the filter.",
            "editor": "number",
            "default": 0,
            "prefill": 0,
            "minimum": 0,
            "maximum": 1000000000000
          },
          "minReach": {
            "title": "Minimum reach",
            "type": "integer",
            "description": "Drop rows with lower reach in the selected window or month. 0 disables the filter.",
            "editor": "number",
            "default": 0,
            "prefill": 0,
            "minimum": 0,
            "maximum": 1000000000000
          },
          "maxAdsPerAdvertiser": {
            "title": "Maximum rows per advertiser",
            "type": "integer",
            "description": "Cap applied to each advertiser after sorting. 0 means no per-advertiser cap.",
            "editor": "number",
            "default": 0,
            "prefill": 0,
            "minimum": 0,
            "maximum": 10000
          },
          "maxItems": {
            "title": "Maximum records",
            "type": "integer",
            "description": "Hard cap on emitted rows across all advertisers.",
            "editor": "number",
            "default": 200,
            "prefill": 1,
            "minimum": 1,
            "maximum": 10000
          },
          "sortBy": {
            "title": "Sort by",
            "type": "string",
            "description": "Sort the final rows before applying caps. `newest` uses the post creation date.",
            "editor": "select",
            "enum": [
              "impressions",
              "reach",
              "newest"
            ],
            "enumTitles": [
              "Impressions",
              "Reach",
              "Newest post"
            ],
            "default": "impressions",
            "prefill": "impressions"
          },
          "sortOrder": {
            "title": "Sort order",
            "type": "string",
            "description": "Ascending or descending order for the selected sort field.",
            "editor": "select",
            "enum": [
              "desc",
              "asc"
            ],
            "enumTitles": [
              "Descending",
              "Ascending"
            ],
            "default": "desc",
            "prefill": "desc"
          },
          "includeCreatives": {
            "title": "Enrich creatives",
            "type": "boolean",
            "description": "Resolve post text, language, author, hashtags, mentions, URLs, media, cards, app details and embed HTML through X's public oEmbed and syndication endpoints. This adds two small requests per unique post.",
            "default": true,
            "prefill": false
          },
          "includeEmbedHtml": {
            "title": "Include embed HTML",
            "type": "boolean",
            "description": "Add the official X oEmbed blockquote HTML when creatives are enriched.",
            "default": true,
            "prefill": false
          },
          "includeMedia": {
            "title": "Include media and app cards",
            "type": "boolean",
            "description": "Add image/video URLs, video variants, card media and app-store details when creatives are enriched.",
            "default": true,
            "prefill": false
          },
          "onlyNewAds": {
            "sectionCaption": "Monitoring",
            "title": "Only new ads",
            "type": "boolean",
            "description": "Remember emitted ad keys in a key-value store and skip ads seen in earlier runs. New rows get `changeType=NEW`, `firstSeenAt` and `lastSeenAt`. Works in ads and deliveryReport modes.",
            "default": false,
            "prefill": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Key-value store used by the only-new monitor. Change it to keep separate watch lists.",
            "editor": "textfield",
            "default": "x-ads-repository-monitor",
            "prefill": "x-ads-repository-monitor"
          },
          "includeAdvertiserErrors": {
            "sectionCaption": "Reliability",
            "title": "Include advertiser errors",
            "type": "boolean",
            "description": "Push a row for each advertiser that could not be resolved and for each delivery report that failed, instead of only recording it in the run log.",
            "default": false,
            "prefill": false
          },
          "reportTimeoutSecs": {
            "title": "CSV report timeout (seconds)",
            "type": "integer",
            "description": "How long to wait for one delivery report. X's export queue can be slow or stay in progress; the deliveryReport mode reports a timeout row when this expires.",
            "editor": "number",
            "default": 180,
            "prefill": 60,
            "minimum": 30,
            "maximum": 600
          },
          "retries": {
            "title": "Retries per request",
            "type": "integer",
            "description": "Extra attempts after a rate limit, over-capacity response or transient network error. The repository often answers 503 Over capacity.",
            "editor": "number",
            "default": 3,
            "prefill": 3,
            "minimum": 0,
            "maximum": 5
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "type": "integer",
            "description": "Pause between repository and enrichment requests. Raise it if X starts rate-limiting the run.",
            "editor": "number",
            "default": 150,
            "prefill": 0,
            "minimum": 0,
            "maximum": 5000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The actor works without a proxy and uses its own browser TLS fingerprint. Provide a proxy only if you want to route requests yourself.",
            "editor": "proxy"
          }
        },
        "required": [
          "mode",
          "advertisers"
        ]
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "X Ads Repository EU Transparency Scraper Output",
        "description": "Dataset containing one row per EU-served ad and country with delivery dates, impressions, reach, targeting and creative details.",
        "properties": {
          "ads": {
            "type": "string",
            "title": "X ads",
            "description": "Dataset containing all collected X Ads Repository records.",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "defaultMemoryMbytes": 256,
      "storages": {
        "dataset": {
          "actorSpecification": 1,
          "views": {
            "ads": {
              "title": "Ads",
              "transformation": {
                "fields": [
                  "advertiserHandle",
                  "postUrl",
                  "countryCode",
                  "impressions",
                  "reach",
                  "frequency",
                  "deliveryStartDate",
                  "deliveryEndDate",
                  "targetingCount"
                ]
              },
              "display": {
                "component": "table",
                "properties": {}
              }
            },
            "creatives": {
              "title": "Creatives",
              "transformation": {
                "fields": [
                  "advertiserHandle",
                  "postUrl",
                  "countries",
                  "impressions",
                  "reach",
                  "cardTitle",
                  "creativeText"
                ]
              },
              "display": {
                "component": "table",
                "properties": {}
              }
            }
          }
        }
      },
      "environmentVariables": {}
    },
    "buildNumber": "1.0.4",
    "imageDigest": "e479082cc9628c4bb40a4548988ddaeecbd09b010c3b933d64c6e31a4dd5d9f1",
    "actVersion": {
      "sourceType": "SOURCE_FILES",
      "buildTag": "latest",
      "versionNumber": "1.0"
    },
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0.013918888888888889
    }
  }
}