{
  "data": {
    "id": "MAF88N8BTa3JyGGoT",
    "actId": "IyhY4xwzTHW5fCgW3",
    "userId": "tnBVjt3CXmcUrEE3L",
    "startedAt": "2026-11-16T01:05:22.740Z",
    "finishedAt": "2026-11-16T01:05:27.592Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CI"
    },
    "stats": {
      "durationMillis": 4698,
      "runTimeSecs": 4.698,
      "computeUnits": 0.00522,
      "imageSizeBytes": 319188992
    },
    "options": {
      "useCache": true,
      "betaPackages": false,
      "memoryMbytes": 4096,
      "diskMbytes": 8192
    },
    "createdByOrganizationMemberUserId": "F2Aeb3gE2syjqz9xC",
    "exitCode": 0,
    "inputSchema": "{\n  \"title\": \"Meta Political Ad Spend Report Exporter Input\",\n  \"description\": \"Choose one or more countries and a published date window to export Meta Ad Library Report totals, advertiser spending, regional spend, top spenders and weekly search keywords for political and issue ads.\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"mode\": {\n      \"sectionCaption\": \"Report source and country\",\n      \"title\": \"Mode\",\n      \"type\": \"string\",\n      \"description\": \"`report` returns the sections you select. `totals` returns only lifetime spend and ad totals, `advertisers` the spending leaderboard, `regions` spending by state/region with optional top spenders, `keywords` the week's top Ad Library searches, and `spendTracker` compares named advertisers over 30 or 90 days.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"report\",\n        \"totals\",\n        \"advertisers\",\n        \"regions\",\n        \"keywords\",\n        \"spendTracker\"\n      ],\n      \"enumTitles\": [\n        \"Full report (selected sections)\",\n        \"Country totals\",\n        \"Advertiser leaderboard\",\n        \"Spending by region\",\n        \"Top search keywords\",\n        \"Advertiser spend tracker\"\n      ],\n      \"default\": \"report\",\n      \"prefill\": \"report\"\n    },\n    \"countries\": {\n      \"title\": \"Countries\",\n      \"type\": \"array\",\n      \"description\": \"One or more countries Meta publishes the Ad Library Report for. Each country returns its own totals, advertisers, regions and keywords.\",\n      \"editor\": \"select\",\n      \"items\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"AD\",\n          \"AE\",\n          \"AG\",\n          \"AI\",\n          \"AL\",\n          \"AM\",\n          \"AO\",\n          \"AQ\",\n          \"AR\",\n          \"AT\",\n          \"AU\",\n          \"AZ\",\n          \"BA\",\n          \"BB\",\n          \"BD\",\n          \"BE\",\n          \"BF\",\n          \"BG\",\n          \"BH\",\n          \"BI\",\n          \"BJ\",\n          \"BM\",\n          \"BN\",\n          \"BO\",\n          \"BR\",\n          \"BS\",\n          \"BT\",\n          \"BV\",\n          \"BW\",\n          \"BY\",\n          \"BZ\",\n          \"CA\",\n          \"CD\",\n          \"CF\",\n          \"CG\",\n          \"CH\",\n          \"CI\",\n          \"CL\",\n          \"CM\",\n          \"CO\",\n          \"CR\",\n          \"CV\",\n          \"CY\",\n          \"CZ\",\n          \"DE\",\n          \"DJ\",\n          \"DK\",\n          \"DM\",\n          \"DO\",\n          \"DZ\",\n          \"EC\",\n          \"EE\",\n          \"EG\",\n          \"ER\",\n          \"ES\",\n          \"ET\",\n          \"FI\",\n          \"FJ\",\n          \"FK\",\n          \"FM\",\n          \"FR\",\n          \"GA\",\n          \"GB\",\n          \"GD\",\n          \"GE\",\n          \"GG\",\n          \"GH\",\n          \"GI\",\n          \"GM\",\n          \"GN\",\n          \"GQ\",\n          \"GR\",\n          \"GS\",\n          \"GT\",\n          \"GW\",\n          \"GY\",\n          \"HN\",\n          \"HR\",\n          \"HT\",\n          \"HU\",\n          \"ID\",\n          \"IE\",\n          \"IL\",\n          \"IM\",\n          \"IN\",\n          \"IO\",\n          \"IQ\",\n          \"IS\",\n          \"IT\",\n          \"JE\",\n          \"JM\",\n          \"JO\",\n          \"JP\",\n          \"KE\",\n          \"KG\",\n          \"KH\",\n          \"KI\",\n          \"KM\",\n          \"KN\",\n          \"KW\",\n          \"KY\",\n          \"KZ\",\n          \"LA\",\n          \"LB\",\n          \"LC\",\n          \"LI\",\n          \"LK\",\n          \"LR\",\n          \"LS\",\n          \"LT\",\n          \"LU\",\n          \"LV\",\n          \"LY\",\n          \"MA\",\n          \"MC\",\n          \"MD\",\n          \"ME\",\n          \"MG\",\n          \"MH\",\n          \"MK\",\n          \"ML\",\n          \"MM\",\n          \"MN\",\n          \"MR\",\n          \"MS\",\n          \"MT\",\n          \"MU\",\n          \"MV\",\n          \"MW\",\n          \"MX\",\n          \"MY\",\n          \"MZ\",\n          \"NA\",\n          \"NE\",\n          \"NG\",\n          \"NI\",\n          \"NL\",\n          \"NO\",\n          \"NP\",\n          \"NR\",\n          \"NZ\",\n          \"OM\",\n          \"PA\",\n          \"PE\",\n          \"PG\",\n          \"PH\",\n          \"PK\",\n          \"PL\",\n          \"PN\",\n          \"PS\",\n          \"PT\",\n          \"PW\",\n          \"PY\",\n          \"QA\",\n          \"RO\",\n          \"RS\",\n          \"RW\",\n          \"SA\",\n          \"SB\",\n          \"SC\",\n          \"SE\",\n          \"SG\",\n          \"SH\",\n          \"SI\",\n          \"SK\",\n          \"SL\",\n          \"SM\",\n          \"SN\",\n          \"SO\",\n          \"SR\",\n          \"SS\",\n          \"ST\",\n          \"SV\",\n          \"SZ\",\n          \"TC\",\n          \"TD\",\n          \"TG\",\n          \"TH\",\n          \"TJ\",\n          \"TL\",\n          \"TM\",\n          \"TN\",\n          \"TO\",\n          \"TR\",\n          \"TT\",\n          \"TV\",\n          \"TW\",\n          \"TZ\",\n          \"UA\",\n          \"UG\",\n          \"US\",\n          \"UY\",\n          \"UZ\",\n          \"VA\",\n          \"VC\",\n          \"VE\",\n          \"VG\",\n          \"VN\",\n          \"VU\",\n          \"WS\",\n          \"XK\",\n          \"YE\",\n          \"ZA\",\n          \"ZM\",\n          \"ZW\"\n        ],\n        \"enumTitles\": [\n          \"Andorra\",\n          \"United Arab Emirates\",\n          \"Antigua\",\n          \"Anguilla\",\n          \"Albania\",\n          \"Armenia\",\n          \"Angola\",\n          \"Antarctica\",\n          \"Argentina\",\n          \"Austria\",\n          \"Australia\",\n          \"Azerbaijan\",\n          \"Bosnia and Herzegovina\",\n          \"Barbados\",\n          \"Bangladesh\",\n          \"Belgium\",\n          \"Burkina Faso\",\n          \"Bulgaria\",\n          \"Bahrain\",\n          \"Burundi\",\n          \"Benin\",\n          \"Bermuda\",\n          \"Brunei\",\n          \"Bolivia\",\n          \"Brazil\",\n          \"The Bahamas\",\n          \"Bhutan\",\n          \"Bouvet Island\",\n          \"Botswana\",\n          \"Belarus\",\n          \"Belize\",\n          \"Canada\",\n          \"Democratic Republic of the Congo\",\n          \"Central African Republic\",\n          \"Republic of the Congo\",\n          \"Switzerland\",\n          \"Côte d'Ivoire\",\n          \"Chile\",\n          \"Cameroon\",\n          \"Colombia\",\n          \"Costa Rica\",\n          \"Cape Verde\",\n          \"Cyprus\",\n          \"Czech Republic\",\n          \"Germany\",\n          \"Djibouti\",\n          \"Denmark\",\n          \"Dominica\",\n          \"Dominican Republic\",\n          \"Algeria\",\n          \"Ecuador\",\n          \"Estonia\",\n          \"Egypt\",\n          \"Eritrea\",\n          \"Spain\",\n          \"Ethiopia\",\n          \"Finland\",\n          \"Fiji\",\n          \"Falkland Islands\",\n          \"Federated States of Micronesia\",\n          \"France\",\n          \"Gabon\",\n          \"United Kingdom\",\n          \"Grenada\",\n          \"Georgia\",\n          \"Guernsey\",\n          \"Ghana\",\n          \"Gibraltar\",\n          \"The Gambia\",\n          \"Guinea\",\n          \"Equatorial Guinea\",\n          \"Greece\",\n          \"South Georgia and the South Sandwich Islands\",\n          \"Guatemala\",\n          \"Guinea-Bissau\",\n          \"Guyana\",\n          \"Honduras\",\n          \"Croatia\",\n          \"Haiti\",\n          \"Hungary\",\n          \"Indonesia\",\n          \"Ireland\",\n          \"Israel\",\n          \"Isle of Man\",\n          \"India\",\n          \"British Indian Ocean Territory\",\n          \"Iraq\",\n          \"Iceland\",\n          \"Italy\",\n          \"Jersey\",\n          \"Jamaica\",\n          \"Jordan\",\n          \"Japan\",\n          \"Kenya\",\n          \"Kyrgyzstan\",\n          \"Cambodia\",\n          \"Kiribati\",\n          \"Comoros\",\n          \"Saint Kitts and Nevis\",\n          \"Kuwait\",\n          \"Cayman Islands\",\n          \"Kazakhstan\",\n          \"Laos\",\n          \"Lebanon\",\n          \"St. Lucia\",\n          \"Liechtenstein\",\n          \"Sri Lanka\",\n          \"Liberia\",\n          \"Lesotho\",\n          \"Lithuania\",\n          \"Luxembourg\",\n          \"Latvia\",\n          \"Libya\",\n          \"Morocco\",\n          \"Monaco\",\n          \"Moldova\",\n          \"Montenegro\",\n          \"Madagascar\",\n          \"Marshall Islands\",\n          \"Macedonia\",\n          \"Mali\",\n          \"Myanmar (Burma)\",\n          \"Mongolia\",\n          \"Mauritania\",\n          \"Montserrat\",\n          \"Malta\",\n          \"Mauritius\",\n          \"Maldives\",\n          \"Malawi\",\n          \"Mexico\",\n          \"Malaysia\",\n          \"Mozambique\",\n          \"Namibia\",\n          \"Niger\",\n          \"Nigeria\",\n          \"Nicaragua\",\n          \"Netherlands\",\n          \"Norway\",\n          \"Nepal\",\n          \"Nauru\",\n          \"New Zealand\",\n          \"Oman\",\n          \"Panama\",\n          \"Peru\",\n          \"Papua New Guinea\",\n          \"Philippines\",\n          \"Pakistan\",\n          \"Poland\",\n          \"Pitcairn\",\n          \"Palestine\",\n          \"Portugal\",\n          \"Palau\",\n          \"Paraguay\",\n          \"Qatar\",\n          \"Romania\",\n          \"Serbia\",\n          \"Rwanda\",\n          \"Saudi Arabia\",\n          \"Solomon Islands\",\n          \"Seychelles\",\n          \"Sweden\",\n          \"Singapore\",\n          \"Saint Helena\",\n          \"Slovenia\",\n          \"Slovakia\",\n          \"Sierra Leone\",\n          \"San Marino\",\n          \"Senegal\",\n          \"Somalia\",\n          \"Suriname\",\n          \"South Sudan\",\n          \"São Tomé and Príncipe\",\n          \"El Salvador\",\n          \"Eswatini\",\n          \"Turks and Caicos Islands\",\n          \"Chad\",\n          \"Togo\",\n          \"Thailand\",\n          \"Tajikistan\",\n          \"Timor-Leste\",\n          \"Turkmenistan\",\n          \"Tunisia\",\n          \"Tonga\",\n          \"Türkiye\",\n          \"Trinidad and Tobago\",\n          \"Tuvalu\",\n          \"Taiwan\",\n          \"Tanzania\",\n          \"Ukraine\",\n          \"Uganda\",\n          \"United States\",\n          \"Uruguay\",\n          \"Uzbekistan\",\n          \"Vatican City\",\n          \"Saint Vincent and the Grenadines\",\n          \"Venezuela\",\n          \"British Virgin Islands\",\n          \"Vietnam\",\n          \"Vanuatu\",\n          \"Samoa\",\n          \"Kosovo\",\n          \"Yemen\",\n          \"South Africa\",\n          \"Zambia\",\n          \"Zimbabwe\"\n        ]\n      },\n      \"uniqueItems\": true,\n      \"default\": [\n        \"US\"\n      ],\n      \"prefill\": [\n        \"US\"\n      ]\n    },\n    \"timeWindow\": {\n      \"title\": \"Date window\",\n      \"type\": \"string\",\n      \"description\": \"Reporting window ending on the latest published day. Some EU countries publish only `all_dates`; the actor then uses that longer window and marks the row with `windowFallback`.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"last_day\",\n        \"last_7_days\",\n        \"last_30_days\",\n        \"last_90_days\",\n        \"all_dates\"\n      ],\n      \"enumTitles\": [\n        \"Last day\",\n        \"Last 7 days\",\n        \"Last 30 days\",\n        \"Last 90 days\",\n        \"All dates (since 2019)\"\n      ],\n      \"default\": \"last_day\",\n      \"prefill\": \"last_day\"\n    },\n    \"reportEndDate\": {\n      \"title\": \"Report end date\",\n      \"type\": \"string\",\n      \"description\": \"Optional `YYYY-MM-DD` end date. Meta keeps only the seven most recent report dates; leave blank for the latest published date.\",\n      \"editor\": \"textfield\",\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"sections\": {\n      \"sectionCaption\": \"Sections and filtering\",\n      \"title\": \"Sections (mode=report)\",\n      \"type\": \"array\",\n      \"description\": \"Which report sections to return. Ignored by the focused modes, except that `regions` can add top spenders through `includeRegionSpenders`.\",\n      \"editor\": \"select\",\n      \"items\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"totals\",\n          \"advertisers\",\n          \"regions\",\n          \"regionSpenders\",\n          \"keywords\"\n        ],\n        \"enumTitles\": [\n          \"Country totals\",\n          \"Advertisers\",\n          \"Spending by region\",\n          \"Top spenders per region\",\n          \"Top search keywords\"\n        ]\n      },\n      \"uniqueItems\": true,\n      \"default\": [\n        \"totals\",\n        \"advertisers\",\n        \"regions\",\n        \"regionSpenders\",\n        \"keywords\"\n      ],\n      \"prefill\": [\n        \"totals\"\n      ]\n    },\n    \"advertiserFilter\": {\n      \"title\": \"Advertiser name filter\",\n      \"type\": \"string\",\n      \"description\": \"Only return advertisers whose Page name or disclaimer contains this text. Applies to advertiser and region-spender rows; leave blank for all advertisers.\",\n      \"editor\": \"textfield\",\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"sortBy\": {\n      \"title\": \"Sort advertisers by\",\n      \"type\": \"string\",\n      \"description\": \"Order of the advertiser leaderboard. `spend` uses Meta's amount spent, `ads` its number of ads in the Library.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"spend\",\n        \"ads\",\n        \"page_name\"\n      ],\n      \"enumTitles\": [\n        \"Amount spent\",\n        \"Number of ads\",\n        \"Page name\"\n      ],\n      \"default\": \"spend\",\n      \"prefill\": \"spend\"\n    },\n    \"sortOrder\": {\n      \"title\": \"Sort direction\",\n      \"type\": \"string\",\n      \"description\": \"Descending puts the biggest spenders first; ascending reverses the order.\",\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    \"maxItems\": {\n      \"sectionCaption\": \"Limits and optional enrichment\",\n      \"title\": \"Max rows per country per section\",\n      \"type\": \"integer\",\n      \"description\": \"Hard cap for each section in each country. Meta publishes about 2,800 US advertisers for a single day and tens of thousands for all dates, so pagination stops at this cap.\",\n      \"minimum\": 1,\n      \"maximum\": 100000,\n      \"default\": 5000,\n      \"prefill\": 1\n    },\n    \"regionSpenderLimit\": {\n      \"title\": \"Top spenders per region\",\n      \"type\": \"integer\",\n      \"description\": \"How many of each region's highest-spending advertisers to return when the `regionSpenders` section is enabled.\",\n      \"minimum\": 1,\n      \"maximum\": 50,\n      \"default\": 10,\n      \"prefill\": 10\n    },\n    \"includeDeletedAdvertisers\": {\n      \"title\": \"Include deleted Pages\",\n      \"type\": \"boolean\",\n      \"description\": \"Keep advertisers whose Facebook Page has been deleted. The `isDeletedPage` field marks them.\",\n      \"default\": true,\n      \"prefill\": true\n    },\n    \"includeRegionSpenders\": {\n      \"title\": \"Include top spenders per region (mode=regions)\",\n      \"type\": \"boolean\",\n      \"description\": \"When mode is `regions`, also return the highest-spending advertisers in each region.\",\n      \"default\": true,\n      \"prefill\": true\n    },\n    \"advertiserPageIds\": {\n      \"sectionCaption\": \"Spend tracker mode\",\n      \"title\": \"Advertiser Page IDs (mode=spendTracker)\",\n      \"type\": \"array\",\n      \"description\": \"Page IDs, Page URLs or Ad Library URLs to compare. Each row returns the advertiser's spend for the selected tracker window.\",\n      \"editor\": \"stringList\",\n      \"default\": [],\n      \"prefill\": []\n    },\n    \"spendTrackerWindow\": {\n      \"title\": \"Spend tracker window (mode=spendTracker)\",\n      \"type\": \"string\",\n      \"description\": \"Comparison window used by the report's spending tracker.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"last_30_days\",\n        \"last_90_days\"\n      ],\n      \"enumTitles\": [\n        \"Last 30 days\",\n        \"Last 90 days\"\n      ],\n      \"default\": \"last_90_days\",\n      \"prefill\": \"last_90_days\"\n    }\n  },\n  \"required\": []\n}",
    "readme": "# Meta Political Ad Spend Report Exporter\n\nExport Meta's public **Ad Library Report** for ads about social issues, elections or politics — country spending totals, advertiser leaderboards, regional spend, top spenders per region and the week's most-searched keywords. The report covers Facebook and Instagram political and issue ads published since 2019, in every country where Meta publishes the report. No Facebook account, login or API key is needed.\n\n## What this actor does\n\n- **Six modes:** one full report with selectable sections, plus focused totals, advertiser, region, keyword and spend-tracker modes.\n- **Any published market:** 205 country codes, with automatic handling of markets where Meta only publishes the all-dates window.\n- **Five date windows:** last day, last 7, last 30, last 90 days or all dates since 2019, ending on any of Meta's seven most recent report dates.\n- **Advertiser controls:** server-side name filter, sort by amount spent, number of ads or Page name, and full cursor pagination.\n- **Regional depth:** state/region spend, plus the top spenders inside each region from Meta's own per-region report files.\n- **Clean rows:** every record carries the country, currency, date window, report date and a `recordType`; empty fields are omitted, so there are no null values to clean up.\n\n## Modes\n\n| Mode | What it returns |\n|---|---|\n| `report` | The sections selected in `sections` (all five by default). |\n| `totals` | Lifetime ad count and spend for each country, plus the selected window's regional spend total. |\n| `advertisers` | The spending leaderboard, with filter, sort and pagination. |\n| `regions` | Spending for every state/region, with optional top spenders. |\n| `keywords` | The week's top Ad Library search phrases in each country. |\n| `spendTracker` | A 30- or 90-day spend comparison for Page IDs you supply. |\n\n## Output per record\n\nEvery row starts with the same report context:\n\n- `recordType` — `countryTotals`, `advertiser`, `region`, `regionSpender`, `keyword` or `spendTracker`\n- `countryCode`, `countryName`, `currency`\n- `timeWindow`, `timeWindowTitle`\n- `reportDate` — the day the report data ends\n- `reportEndDate` — the report date published by Meta\n- `periodStartDate`, `periodEndDate` — the inclusive window (omitted for all dates)\n- `requestedTimeWindow`, `windowFallback` — present only when Meta could not publish the requested window\n- `sourceUrl`, `scrapedAt`\n\n### Country totals (`recordType: countryTotals`)\n\n- `totalAdsLifetime` — ads in the report since 2019\n- `totalSpendLifetime` — lifetime spend in the country's currency\n- `windowSpendTotal` — sum of regional spend for the selected window\n- `windowSpendIsLowerBound` — present when any region is in Meta's below-floor bucket\n- `regionCount`, `advertiserCount`\n\n### Advertisers (`recordType: advertiser`)\n\n- `rank` — position in the selected sort order\n- `pageName`, `pageId`, `pageUrl`, `pageIconUrl`\n- `adLibraryUrl` — the advertiser's ads in the Ad Library\n- `disclaimer` — the paid-for-by entity\n- `amountSpent`, `currency`, `numberOfAds`\n- `isDeletedPage` — the Page has been removed from Facebook\n- `spendDetails[]` — amount and currency pairs when Meta reports more than one\n\n### Region spend (`recordType: region`)\n\n- `rank`, `regionName`\n- `amountSpent` — numeric spend when Meta discloses an amount\n- `amountSpentLabel`, `amountSpentIsFloor` — `≤100` when the region is in Meta's floor bucket\n\n### Top spenders per region (`recordType: regionSpender`)\n\n- `regionName`, `rank`\n- `pageName`, `pageId`, `pageUrl`, `pageIconUrl`, `adLibraryUrl`, `disclaimer`\n- `amountSpent`, `amountSpentLabel`, `amountSpentIsFloor`, `currency`\n- `numberOfAds` when Meta provides it\n\n### Keywords (`recordType: keyword`)\n\n- `rank`, `keyword`, `searchUrl`\n\n### Spend tracker (`recordType: spendTracker`)\n\n- `pageName`, `pageId`, `pageUrl`, `pageIconUrl`, `adLibraryUrl`\n- `pageProfileUrl`, `pageLikes`, `verification`\n- `amountSpent` — spend in the chosen 30- or 90-day window\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | select | `report` | `report`, `totals`, `advertisers`, `regions`, `keywords` or `spendTracker` |\n| `countries` | multi-select | `[\"US\"]` | One or more of the 205 countries where Meta publishes the report |\n| `timeWindow` | select | `last_day` | `last_day`, `last_7_days`, `last_30_days`, `last_90_days` or `all_dates` |\n| `reportEndDate` | text | – | Optional `YYYY-MM-DD` end date among Meta's seven most recent report dates |\n| `sections` | multi-select | `[\"totals\", \"advertisers\", \"regions\", \"regionSpenders\", \"keywords\"]` | `totals`, `advertisers`, `regions`, `regionSpenders`, `keywords` (mode=`report`) |\n| `advertiserFilter` | text | – | Keep advertisers whose Page name or disclaimer contains this text |\n| `sortBy` | select | `spend` | `spend`, `ads` or `page_name` |\n| `sortOrder` | select | `desc` | `desc` or `asc` |\n| `maxItems` | integer | `5000` | Cap per country per section, 1–100000 |\n| `regionSpenderLimit` | integer | `10` | Top spenders returned per region, 1–50 |\n| `includeDeletedAdvertisers` | boolean | `true` | Keep deleted Pages and flag them |\n| `includeRegionSpenders` | boolean | `true` | In mode=`regions`, also return top spenders |\n| `advertiserPageIds` | string list | – | Page IDs or URLs for mode=`spendTracker` |\n| `spendTrackerWindow` | select | `last_90_days` | `last_30_days` or `last_90_days` |\n\n## Examples\n\n### Daily country totals for two markets\n\n```json\n{\n  \"mode\": \"report\",\n  \"countries\": [\"US\", \"GB\"],\n  \"timeWindow\": \"last_day\",\n  \"sections\": [\"totals\"]\n}\n```\n\n### The biggest ad buyers, ranked by number of ads\n\n```json\n{\n  \"mode\": \"advertisers\",\n  \"countries\": [\"US\"],\n  \"timeWindow\": \"last_7_days\",\n  \"sortBy\": \"ads\",\n  \"sortOrder\": \"desc\",\n  \"maxItems\": 500\n}\n```\n\n### Regional spending and top spenders in the UK\n\n```json\n{\n  \"mode\": \"regions\",\n  \"countries\": [\"GB\"],\n  \"timeWindow\": \"last_30_days\",\n  \"includeRegionSpenders\": true,\n  \"regionSpenderLimit\": 20\n}\n```\n\n### Compare two Pages over 90 days\n\n```json\n{\n  \"mode\": \"spendTracker\",\n  \"countries\": [\"US\"],\n  \"advertiserPageIds\": [\"203805062990264\", \"2011677365822396\"],\n  \"spendTrackerWindow\": \"last_90_days\"\n}\n```\n\n## Use cases\n\n- **Journalists and newsrooms** — daily political-spend leaderboards by market.\n- **Campaign and advocacy teams** — benchmark spend against allied and opposing Pages.\n- **Academic researchers** — build a country-by-country time series of political ad spending.\n- **Transparency analysts** — export advertiser, regional and keyword trends in a spreadsheet-ready format.\n- **Agencies** — track which advertisers dominate a region before planning a campaign.\n\n## FAQ\n\n### What ads does the report include?\n\nOnly ads about social issues, elections or politics that Meta has classified for the Ad Library Report. Ordinary commercial ads are not part of this report.\n\n### Do I need a Facebook login or developer account?\n\nNo. The actor reads Meta's public report for a logged-out visitor.\n\n### Do I need to configure a proxy?\n\nNo. The actor connects to the public report directly.\n\n### Why does a row show `≤100` instead of a number?\n\nMeta does not disclose amounts below a small floor. The actor keeps the published bucket in `amountSpentLabel` and marks it with `amountSpentIsFloor` rather than inventing a number.\n\n### Why did my European country return only `all_dates`?\n\nSome countries publish only the all-dates report. The actor then uses that window and adds `requestedTimeWindow` and `windowFallback` so the change is visible.\n\n### How fresh is the data?\n\nMeta publishes report dates with a lag. The actor defaults to the latest published date and accepts any of the seven most recent dates.\n\n### How many advertisers can I get?\n\nPagination follows Meta's full list up to `maxItems` per country per section. A single US day is about 2,800 advertisers; all dates can be tens of thousands, so raise `maxItems` when you need the complete history.\n\n### Are deleted Pages included?\n\nYes by default. Set `includeDeletedAdvertisers` to `false` to drop them; the flag is `isDeletedPage`.\n\n### Why is an advertiser or region missing from one window?\n\nMeta's report is a snapshot of the selected window and country. A Page that did not run political or issue ads in that window will not appear, and a region with no qualifying spend is omitted.\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "fb-ad-library-spend-report",
      "title": "Meta Political Ad Spend Report Exporter",
      "description": "Export Meta Ad Library Report totals, advertiser spending, regional spend and top search keywords for political and issue ads, without login.",
      "version": "1.0",
      "buildTag": "latest",
      "dockerfile": "./Dockerfile",
      "readme": "# Meta Political Ad Spend Report Exporter\n\nExport Meta's public **Ad Library Report** for ads about social issues, elections or politics — country spending totals, advertiser leaderboards, regional spend, top spenders per region and the week's most-searched keywords. The report covers Facebook and Instagram political and issue ads published since 2019, in every country where Meta publishes the report. No Facebook account, login or API key is needed.\n\n## What this actor does\n\n- **Six modes:** one full report with selectable sections, plus focused totals, advertiser, region, keyword and spend-tracker modes.\n- **Any published market:** 205 country codes, with automatic handling of markets where Meta only publishes the all-dates window.\n- **Five date windows:** last day, last 7, last 30, last 90 days or all dates since 2019, ending on any of Meta's seven most recent report dates.\n- **Advertiser controls:** server-side name filter, sort by amount spent, number of ads or Page name, and full cursor pagination.\n- **Regional depth:** state/region spend, plus the top spenders inside each region from Meta's own per-region report files.\n- **Clean rows:** every record carries the country, currency, date window, report date and a `recordType`; empty fields are omitted, so there are no null values to clean up.\n\n## Modes\n\n| Mode | What it returns |\n|---|---|\n| `report` | The sections selected in `sections` (all five by default). |\n| `totals` | Lifetime ad count and spend for each country, plus the selected window's regional spend total. |\n| `advertisers` | The spending leaderboard, with filter, sort and pagination. |\n| `regions` | Spending for every state/region, with optional top spenders. |\n| `keywords` | The week's top Ad Library search phrases in each country. |\n| `spendTracker` | A 30- or 90-day spend comparison for Page IDs you supply. |\n\n## Output per record\n\nEvery row starts with the same report context:\n\n- `recordType` — `countryTotals`, `advertiser`, `region`, `regionSpender`, `keyword` or `spendTracker`\n- `countryCode`, `countryName`, `currency`\n- `timeWindow`, `timeWindowTitle`\n- `reportDate` — the day the report data ends\n- `reportEndDate` — the report date published by Meta\n- `periodStartDate`, `periodEndDate` — the inclusive window (omitted for all dates)\n- `requestedTimeWindow`, `windowFallback` — present only when Meta could not publish the requested window\n- `sourceUrl`, `scrapedAt`\n\n### Country totals (`recordType: countryTotals`)\n\n- `totalAdsLifetime` — ads in the report since 2019\n- `totalSpendLifetime` — lifetime spend in the country's currency\n- `windowSpendTotal` — sum of regional spend for the selected window\n- `windowSpendIsLowerBound` — present when any region is in Meta's below-floor bucket\n- `regionCount`, `advertiserCount`\n\n### Advertisers (`recordType: advertiser`)\n\n- `rank` — position in the selected sort order\n- `pageName`, `pageId`, `pageUrl`, `pageIconUrl`\n- `adLibraryUrl` — the advertiser's ads in the Ad Library\n- `disclaimer` — the paid-for-by entity\n- `amountSpent`, `currency`, `numberOfAds`\n- `isDeletedPage` — the Page has been removed from Facebook\n- `spendDetails[]` — amount and currency pairs when Meta reports more than one\n\n### Region spend (`recordType: region`)\n\n- `rank`, `regionName`\n- `amountSpent` — numeric spend when Meta discloses an amount\n- `amountSpentLabel`, `amountSpentIsFloor` — `≤100` when the region is in Meta's floor bucket\n\n### Top spenders per region (`recordType: regionSpender`)\n\n- `regionName`, `rank`\n- `pageName`, `pageId`, `pageUrl`, `pageIconUrl`, `adLibraryUrl`, `disclaimer`\n- `amountSpent`, `amountSpentLabel`, `amountSpentIsFloor`, `currency`\n- `numberOfAds` when Meta provides it\n\n### Keywords (`recordType: keyword`)\n\n- `rank`, `keyword`, `searchUrl`\n\n### Spend tracker (`recordType: spendTracker`)\n\n- `pageName`, `pageId`, `pageUrl`, `pageIconUrl`, `adLibraryUrl`\n- `pageProfileUrl`, `pageLikes`, `verification`\n- `amountSpent` — spend in the chosen 30- or 90-day window\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | select | `report` | `report`, `totals`, `advertisers`, `regions`, `keywords` or `spendTracker` |\n| `countries` | multi-select | `[\"US\"]` | One or more of the 205 countries where Meta publishes the report |\n| `timeWindow` | select | `last_day` | `last_day`, `last_7_days`, `last_30_days`, `last_90_days` or `all_dates` |\n| `reportEndDate` | text | – | Optional `YYYY-MM-DD` end date among Meta's seven most recent report dates |\n| `sections` | multi-select | `[\"totals\", \"advertisers\", \"regions\", \"regionSpenders\", \"keywords\"]` | `totals`, `advertisers`, `regions`, `regionSpenders`, `keywords` (mode=`report`) |\n| `advertiserFilter` | text | – | Keep advertisers whose Page name or disclaimer contains this text |\n| `sortBy` | select | `spend` | `spend`, `ads` or `page_name` |\n| `sortOrder` | select | `desc` | `desc` or `asc` |\n| `maxItems` | integer | `5000` | Cap per country per section, 1–100000 |\n| `regionSpenderLimit` | integer | `10` | Top spenders returned per region, 1–50 |\n| `includeDeletedAdvertisers` | boolean | `true` | Keep deleted Pages and flag them |\n| `includeRegionSpenders` | boolean | `true` | In mode=`regions`, also return top spenders |\n| `advertiserPageIds` | string list | – | Page IDs or URLs for mode=`spendTracker` |\n| `spendTrackerWindow` | select | `last_90_days` | `last_30_days` or `last_90_days` |\n\n## Examples\n\n### Daily country totals for two markets\n\n```json\n{\n  \"mode\": \"report\",\n  \"countries\": [\"US\", \"GB\"],\n  \"timeWindow\": \"last_day\",\n  \"sections\": [\"totals\"]\n}\n```\n\n### The biggest ad buyers, ranked by number of ads\n\n```json\n{\n  \"mode\": \"advertisers\",\n  \"countries\": [\"US\"],\n  \"timeWindow\": \"last_7_days\",\n  \"sortBy\": \"ads\",\n  \"sortOrder\": \"desc\",\n  \"maxItems\": 500\n}\n```\n\n### Regional spending and top spenders in the UK\n\n```json\n{\n  \"mode\": \"regions\",\n  \"countries\": [\"GB\"],\n  \"timeWindow\": \"last_30_days\",\n  \"includeRegionSpenders\": true,\n  \"regionSpenderLimit\": 20\n}\n```\n\n### Compare two Pages over 90 days\n\n```json\n{\n  \"mode\": \"spendTracker\",\n  \"countries\": [\"US\"],\n  \"advertiserPageIds\": [\"203805062990264\", \"2011677365822396\"],\n  \"spendTrackerWindow\": \"last_90_days\"\n}\n```\n\n## Use cases\n\n- **Journalists and newsrooms** — daily political-spend leaderboards by market.\n- **Campaign and advocacy teams** — benchmark spend against allied and opposing Pages.\n- **Academic researchers** — build a country-by-country time series of political ad spending.\n- **Transparency analysts** — export advertiser, regional and keyword trends in a spreadsheet-ready format.\n- **Agencies** — track which advertisers dominate a region before planning a campaign.\n\n## FAQ\n\n### What ads does the report include?\n\nOnly ads about social issues, elections or politics that Meta has classified for the Ad Library Report. Ordinary commercial ads are not part of this report.\n\n### Do I need a Facebook login or developer account?\n\nNo. The actor reads Meta's public report for a logged-out visitor.\n\n### Do I need to configure a proxy?\n\nNo. The actor connects to the public report directly.\n\n### Why does a row show `≤100` instead of a number?\n\nMeta does not disclose amounts below a small floor. The actor keeps the published bucket in `amountSpentLabel` and marks it with `amountSpentIsFloor` rather than inventing a number.\n\n### Why did my European country return only `all_dates`?\n\nSome countries publish only the all-dates report. The actor then uses that window and adds `requestedTimeWindow` and `windowFallback` so the change is visible.\n\n### How fresh is the data?\n\nMeta publishes report dates with a lag. The actor defaults to the latest published date and accepts any of the seven most recent dates.\n\n### How many advertisers can I get?\n\nPagination follows Meta's full list up to `maxItems` per country per section. A single US day is about 2,800 advertisers; all dates can be tens of thousands, so raise `maxItems` when you need the complete history.\n\n### Are deleted Pages included?\n\nYes by default. Set `includeDeletedAdvertisers` to `false` to drop them; the flag is `isDeletedPage`.\n\n### Why is an advertiser or region missing from one window?\n\nMeta's report is a snapshot of the selected window and country. A Page that did not run political or issue ads in that window will not appear, and a region with no qualifying spend is omitted.\n",
      "input": {
        "title": "Meta Political Ad Spend Report Exporter Input",
        "description": "Choose one or more countries and a published date window to export Meta Ad Library Report totals, advertiser spending, regional spend, top spenders and weekly search keywords for political and issue ads.",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "mode": {
            "sectionCaption": "Report source and country",
            "title": "Mode",
            "type": "string",
            "description": "`report` returns the sections you select. `totals` returns only lifetime spend and ad totals, `advertisers` the spending leaderboard, `regions` spending by state/region with optional top spenders, `keywords` the week's top Ad Library searches, and `spendTracker` compares named advertisers over 30 or 90 days.",
            "editor": "select",
            "enum": [
              "report",
              "totals",
              "advertisers",
              "regions",
              "keywords",
              "spendTracker"
            ],
            "enumTitles": [
              "Full report (selected sections)",
              "Country totals",
              "Advertiser leaderboard",
              "Spending by region",
              "Top search keywords",
              "Advertiser spend tracker"
            ],
            "default": "report",
            "prefill": "report"
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "One or more countries Meta publishes the Ad Library Report for. Each country returns its own totals, advertisers, regions and keywords.",
            "editor": "select",
            "items": {
              "type": "string",
              "enum": [
                "AD",
                "AE",
                "AG",
                "AI",
                "AL",
                "AM",
                "AO",
                "AQ",
                "AR",
                "AT",
                "AU",
                "AZ",
                "BA",
                "BB",
                "BD",
                "BE",
                "BF",
                "BG",
                "BH",
                "BI",
                "BJ",
                "BM",
                "BN",
                "BO",
                "BR",
                "BS",
                "BT",
                "BV",
                "BW",
                "BY",
                "BZ",
                "CA",
                "CD",
                "CF",
                "CG",
                "CH",
                "CI",
                "CL",
                "CM",
                "CO",
                "CR",
                "CV",
                "CY",
                "CZ",
                "DE",
                "DJ",
                "DK",
                "DM",
                "DO",
                "DZ",
                "EC",
                "EE",
                "EG",
                "ER",
                "ES",
                "ET",
                "FI",
                "FJ",
                "FK",
                "FM",
                "FR",
                "GA",
                "GB",
                "GD",
                "GE",
                "GG",
                "GH",
                "GI",
                "GM",
                "GN",
                "GQ",
                "GR",
                "GS",
                "GT",
                "GW",
                "GY",
                "HN",
                "HR",
                "HT",
                "HU",
                "ID",
                "IE",
                "IL",
                "IM",
                "IN",
                "IO",
                "IQ",
                "IS",
                "IT",
                "JE",
                "JM",
                "JO",
                "JP",
                "KE",
                "KG",
                "KH",
                "KI",
                "KM",
                "KN",
                "KW",
                "KY",
                "KZ",
                "LA",
                "LB",
                "LC",
                "LI",
                "LK",
                "LR",
                "LS",
                "LT",
                "LU",
                "LV",
                "LY",
                "MA",
                "MC",
                "MD",
                "ME",
                "MG",
                "MH",
                "MK",
                "ML",
                "MM",
                "MN",
                "MR",
                "MS",
                "MT",
                "MU",
                "MV",
                "MW",
                "MX",
                "MY",
                "MZ",
                "NA",
                "NE",
                "NG",
                "NI",
                "NL",
                "NO",
                "NP",
                "NR",
                "NZ",
                "OM",
                "PA",
                "PE",
                "PG",
                "PH",
                "PK",
                "PL",
                "PN",
                "PS",
                "PT",
                "PW",
                "PY",
                "QA",
                "RO",
                "RS",
                "RW",
                "SA",
                "SB",
                "SC",
                "SE",
                "SG",
                "SH",
                "SI",
                "SK",
                "SL",
                "SM",
                "SN",
                "SO",
                "SR",
                "SS",
                "ST",
                "SV",
                "SZ",
                "TC",
                "TD",
                "TG",
                "TH",
                "TJ",
                "TL",
                "TM",
                "TN",
                "TO",
                "TR",
                "TT",
                "TV",
                "TW",
                "TZ",
                "UA",
                "UG",
                "US",
                "UY",
                "UZ",
                "VA",
                "VC",
                "VE",
                "VG",
                "VN",
                "VU",
                "WS",
                "XK",
                "YE",
                "ZA",
                "ZM",
                "ZW"
              ],
              "enumTitles": [
                "Andorra",
                "United Arab Emirates",
                "Antigua",
                "Anguilla",
                "Albania",
                "Armenia",
                "Angola",
                "Antarctica",
                "Argentina",
                "Austria",
                "Australia",
                "Azerbaijan",
                "Bosnia and Herzegovina",
                "Barbados",
                "Bangladesh",
                "Belgium",
                "Burkina Faso",
                "Bulgaria",
                "Bahrain",
                "Burundi",
                "Benin",
                "Bermuda",
                "Brunei",
                "Bolivia",
                "Brazil",
                "The Bahamas",
                "Bhutan",
                "Bouvet Island",
                "Botswana",
                "Belarus",
                "Belize",
                "Canada",
                "Democratic Republic of the Congo",
                "Central African Republic",
                "Republic of the Congo",
                "Switzerland",
                "Côte d'Ivoire",
                "Chile",
                "Cameroon",
                "Colombia",
                "Costa Rica",
                "Cape Verde",
                "Cyprus",
                "Czech Republic",
                "Germany",
                "Djibouti",
                "Denmark",
                "Dominica",
                "Dominican Republic",
                "Algeria",
                "Ecuador",
                "Estonia",
                "Egypt",
                "Eritrea",
                "Spain",
                "Ethiopia",
                "Finland",
                "Fiji",
                "Falkland Islands",
                "Federated States of Micronesia",
                "France",
                "Gabon",
                "United Kingdom",
                "Grenada",
                "Georgia",
                "Guernsey",
                "Ghana",
                "Gibraltar",
                "The Gambia",
                "Guinea",
                "Equatorial Guinea",
                "Greece",
                "South Georgia and the South Sandwich Islands",
                "Guatemala",
                "Guinea-Bissau",
                "Guyana",
                "Honduras",
                "Croatia",
                "Haiti",
                "Hungary",
                "Indonesia",
                "Ireland",
                "Israel",
                "Isle of Man",
                "India",
                "British Indian Ocean Territory",
                "Iraq",
                "Iceland",
                "Italy",
                "Jersey",
                "Jamaica",
                "Jordan",
                "Japan",
                "Kenya",
                "Kyrgyzstan",
                "Cambodia",
                "Kiribati",
                "Comoros",
                "Saint Kitts and Nevis",
                "Kuwait",
                "Cayman Islands",
                "Kazakhstan",
                "Laos",
                "Lebanon",
                "St. Lucia",
                "Liechtenstein",
                "Sri Lanka",
                "Liberia",
                "Lesotho",
                "Lithuania",
                "Luxembourg",
                "Latvia",
                "Libya",
                "Morocco",
                "Monaco",
                "Moldova",
                "Montenegro",
                "Madagascar",
                "Marshall Islands",
                "Macedonia",
                "Mali",
                "Myanmar (Burma)",
                "Mongolia",
                "Mauritania",
                "Montserrat",
                "Malta",
                "Mauritius",
                "Maldives",
                "Malawi",
                "Mexico",
                "Malaysia",
                "Mozambique",
                "Namibia",
                "Niger",
                "Nigeria",
                "Nicaragua",
                "Netherlands",
                "Norway",
                "Nepal",
                "Nauru",
                "New Zealand",
                "Oman",
                "Panama",
                "Peru",
                "Papua New Guinea",
                "Philippines",
                "Pakistan",
                "Poland",
                "Pitcairn",
                "Palestine",
                "Portugal",
                "Palau",
                "Paraguay",
                "Qatar",
                "Romania",
                "Serbia",
                "Rwanda",
                "Saudi Arabia",
                "Solomon Islands",
                "Seychelles",
                "Sweden",
                "Singapore",
                "Saint Helena",
                "Slovenia",
                "Slovakia",
                "Sierra Leone",
                "San Marino",
                "Senegal",
                "Somalia",
                "Suriname",
                "South Sudan",
                "São Tomé and Príncipe",
                "El Salvador",
                "Eswatini",
                "Turks and Caicos Islands",
                "Chad",
                "Togo",
                "Thailand",
                "Tajikistan",
                "Timor-Leste",
                "Turkmenistan",
                "Tunisia",
                "Tonga",
                "Türkiye",
                "Trinidad and Tobago",
                "Tuvalu",
                "Taiwan",
                "Tanzania",
                "Ukraine",
                "Uganda",
                "United States",
                "Uruguay",
                "Uzbekistan",
                "Vatican City",
                "Saint Vincent and the Grenadines",
                "Venezuela",
                "British Virgin Islands",
                "Vietnam",
                "Vanuatu",
                "Samoa",
                "Kosovo",
                "Yemen",
                "South Africa",
                "Zambia",
                "Zimbabwe"
              ]
            },
            "uniqueItems": true,
            "default": [
              "US"
            ],
            "prefill": [
              "US"
            ]
          },
          "timeWindow": {
            "title": "Date window",
            "type": "string",
            "description": "Reporting window ending on the latest published day. Some EU countries publish only `all_dates`; the actor then uses that longer window and marks the row with `windowFallback`.",
            "editor": "select",
            "enum": [
              "last_day",
              "last_7_days",
              "last_30_days",
              "last_90_days",
              "all_dates"
            ],
            "enumTitles": [
              "Last day",
              "Last 7 days",
              "Last 30 days",
              "Last 90 days",
              "All dates (since 2019)"
            ],
            "default": "last_day",
            "prefill": "last_day"
          },
          "reportEndDate": {
            "title": "Report end date",
            "type": "string",
            "description": "Optional `YYYY-MM-DD` end date. Meta keeps only the seven most recent report dates; leave blank for the latest published date.",
            "editor": "textfield",
            "default": "",
            "prefill": ""
          },
          "sections": {
            "sectionCaption": "Sections and filtering",
            "title": "Sections (mode=report)",
            "type": "array",
            "description": "Which report sections to return. Ignored by the focused modes, except that `regions` can add top spenders through `includeRegionSpenders`.",
            "editor": "select",
            "items": {
              "type": "string",
              "enum": [
                "totals",
                "advertisers",
                "regions",
                "regionSpenders",
                "keywords"
              ],
              "enumTitles": [
                "Country totals",
                "Advertisers",
                "Spending by region",
                "Top spenders per region",
                "Top search keywords"
              ]
            },
            "uniqueItems": true,
            "default": [
              "totals",
              "advertisers",
              "regions",
              "regionSpenders",
              "keywords"
            ],
            "prefill": [
              "totals"
            ]
          },
          "advertiserFilter": {
            "title": "Advertiser name filter",
            "type": "string",
            "description": "Only return advertisers whose Page name or disclaimer contains this text. Applies to advertiser and region-spender rows; leave blank for all advertisers.",
            "editor": "textfield",
            "default": "",
            "prefill": ""
          },
          "sortBy": {
            "title": "Sort advertisers by",
            "type": "string",
            "description": "Order of the advertiser leaderboard. `spend` uses Meta's amount spent, `ads` its number of ads in the Library.",
            "editor": "select",
            "enum": [
              "spend",
              "ads",
              "page_name"
            ],
            "enumTitles": [
              "Amount spent",
              "Number of ads",
              "Page name"
            ],
            "default": "spend",
            "prefill": "spend"
          },
          "sortOrder": {
            "title": "Sort direction",
            "type": "string",
            "description": "Descending puts the biggest spenders first; ascending reverses the order.",
            "editor": "select",
            "enum": [
              "desc",
              "asc"
            ],
            "enumTitles": [
              "Descending",
              "Ascending"
            ],
            "default": "desc",
            "prefill": "desc"
          },
          "maxItems": {
            "sectionCaption": "Limits and optional enrichment",
            "title": "Max rows per country per section",
            "type": "integer",
            "description": "Hard cap for each section in each country. Meta publishes about 2,800 US advertisers for a single day and tens of thousands for all dates, so pagination stops at this cap.",
            "minimum": 1,
            "maximum": 100000,
            "default": 5000,
            "prefill": 1
          },
          "regionSpenderLimit": {
            "title": "Top spenders per region",
            "type": "integer",
            "description": "How many of each region's highest-spending advertisers to return when the `regionSpenders` section is enabled.",
            "minimum": 1,
            "maximum": 50,
            "default": 10,
            "prefill": 10
          },
          "includeDeletedAdvertisers": {
            "title": "Include deleted Pages",
            "type": "boolean",
            "description": "Keep advertisers whose Facebook Page has been deleted. The `isDeletedPage` field marks them.",
            "default": true,
            "prefill": true
          },
          "includeRegionSpenders": {
            "title": "Include top spenders per region (mode=regions)",
            "type": "boolean",
            "description": "When mode is `regions`, also return the highest-spending advertisers in each region.",
            "default": true,
            "prefill": true
          },
          "advertiserPageIds": {
            "sectionCaption": "Spend tracker mode",
            "title": "Advertiser Page IDs (mode=spendTracker)",
            "type": "array",
            "description": "Page IDs, Page URLs or Ad Library URLs to compare. Each row returns the advertiser's spend for the selected tracker window.",
            "editor": "stringList",
            "default": [],
            "prefill": []
          },
          "spendTrackerWindow": {
            "title": "Spend tracker window (mode=spendTracker)",
            "type": "string",
            "description": "Comparison window used by the report's spending tracker.",
            "editor": "select",
            "enum": [
              "last_30_days",
              "last_90_days"
            ],
            "enumTitles": [
              "Last 30 days",
              "Last 90 days"
            ],
            "default": "last_90_days",
            "prefill": "last_90_days"
          }
        },
        "required": []
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "Meta Political Ad Spend Report Exporter Output",
        "description": "Dataset of Meta Ad Library Report rows: country lifetime totals, advertiser spend leaderboards, regional spending, top spenders per region, weekly search keywords and spend-tracker comparisons.",
        "properties": {
          "reportRows": {
            "type": "string",
            "title": "Ad Library report rows",
            "description": "Dataset containing all exported Meta Ad Library Report records.",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "storages": {
        "dataset": {
          "actorSpecification": 1,
          "views": {
            "report": {
              "title": "Ad spend report",
              "transformation": {
                "fields": [
                  "recordType",
                  "countryCode",
                  "pageName",
                  "regionName",
                  "amountSpent",
                  "currency",
                  "numberOfAds",
                  "reportDate"
                ]
              },
              "display": {
                "component": "table",
                "properties": {}
              }
            }
          }
        }
      },
      "environmentVariables": {}
    },
    "buildNumber": "1.0.5",
    "imageDigest": "95d9435ab20182b3d8dd301f30666538e44dc67150177def1711ec38fb995563",
    "actVersion": {
      "sourceType": "SOURCE_FILES",
      "buildTag": "latest",
      "versionNumber": "1.0"
    },
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0.00522
    }
  }
}