{
  "data": {
    "id": "WuTbehzZYnu3x7Fwe",
    "actId": "6Dh4fWQXIee4jhMOE",
    "userId": "NL4ThgItAwaoBlffQ",
    "startedAt": "2026-10-17T06:18:56.022Z",
    "finishedAt": "2026-10-17T06:21:35.268Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CLI"
    },
    "stats": {
      "durationMillis": 159166,
      "runTimeSecs": 159.166,
      "computeUnits": 0.1768511111111111,
      "imageSizeBytes": 5842876928
    },
    "options": {
      "useCache": true,
      "betaPackages": false,
      "memoryMbytes": 4096,
      "diskMbytes": 8192
    },
    "createdByOrganizationMemberUserId": "zifX0mkAFMHe8CatY",
    "exitCode": 0,
    "inputSchema": "{\n  \"title\": \"Facebook Ad Transparency Extractor Input\",\n  \"description\": \"Search the Facebook Ad Library by keyword, advertiser Page, Ad Library ID, or \\\"Paid for by\\\" name. Returns ad creative, media, run dates, platforms, political spend/impressions and EU transparency reach. No login, cookies or Meta API token required.\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"mode\": {\n      \"title\": \"Mode\",\n      \"type\": \"string\",\n      \"description\": \"What to scrape. Leave empty to process every target list you filled in (searchTerms, pageIds, adIds, bylines) in one run.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"\",\n        \"search\",\n        \"byPage\",\n        \"byAdId\",\n        \"byByline\"\n      ],\n      \"enumTitles\": [\n        \"All provided targets (default)\",\n        \"Search by keyword\",\n        \"All ads from advertiser Pages\",\n        \"Lookup specific ads by Ad Library ID\",\n        \"Search by \\\"Paid for by\\\" name\"\n      ],\n      \"default\": \"\",\n      \"prefill\": \"search\"\n    },\n    \"searchTerms\": {\n      \"title\": \"Search Terms\",\n      \"type\": \"array\",\n      \"description\": \"Keywords to search for in the Ad Library, one search per term. Example: [\\\"coffee\\\", \\\"nike\\\"].\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"prefill\": [\n        \"coffee\"\n      ]\n    },\n    \"pageIds\": {\n      \"title\": \"Page IDs / Advertiser Search\",\n      \"type\": \"array\",\n      \"description\": \"Facebook Page IDs to fetch all ads from (numeric IDs, or URLs containing view_all_page_id= or profile.php?id=). Each page is searched separately.\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      }\n    },\n    \"adIds\": {\n      \"title\": \"Direct Ad IDs\",\n      \"type\": \"array\",\n      \"description\": \"Ad Library IDs to fetch directly (numeric IDs or Ads Library URLs containing ?id=). All other filters are ignored in this mode.\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      }\n    },\n    \"bylines\": {\n      \"title\": \"Search by \\\"Paid for by\\\" name\",\n      \"type\": \"array\",\n      \"description\": \"Funding-entity / committee names from the \\\"Paid for by\\\" disclaimer on political and issue ads. Matching is exact (case-insensitive fallback): use the name as it appears in the ad. Byline targets always search the political & issue archive, since the Ad Library ignores this filter elsewhere.\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      }\n    },\n    \"country\": {\n      \"title\": \"Country\",\n      \"type\": \"string\",\n      \"description\": \"Country to search ads in, or ALL for every country. Ignored when the Countries multi-select below is set.\",\n      \"editor\": \"select\",\n      \"default\": \"ALL\",\n      \"enum\": [\n        \"ALL\",\n        \"AF\",\n        \"AL\",\n        \"DZ\",\n        \"AS\",\n        \"AD\",\n        \"AO\",\n        \"AI\",\n        \"AQ\",\n        \"AG\",\n        \"AR\",\n        \"AM\",\n        \"AW\",\n        \"AU\",\n        \"AT\",\n        \"AZ\",\n        \"BS\",\n        \"BH\",\n        \"BD\",\n        \"BB\",\n        \"BY\",\n        \"BE\",\n        \"BZ\",\n        \"BJ\",\n        \"BM\",\n        \"BT\",\n        \"BO\",\n        \"BA\",\n        \"BW\",\n        \"BR\",\n        \"BN\",\n        \"BG\",\n        \"BF\",\n        \"BI\",\n        \"KH\",\n        \"CM\",\n        \"CA\",\n        \"CV\",\n        \"KY\",\n        \"CF\",\n        \"TD\",\n        \"CL\",\n        \"CN\",\n        \"CO\",\n        \"KM\",\n        \"CG\",\n        \"CD\",\n        \"CR\",\n        \"HR\",\n        \"CU\",\n        \"CY\",\n        \"CZ\",\n        \"DK\",\n        \"DJ\",\n        \"DM\",\n        \"DO\",\n        \"EC\",\n        \"EG\",\n        \"SV\",\n        \"GQ\",\n        \"ER\",\n        \"EE\",\n        \"SZ\",\n        \"ET\",\n        \"FJ\",\n        \"FI\",\n        \"FR\",\n        \"GF\",\n        \"PF\",\n        \"GA\",\n        \"GM\",\n        \"GE\",\n        \"DE\",\n        \"GH\",\n        \"GI\",\n        \"GR\",\n        \"GL\",\n        \"GD\",\n        \"GP\",\n        \"GU\",\n        \"GT\",\n        \"GN\",\n        \"GW\",\n        \"GY\",\n        \"HT\",\n        \"HN\",\n        \"HK\",\n        \"HU\",\n        \"IS\",\n        \"IN\",\n        \"ID\",\n        \"IR\",\n        \"IQ\",\n        \"IE\",\n        \"IL\",\n        \"IT\",\n        \"JM\",\n        \"JP\",\n        \"JO\",\n        \"KZ\",\n        \"KE\",\n        \"KI\",\n        \"KW\",\n        \"KG\",\n        \"LA\",\n        \"LV\",\n        \"LB\",\n        \"LS\",\n        \"LR\",\n        \"LY\",\n        \"LI\",\n        \"LT\",\n        \"LU\",\n        \"MO\",\n        \"MG\",\n        \"MW\",\n        \"MY\",\n        \"MV\",\n        \"ML\",\n        \"MT\",\n        \"MH\",\n        \"MQ\",\n        \"MR\",\n        \"MU\",\n        \"MX\",\n        \"FM\",\n        \"MD\",\n        \"MC\",\n        \"MN\",\n        \"ME\",\n        \"MS\",\n        \"MA\",\n        \"MZ\",\n        \"MM\",\n        \"NA\",\n        \"NR\",\n        \"NP\",\n        \"NL\",\n        \"NC\",\n        \"NZ\",\n        \"NI\",\n        \"NE\",\n        \"NG\",\n        \"NU\",\n        \"MK\",\n        \"NO\",\n        \"OM\",\n        \"PK\",\n        \"PW\",\n        \"PS\",\n        \"PA\",\n        \"PG\",\n        \"PY\",\n        \"PE\",\n        \"PH\",\n        \"PL\",\n        \"PT\",\n        \"PR\",\n        \"QA\",\n        \"RO\",\n        \"RU\",\n        \"RW\",\n        \"WS\",\n        \"SM\",\n        \"ST\",\n        \"SA\",\n        \"SN\",\n        \"RS\",\n        \"SC\",\n        \"SL\",\n        \"SG\",\n        \"SK\",\n        \"SI\",\n        \"SB\",\n        \"SO\",\n        \"ZA\",\n        \"KR\",\n        \"SS\",\n        \"ES\",\n        \"LK\",\n        \"KN\",\n        \"LC\",\n        \"VC\",\n        \"SD\",\n        \"SR\",\n        \"SE\",\n        \"CH\",\n        \"SY\",\n        \"TW\",\n        \"TJ\",\n        \"TZ\",\n        \"TH\",\n        \"TL\",\n        \"TG\",\n        \"TO\",\n        \"TT\",\n        \"TN\",\n        \"TR\",\n        \"TM\",\n        \"TC\",\n        \"TV\",\n        \"UG\",\n        \"UA\",\n        \"AE\",\n        \"GB\",\n        \"US\",\n        \"UY\",\n        \"UZ\",\n        \"VU\",\n        \"VA\",\n        \"VE\",\n        \"VN\",\n        \"VG\",\n        \"VI\",\n        \"YE\",\n        \"ZM\",\n        \"ZW\"\n      ],\n      \"enumTitles\": [\n        \"All Countries\",\n        \"Afghanistan\",\n        \"Albania\",\n        \"Algeria\",\n        \"American Samoa\",\n        \"Andorra\",\n        \"Angola\",\n        \"Anguilla\",\n        \"Antarctica\",\n        \"Antigua and Barbuda\",\n        \"Argentina\",\n        \"Armenia\",\n        \"Aruba\",\n        \"Australia\",\n        \"Austria\",\n        \"Azerbaijan\",\n        \"Bahamas\",\n        \"Bahrain\",\n        \"Bangladesh\",\n        \"Barbados\",\n        \"Belarus\",\n        \"Belgium\",\n        \"Belize\",\n        \"Benin\",\n        \"Bermuda\",\n        \"Bhutan\",\n        \"Bolivia\",\n        \"Bosnia and Herzegovina\",\n        \"Botswana\",\n        \"Brazil\",\n        \"Brunei\",\n        \"Bulgaria\",\n        \"Burkina Faso\",\n        \"Burundi\",\n        \"Cambodia\",\n        \"Cameroon\",\n        \"Canada\",\n        \"Cape Verde\",\n        \"Cayman Islands\",\n        \"Central African Republic\",\n        \"Chad\",\n        \"Chile\",\n        \"China\",\n        \"Colombia\",\n        \"Comoros\",\n        \"Congo\",\n        \"Congo (DRC)\",\n        \"Costa Rica\",\n        \"Croatia\",\n        \"Cuba\",\n        \"Cyprus\",\n        \"Czechia\",\n        \"Denmark\",\n        \"Djibouti\",\n        \"Dominica\",\n        \"Dominican Republic\",\n        \"Ecuador\",\n        \"Egypt\",\n        \"El Salvador\",\n        \"Equatorial Guinea\",\n        \"Eritrea\",\n        \"Estonia\",\n        \"Eswatini\",\n        \"Ethiopia\",\n        \"Fiji\",\n        \"Finland\",\n        \"France\",\n        \"French Guiana\",\n        \"French Polynesia\",\n        \"Gabon\",\n        \"Gambia\",\n        \"Georgia\",\n        \"Germany\",\n        \"Ghana\",\n        \"Gibraltar\",\n        \"Greece\",\n        \"Greenland\",\n        \"Grenada\",\n        \"Guadeloupe\",\n        \"Guam\",\n        \"Guatemala\",\n        \"Guinea\",\n        \"Guinea-Bissau\",\n        \"Guyana\",\n        \"Haiti\",\n        \"Honduras\",\n        \"Hong Kong\",\n        \"Hungary\",\n        \"Iceland\",\n        \"India\",\n        \"Indonesia\",\n        \"Iran\",\n        \"Iraq\",\n        \"Ireland\",\n        \"Israel\",\n        \"Italy\",\n        \"Jamaica\",\n        \"Japan\",\n        \"Jordan\",\n        \"Kazakhstan\",\n        \"Kenya\",\n        \"Kiribati\",\n        \"Kuwait\",\n        \"Kyrgyzstan\",\n        \"Laos\",\n        \"Latvia\",\n        \"Lebanon\",\n        \"Lesotho\",\n        \"Liberia\",\n        \"Libya\",\n        \"Liechtenstein\",\n        \"Lithuania\",\n        \"Luxembourg\",\n        \"Macau\",\n        \"Madagascar\",\n        \"Malawi\",\n        \"Malaysia\",\n        \"Maldives\",\n        \"Mali\",\n        \"Malta\",\n        \"Marshall Islands\",\n        \"Martinique\",\n        \"Mauritania\",\n        \"Mauritius\",\n        \"Mexico\",\n        \"Micronesia\",\n        \"Moldova\",\n        \"Monaco\",\n        \"Mongolia\",\n        \"Montenegro\",\n        \"Montserrat\",\n        \"Morocco\",\n        \"Mozambique\",\n        \"Myanmar\",\n        \"Namibia\",\n        \"Nauru\",\n        \"Nepal\",\n        \"Netherlands\",\n        \"New Caledonia\",\n        \"New Zealand\",\n        \"Nicaragua\",\n        \"Niger\",\n        \"Nigeria\",\n        \"Niue\",\n        \"North Macedonia\",\n        \"Norway\",\n        \"Oman\",\n        \"Pakistan\",\n        \"Palau\",\n        \"Palestine\",\n        \"Panama\",\n        \"Papua New Guinea\",\n        \"Paraguay\",\n        \"Peru\",\n        \"Philippines\",\n        \"Poland\",\n        \"Portugal\",\n        \"Puerto Rico\",\n        \"Qatar\",\n        \"Romania\",\n        \"Russia\",\n        \"Rwanda\",\n        \"Samoa\",\n        \"San Marino\",\n        \"Sao Tome and Principe\",\n        \"Saudi Arabia\",\n        \"Senegal\",\n        \"Serbia\",\n        \"Seychelles\",\n        \"Sierra Leone\",\n        \"Singapore\",\n        \"Slovakia\",\n        \"Slovenia\",\n        \"Solomon Islands\",\n        \"Somalia\",\n        \"South Africa\",\n        \"South Korea\",\n        \"South Sudan\",\n        \"Spain\",\n        \"Sri Lanka\",\n        \"St. Kitts and Nevis\",\n        \"St. Lucia\",\n        \"St. Vincent and the Grenadines\",\n        \"Sudan\",\n        \"Suriname\",\n        \"Sweden\",\n        \"Switzerland\",\n        \"Syria\",\n        \"Taiwan\",\n        \"Tajikistan\",\n        \"Tanzania\",\n        \"Thailand\",\n        \"Timor-Leste\",\n        \"Togo\",\n        \"Tonga\",\n        \"Trinidad and Tobago\",\n        \"Tunisia\",\n        \"Turkiye\",\n        \"Turkmenistan\",\n        \"Turks and Caicos Islands\",\n        \"Tuvalu\",\n        \"Uganda\",\n        \"Ukraine\",\n        \"United Arab Emirates\",\n        \"United Kingdom\",\n        \"United States\",\n        \"Uruguay\",\n        \"Uzbekistan\",\n        \"Vanuatu\",\n        \"Vatican City\",\n        \"Venezuela\",\n        \"Vietnam\",\n        \"British Virgin Islands\",\n        \"U.S. Virgin Islands\",\n        \"Yemen\",\n        \"Zambia\",\n        \"Zimbabwe\"\n      ]\n    },\n    \"countries\": {\n      \"title\": \"Countries (multi-select)\",\n      \"type\": \"array\",\n      \"description\": \"One or more country codes, searched together as a union (unlike the single Country field). Takes precedence over Country when set.\",\n      \"editor\": \"select\",\n      \"uniqueItems\": true,\n      \"items\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"ALL\",\n          \"AF\",\n          \"AL\",\n          \"DZ\",\n          \"AS\",\n          \"AD\",\n          \"AO\",\n          \"AI\",\n          \"AQ\",\n          \"AG\",\n          \"AR\",\n          \"AM\",\n          \"AW\",\n          \"AU\",\n          \"AT\",\n          \"AZ\",\n          \"BS\",\n          \"BH\",\n          \"BD\",\n          \"BB\",\n          \"BY\",\n          \"BE\",\n          \"BZ\",\n          \"BJ\",\n          \"BM\",\n          \"BT\",\n          \"BO\",\n          \"BA\",\n          \"BW\",\n          \"BR\",\n          \"BN\",\n          \"BG\",\n          \"BF\",\n          \"BI\",\n          \"KH\",\n          \"CM\",\n          \"CA\",\n          \"CV\",\n          \"KY\",\n          \"CF\",\n          \"TD\",\n          \"CL\",\n          \"CN\",\n          \"CO\",\n          \"KM\",\n          \"CG\",\n          \"CD\",\n          \"CR\",\n          \"HR\",\n          \"CU\",\n          \"CY\",\n          \"CZ\",\n          \"DK\",\n          \"DJ\",\n          \"DM\",\n          \"DO\",\n          \"EC\",\n          \"EG\",\n          \"SV\",\n          \"GQ\",\n          \"ER\",\n          \"EE\",\n          \"SZ\",\n          \"ET\",\n          \"FJ\",\n          \"FI\",\n          \"FR\",\n          \"GF\",\n          \"PF\",\n          \"GA\",\n          \"GM\",\n          \"GE\",\n          \"DE\",\n          \"GH\",\n          \"GI\",\n          \"GR\",\n          \"GL\",\n          \"GD\",\n          \"GP\",\n          \"GU\",\n          \"GT\",\n          \"GN\",\n          \"GW\",\n          \"GY\",\n          \"HT\",\n          \"HN\",\n          \"HK\",\n          \"HU\",\n          \"IS\",\n          \"IN\",\n          \"ID\",\n          \"IR\",\n          \"IQ\",\n          \"IE\",\n          \"IL\",\n          \"IT\",\n          \"JM\",\n          \"JP\",\n          \"JO\",\n          \"KZ\",\n          \"KE\",\n          \"KI\",\n          \"KW\",\n          \"KG\",\n          \"LA\",\n          \"LV\",\n          \"LB\",\n          \"LS\",\n          \"LR\",\n          \"LY\",\n          \"LI\",\n          \"LT\",\n          \"LU\",\n          \"MO\",\n          \"MG\",\n          \"MW\",\n          \"MY\",\n          \"MV\",\n          \"ML\",\n          \"MT\",\n          \"MH\",\n          \"MQ\",\n          \"MR\",\n          \"MU\",\n          \"MX\",\n          \"FM\",\n          \"MD\",\n          \"MC\",\n          \"MN\",\n          \"ME\",\n          \"MS\",\n          \"MA\",\n          \"MZ\",\n          \"MM\",\n          \"NA\",\n          \"NR\",\n          \"NP\",\n          \"NL\",\n          \"NC\",\n          \"NZ\",\n          \"NI\",\n          \"NE\",\n          \"NG\",\n          \"NU\",\n          \"MK\",\n          \"NO\",\n          \"OM\",\n          \"PK\",\n          \"PW\",\n          \"PS\",\n          \"PA\",\n          \"PG\",\n          \"PY\",\n          \"PE\",\n          \"PH\",\n          \"PL\",\n          \"PT\",\n          \"PR\",\n          \"QA\",\n          \"RO\",\n          \"RU\",\n          \"RW\",\n          \"WS\",\n          \"SM\",\n          \"ST\",\n          \"SA\",\n          \"SN\",\n          \"RS\",\n          \"SC\",\n          \"SL\",\n          \"SG\",\n          \"SK\",\n          \"SI\",\n          \"SB\",\n          \"SO\",\n          \"ZA\",\n          \"KR\",\n          \"SS\",\n          \"ES\",\n          \"LK\",\n          \"KN\",\n          \"LC\",\n          \"VC\",\n          \"SD\",\n          \"SR\",\n          \"SE\",\n          \"CH\",\n          \"SY\",\n          \"TW\",\n          \"TJ\",\n          \"TZ\",\n          \"TH\",\n          \"TL\",\n          \"TG\",\n          \"TO\",\n          \"TT\",\n          \"TN\",\n          \"TR\",\n          \"TM\",\n          \"TC\",\n          \"TV\",\n          \"UG\",\n          \"UA\",\n          \"AE\",\n          \"GB\",\n          \"US\",\n          \"UY\",\n          \"UZ\",\n          \"VU\",\n          \"VA\",\n          \"VE\",\n          \"VN\",\n          \"VG\",\n          \"VI\",\n          \"YE\",\n          \"ZM\",\n          \"ZW\"\n        ],\n        \"enumTitles\": [\n          \"All Countries\",\n          \"Afghanistan\",\n          \"Albania\",\n          \"Algeria\",\n          \"American Samoa\",\n          \"Andorra\",\n          \"Angola\",\n          \"Anguilla\",\n          \"Antarctica\",\n          \"Antigua and Barbuda\",\n          \"Argentina\",\n          \"Armenia\",\n          \"Aruba\",\n          \"Australia\",\n          \"Austria\",\n          \"Azerbaijan\",\n          \"Bahamas\",\n          \"Bahrain\",\n          \"Bangladesh\",\n          \"Barbados\",\n          \"Belarus\",\n          \"Belgium\",\n          \"Belize\",\n          \"Benin\",\n          \"Bermuda\",\n          \"Bhutan\",\n          \"Bolivia\",\n          \"Bosnia and Herzegovina\",\n          \"Botswana\",\n          \"Brazil\",\n          \"Brunei\",\n          \"Bulgaria\",\n          \"Burkina Faso\",\n          \"Burundi\",\n          \"Cambodia\",\n          \"Cameroon\",\n          \"Canada\",\n          \"Cape Verde\",\n          \"Cayman Islands\",\n          \"Central African Republic\",\n          \"Chad\",\n          \"Chile\",\n          \"China\",\n          \"Colombia\",\n          \"Comoros\",\n          \"Congo\",\n          \"Congo (DRC)\",\n          \"Costa Rica\",\n          \"Croatia\",\n          \"Cuba\",\n          \"Cyprus\",\n          \"Czechia\",\n          \"Denmark\",\n          \"Djibouti\",\n          \"Dominica\",\n          \"Dominican Republic\",\n          \"Ecuador\",\n          \"Egypt\",\n          \"El Salvador\",\n          \"Equatorial Guinea\",\n          \"Eritrea\",\n          \"Estonia\",\n          \"Eswatini\",\n          \"Ethiopia\",\n          \"Fiji\",\n          \"Finland\",\n          \"France\",\n          \"French Guiana\",\n          \"French Polynesia\",\n          \"Gabon\",\n          \"Gambia\",\n          \"Georgia\",\n          \"Germany\",\n          \"Ghana\",\n          \"Gibraltar\",\n          \"Greece\",\n          \"Greenland\",\n          \"Grenada\",\n          \"Guadeloupe\",\n          \"Guam\",\n          \"Guatemala\",\n          \"Guinea\",\n          \"Guinea-Bissau\",\n          \"Guyana\",\n          \"Haiti\",\n          \"Honduras\",\n          \"Hong Kong\",\n          \"Hungary\",\n          \"Iceland\",\n          \"India\",\n          \"Indonesia\",\n          \"Iran\",\n          \"Iraq\",\n          \"Ireland\",\n          \"Israel\",\n          \"Italy\",\n          \"Jamaica\",\n          \"Japan\",\n          \"Jordan\",\n          \"Kazakhstan\",\n          \"Kenya\",\n          \"Kiribati\",\n          \"Kuwait\",\n          \"Kyrgyzstan\",\n          \"Laos\",\n          \"Latvia\",\n          \"Lebanon\",\n          \"Lesotho\",\n          \"Liberia\",\n          \"Libya\",\n          \"Liechtenstein\",\n          \"Lithuania\",\n          \"Luxembourg\",\n          \"Macau\",\n          \"Madagascar\",\n          \"Malawi\",\n          \"Malaysia\",\n          \"Maldives\",\n          \"Mali\",\n          \"Malta\",\n          \"Marshall Islands\",\n          \"Martinique\",\n          \"Mauritania\",\n          \"Mauritius\",\n          \"Mexico\",\n          \"Micronesia\",\n          \"Moldova\",\n          \"Monaco\",\n          \"Mongolia\",\n          \"Montenegro\",\n          \"Montserrat\",\n          \"Morocco\",\n          \"Mozambique\",\n          \"Myanmar\",\n          \"Namibia\",\n          \"Nauru\",\n          \"Nepal\",\n          \"Netherlands\",\n          \"New Caledonia\",\n          \"New Zealand\",\n          \"Nicaragua\",\n          \"Niger\",\n          \"Nigeria\",\n          \"Niue\",\n          \"North Macedonia\",\n          \"Norway\",\n          \"Oman\",\n          \"Pakistan\",\n          \"Palau\",\n          \"Palestine\",\n          \"Panama\",\n          \"Papua New Guinea\",\n          \"Paraguay\",\n          \"Peru\",\n          \"Philippines\",\n          \"Poland\",\n          \"Portugal\",\n          \"Puerto Rico\",\n          \"Qatar\",\n          \"Romania\",\n          \"Russia\",\n          \"Rwanda\",\n          \"Samoa\",\n          \"San Marino\",\n          \"Sao Tome and Principe\",\n          \"Saudi Arabia\",\n          \"Senegal\",\n          \"Serbia\",\n          \"Seychelles\",\n          \"Sierra Leone\",\n          \"Singapore\",\n          \"Slovakia\",\n          \"Slovenia\",\n          \"Solomon Islands\",\n          \"Somalia\",\n          \"South Africa\",\n          \"South Korea\",\n          \"South Sudan\",\n          \"Spain\",\n          \"Sri Lanka\",\n          \"St. Kitts and Nevis\",\n          \"St. Lucia\",\n          \"St. Vincent and the Grenadines\",\n          \"Sudan\",\n          \"Suriname\",\n          \"Sweden\",\n          \"Switzerland\",\n          \"Syria\",\n          \"Taiwan\",\n          \"Tajikistan\",\n          \"Tanzania\",\n          \"Thailand\",\n          \"Timor-Leste\",\n          \"Togo\",\n          \"Tonga\",\n          \"Trinidad and Tobago\",\n          \"Tunisia\",\n          \"Turkiye\",\n          \"Turkmenistan\",\n          \"Turks and Caicos Islands\",\n          \"Tuvalu\",\n          \"Uganda\",\n          \"Ukraine\",\n          \"United Arab Emirates\",\n          \"United Kingdom\",\n          \"United States\",\n          \"Uruguay\",\n          \"Uzbekistan\",\n          \"Vanuatu\",\n          \"Vatican City\",\n          \"Venezuela\",\n          \"Vietnam\",\n          \"British Virgin Islands\",\n          \"U.S. Virgin Islands\",\n          \"Yemen\",\n          \"Zambia\",\n          \"Zimbabwe\"\n        ]\n      }\n    },\n    \"adActiveStatus\": {\n      \"title\": \"Ad Status\",\n      \"type\": \"string\",\n      \"description\": \"Filter by ad active status.\",\n      \"default\": \"active\",\n      \"prefill\": \"active\",\n      \"enum\": [\n        \"all\",\n        \"active\",\n        \"inactive\"\n      ],\n      \"enumTitles\": [\n        \"All Ads\",\n        \"Active Only\",\n        \"Inactive Only\"\n      ],\n      \"editor\": \"select\"\n    },\n    \"adType\": {\n      \"title\": \"Ad Type\",\n      \"type\": \"string\",\n      \"description\": \"Filter by ad category. Note: the political-and-issue archive excludes EU/EEA countries, so EU political searches automatically use All Types (EU transparency stream).\",\n      \"default\": \"all\",\n      \"prefill\": \"all\",\n      \"enum\": [\n        \"all\",\n        \"political_and_issue_ads\",\n        \"housing\",\n        \"employment\",\n        \"credit\"\n      ],\n      \"enumTitles\": [\n        \"All Types\",\n        \"Political & Issue Ads\",\n        \"Housing\",\n        \"Employment\",\n        \"Credit\"\n      ],\n      \"editor\": \"select\"\n    },\n    \"mediaType\": {\n      \"title\": \"Media Type\",\n      \"type\": \"string\",\n      \"description\": \"Filter by the ad's creative media type.\",\n      \"default\": \"all\",\n      \"prefill\": \"all\",\n      \"enum\": [\n        \"all\",\n        \"image\",\n        \"video\",\n        \"meme\",\n        \"none\"\n      ],\n      \"enumTitles\": [\n        \"All Media\",\n        \"Image\",\n        \"Video\",\n        \"Meme\",\n        \"No Media\"\n      ],\n      \"editor\": \"select\"\n    },\n    \"publisherPlatforms\": {\n      \"title\": \"Publisher Platforms\",\n      \"type\": \"array\",\n      \"description\": \"Only return ads shown on these platforms. Leave empty for all platforms.\",\n      \"editor\": \"select\",\n      \"uniqueItems\": true,\n      \"items\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"FACEBOOK\",\n          \"INSTAGRAM\",\n          \"MESSENGER\",\n          \"AUDIENCE_NETWORK\",\n          \"WHATSAPP\",\n          \"THREADS\"\n        ],\n        \"enumTitles\": [\n          \"Facebook\",\n          \"Instagram\",\n          \"Messenger\",\n          \"Audience Network\",\n          \"WhatsApp\",\n          \"Threads\"\n        ]\n      }\n    },\n    \"contentLanguages\": {\n      \"title\": \"Ad Content Languages\",\n      \"type\": \"array\",\n      \"description\": \"2-letter ISO language codes (e.g. en, de, es) to restrict ads by creative language.\",\n      \"editor\": \"stringList\",\n      \"items\": {\n        \"type\": \"string\"\n      }\n    },\n    \"searchType\": {\n      \"title\": \"Keyword Match\",\n      \"type\": \"string\",\n      \"description\": \"How keyword search terms are matched (mode=search only).\",\n      \"default\": \"keyword_unordered\",\n      \"prefill\": \"keyword_unordered\",\n      \"enum\": [\n        \"keyword_unordered\",\n        \"keyword_exact_phrase\"\n      ],\n      \"enumTitles\": [\n        \"Any order (default)\",\n        \"Exact phrase\"\n      ],\n      \"editor\": \"select\"\n    },\n    \"startDate\": {\n      \"title\": \"Start Date\",\n      \"type\": \"string\",\n      \"description\": \"Only include ads that had impressions on or after this date (YYYY-MM-DD). Combined with End Date it forms a delivery window.\",\n      \"editor\": \"datepicker\"\n    },\n    \"endDate\": {\n      \"title\": \"End Date\",\n      \"type\": \"string\",\n      \"description\": \"Only include ads that had impressions on or before this date (YYYY-MM-DD).\",\n      \"editor\": \"datepicker\"\n    },\n    \"sortBy\": {\n      \"title\": \"Sort By\",\n      \"type\": \"string\",\n      \"description\": \"Order results by relevance (Facebook's default) or by total impressions.\",\n      \"default\": \"relevance\",\n      \"prefill\": \"relevance\",\n      \"enum\": [\n        \"relevance\",\n        \"total_impressions\"\n      ],\n      \"enumTitles\": [\n        \"Relevance (default)\",\n        \"Total Impressions\"\n      ],\n      \"editor\": \"select\"\n    },\n    \"resultsPerSearch\": {\n      \"title\": \"Results Per Search Term\",\n      \"type\": \"integer\",\n      \"description\": \"Maximum number of ads to extract per search term / page / ad / byline.\",\n      \"default\": 50,\n      \"minimum\": 1,\n      \"maximum\": 100000,\n      \"prefill\": 3\n    },\n    \"maxItems\": {\n      \"title\": \"Max Ads (global)\",\n      \"type\": \"integer\",\n      \"description\": \"Stop the whole run after this many ads, across all search targets.\",\n      \"default\": 1000,\n      \"minimum\": 1,\n      \"maximum\": 100000,\n      \"prefill\": 3\n    },\n    \"includeEuDetails\": {\n      \"title\": \"Include EU Transparency & Advertiser Details\",\n      \"type\": \"boolean\",\n      \"description\": \"Fetch per-ad detail data: EU total reach, age/country/gender reach breakdown, targeting, payer/beneficiary, advertiser Instagram profile and page About. Adds one extra request per ad.\",\n      \"default\": true,\n      \"prefill\": false\n    },\n    \"rehostMedia\": {\n      \"title\": \"Rehost Media URLs\",\n      \"type\": \"boolean\",\n      \"description\": \"Copy each ad's primary media into this run's key-value store and output the permanent URL (Facebook's own media URLs expire after a few days). The original signed URL is kept in media_url_original.\",\n      \"default\": true,\n      \"prefill\": false\n    },\n    \"onlyTotal\": {\n      \"title\": \"Only Total Results\",\n      \"type\": \"boolean\",\n      \"description\": \"Skip ad scraping and return only the total number of results per search target (one lightweight page request, no browser). Counts respect the keyword, country, status, ad type, media type and date window; Facebook caps displayed totals at 50,001 (50,000+). Not available for byline searches.\",\n      \"default\": false,\n      \"prefill\": false\n    }\n  }\n}",
    "readme": "# Facebook Political & Commercial Ad Transparency Extractor\n\nRead Facebook's public Ad Library directly and export one clean JSON record per ad — creative copy, carousel cards, images and videos, placements, advertiser identity, run dates, and the transparency numbers Meta only publishes for political and EU-delivered ads (spend ranges, impressions, reach, payer/beneficiary, age/country/gender reach). Works with a plain guest session: no Facebook login, no cookies, no Meta developer app.\n\n## What you get\n\n- **Four ways to search** — keywords, advertiser Pages, exact Ad Library IDs, or the funding entity on a \"Paid for by\" disclaimer, all in one run if you want\n- **Meta's own transparency payloads, re-emitted whole** — political spend and impression ranges; EU total reach plus the per-country age/gender reach breakdown; declared payer and beneficiary; audience age/gender/location distributions returned as Meta publishes them\n- **Creative in full** — primary media URL (copied to a permanent URL before it can expire), every image and video URL, carousel cards with their own text/CTA/link, CTA type, caption, title and display format\n- **Advertiser context** — Page URL, profile picture, likes, categories, verification, and the linked Instagram handle with follower count and About text\n- **Scale signals** — `collation_count` (variants sharing the same creative), `days_running`, placements, and the special-ad categories\n- **Honest gaps** — a field Meta does not disclose for an ad is simply left out; nothing is estimated or fabricated\n\n## Data source\n\nThe actor talks to the same internal JSON endpoint the Ad Library web page uses (`facebook.com/api/graphql/`, guest session). The page's own query identifiers are re-learned from the live site when they rotate, so the actor keeps working across Meta releases. No credential of any kind is required. Requests run through a built-in connection ladder (direct first, an Apify datacenter pool, then residential as a last resort) chosen automatically per request — you never configure a proxy.\n\n## Modes\n\n| Mode | What it does |\n|---|---|\n| `search` | Keyword search across all advertisers (any-order or exact-phrase matching) |\n| `byPage` | Every ad an advertiser Page is running or has run |\n| `byAdId` | Fetch one or more specific ads by their Ad Library ID |\n| `byByline` | Political/issue ads by their \"Paid for by\" funding entity |\n| (empty) | Processes every target list you filled in, in a single run |\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | select | All provided targets | Which target list to use; empty processes all of them |\n| `searchTerms` | array | – | Keywords, one search each |\n| `pageIds` | array | – | Numeric Page IDs or URLs containing `view_all_page_id=` / `?id=` |\n| `adIds` | array | – | Numeric Ad Library IDs or ads-library URLs containing `?id=` |\n| `bylines` | array | – | \"Paid for by\" funding-entity names (exact string matching; always searched in the political & issue archive, where this filter exists) |\n| `country` | select | `ALL` | Single country code; ignored when `countries` is set |\n| `countries` | multi-select | – | Several country codes searched together (true union) |\n| `adActiveStatus` | select | `active` | `all` / `active` / `inactive` |\n| `adType` | select | `all` | `all` / `political_and_issue_ads` / `housing` / `employment` / `credit` |\n| `mediaType` | select | `all` | `all` / `image` / `video` / `meme` / `none` |\n| `publisherPlatforms` | multi-select | – | FACEBOOK / INSTAGRAM / MESSENGER / AUDIENCE_NETWORK / WHATSAPP / THREADS |\n| `contentLanguages` | array | – | ISO 639-1 codes of the ad creative (e.g. `en`, `de`) |\n| `searchType` | select | `keyword_unordered` | Any-order or exact-phrase keyword matching |\n| `startDate` | date | – | Ads with impressions on/after this date (delivery window) |\n| `endDate` | date | – | Ads with impressions on/before this date |\n| `sortBy` | select | `relevance` | `relevance` or `total_impressions` |\n| `resultsPerSearch` | integer | `50` | Cap per search target (1–100000) |\n| `maxItems` | integer | `1000` | Global cap across everything (1–100000) |\n| `includeEuDetails` | boolean | `true` | Fetch EU transparency, payer/beneficiary and advertiser profile per ad |\n| `rehostMedia` | boolean | `true` | Copy the primary media into a permanent URL (originals kept in `media_url_original`) |\n| `onlyTotal` | boolean | `false` | Return just the total result count per target, read from the Ad Library page in one lightweight request (no browser, no pagination) — respects every filter including the date window; Facebook caps displayed totals at 50,001 (50,000+) |\n\n## Output fields\n\nEvery record is omit-empty (a field that does not apply is absent, never null).\n\n| Field | Meaning |\n|---|---|\n| `ad_id`, `ad_snapshot_url` | Ad Library ID and its public snapshot URL |\n| `page_id`, `page_name`, `page_url`, `page_profile_picture_url` | Advertiser identity |\n| `page_like_count`, `page_categories`, `page_verification`, `page_is_deleted` | Advertiser page signals |\n| `advertiser_ig_username`, `advertiser_ig_followers`, `advertiser_ig_verified`, `advertiser_about` | Linked Instagram profile and About text |\n| `ad_text`, `title`, `caption`, `link_description`, `display_format` | Creative text (as Meta serves it) |\n| `template_body`, `template_title`, `template_tokens`, `resolved_ad_text`, `resolved_title` | Dynamic-creative handling: raw `{{…}}` placeholders are kept in `template_body`/`template_title`, their token names in `template_tokens`, and a token-free `resolved_ad_text`/`resolved_title` is attached when the payload's carousel cards carry the served variant |\n| `cta_text`, `cta_type`, `link_url` | Call to action and destination |\n| `media_type`, `media_url`, `media_url_original`, `media_url_expires_at` | Primary creative media |\n| `image_urls`, `video_urls`, `video_preview_urls` | All creative media URLs |\n| `cards` | Carousel cards (title, body, caption, link, CTA, image, videos) |\n| `start_date`, `end_date`, `days_running`, `status`, `is_active` | Delivery window and live status |\n| `publisher_platform` | Placements (Facebook, Instagram, Messenger, …) |\n| `collation_count`, `collation_id` | Creative-reuse group size and ID |\n| `categories`, `gated_type`, `regional_regulation_data` | Special categories and regulation flags |\n| `spend`, `spend_lower_bound`, `spend_upper_bound`, `currency` | Spend range (political & EU-regulated ads) |\n| `impressions`, `impressions_index`, `impressions_lower_bound`, `impressions_upper_bound`, `reach_estimate` | Impression/reach signals (same gating) |\n| `byline`, `disclaimer_label` | \"Paid for by\" funding entity |\n| `eu_total_reach`, `age_country_gender_reach_breakdown` | EU DSA total reach and per-country age/gender breakdown |\n| `target_age_audience`, `target_gender_audience`, `target_location_audience` | Declared EU/UK targeting |\n| `audience_age_gender`, `audience_location`, `audience_single_country` | Audience distribution as published |\n| `payer_beneficiary`, `violation_types`, `is_violating_eu_siep` | EU payer/beneficiary declarations and violations |\n| `contains_digital_created_media`, `contains_sensitive_content`, `has_user_reported`, `is_aaa_eligible`, `total_active_time`, `hide_data_status`, `state_media_run_label` | Additional Meta flags |\n| `search_term`, `scraped_at` | Which search produced the row, and when |\n\nDiagnostic rows use `type: \"facebook_ads_library_diagnostic\"` with `searchTerm`, `outcome`, `message` and `scrapedAt`; `onlyTotal` runs push `type: \"facebook_ads_library_total\"` with `total_results`. Ad-ID lookups that neither the search endpoint nor the ad's own page can resolve produce a `detail_unavailable` diagnostic that reports Facebook's own reason (`NO_AD_FOUND`) — no record is ever fabricated.\n\n## Example\n\n```json\n{\n    \"mode\": \"search\",\n    \"searchTerms\": [\"coffee\"],\n    \"country\": \"US\",\n    \"adActiveStatus\": \"active\",\n    \"includeEuDetails\": true,\n    \"maxItems\": 50\n}\n```\n\n## FAQ\n\n**Do I need a Facebook account or cookies?** No. The actor works with an anonymous guest session by default.\n\n**Why is spend missing on some ads?** Meta publishes spend and impressions ranges only for political/issue ads and EU-regulated advertising. The actor returns those fields when the source has them and omits them otherwise — it never fills a gap with a guess.\n\n**Why did my political search for an EU country return all ad types?** Meta's political/issue archive does not cover EU/EEA countries; EU political ads live in the general transparency stream, so the actor automatically searches all types there and says so in the run log.\n\n**Will image and video links keep working?** Facebook's media links are signed and expire within days. With `rehostMedia` on, the primary media is copied to a permanent URL first and the original is preserved in `media_url_original`; the arrays keep Meta's URLs, each with its expiry in `media_url_expires_at`.\n\n**How far back does the data go?** Whatever the public Ad Library serves for your query: seven years for political/issue ads, one year for ads delivered to the EU, and live archive coverage for commercial ads.\n\n**Can I scrape several countries or targets at once?** Yes — `countries` yields a union, and every target list can run together in one job.\n\n**What is `collation_count`?** The number of ad variants Meta groups under the same creative and text — a quick way to spot heavily scaled campaigns.\n\n**Why does `ad_text` sometimes contain `{{product.brand}}`?** Dynamic-creative (DCO/DPA) ads are stored with template placeholders; Meta resolves them only when the ad is delivered. The actor keeps the served text untouched in `ad_text`, records the placeholder in `template_body`/`template_tokens`, and attaches `resolved_ad_text`/`resolved_title` when the payload's cards contain the resolved creative instead of inventing one.\n\n**Is the total count exact?** It is the number the Ad Library page itself displays for your filters. Meta caps the display at 50,001, meaning \"50,000 or more\"; below that it is exact. Totals are not available for byline searches because the Ad Library UI has no byline filter.\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "facebook-political-and-commercial-ad-transparency",
      "title": "Facebook Political & Commercial Ad Transparency Extractor",
      "description": "Read the Facebook Ad Library without login: keyword, advertiser, ad-ID and \"Paid for by\" searches with creative, media, platforms, political spend and EU DSA transparency reach.",
      "version": "1.0",
      "categories": [
        "SOCIAL_MEDIA",
        "MARKETING"
      ],
      "defaultRunOptions": {
        "build": "latest",
        "timeoutSecs": 3600,
        "memoryMbytes": 1024
      },
      "meta": {
        "templateId": "python-playwright"
      },
      "readme": "# Facebook Political & Commercial Ad Transparency Extractor\n\nRead Facebook's public Ad Library directly and export one clean JSON record per ad — creative copy, carousel cards, images and videos, placements, advertiser identity, run dates, and the transparency numbers Meta only publishes for political and EU-delivered ads (spend ranges, impressions, reach, payer/beneficiary, age/country/gender reach). Works with a plain guest session: no Facebook login, no cookies, no Meta developer app.\n\n## What you get\n\n- **Four ways to search** — keywords, advertiser Pages, exact Ad Library IDs, or the funding entity on a \"Paid for by\" disclaimer, all in one run if you want\n- **Meta's own transparency payloads, re-emitted whole** — political spend and impression ranges; EU total reach plus the per-country age/gender reach breakdown; declared payer and beneficiary; audience age/gender/location distributions returned as Meta publishes them\n- **Creative in full** — primary media URL (copied to a permanent URL before it can expire), every image and video URL, carousel cards with their own text/CTA/link, CTA type, caption, title and display format\n- **Advertiser context** — Page URL, profile picture, likes, categories, verification, and the linked Instagram handle with follower count and About text\n- **Scale signals** — `collation_count` (variants sharing the same creative), `days_running`, placements, and the special-ad categories\n- **Honest gaps** — a field Meta does not disclose for an ad is simply left out; nothing is estimated or fabricated\n\n## Data source\n\nThe actor talks to the same internal JSON endpoint the Ad Library web page uses (`facebook.com/api/graphql/`, guest session). The page's own query identifiers are re-learned from the live site when they rotate, so the actor keeps working across Meta releases. No credential of any kind is required. Requests run through a built-in connection ladder (direct first, an Apify datacenter pool, then residential as a last resort) chosen automatically per request — you never configure a proxy.\n\n## Modes\n\n| Mode | What it does |\n|---|---|\n| `search` | Keyword search across all advertisers (any-order or exact-phrase matching) |\n| `byPage` | Every ad an advertiser Page is running or has run |\n| `byAdId` | Fetch one or more specific ads by their Ad Library ID |\n| `byByline` | Political/issue ads by their \"Paid for by\" funding entity |\n| (empty) | Processes every target list you filled in, in a single run |\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | select | All provided targets | Which target list to use; empty processes all of them |\n| `searchTerms` | array | – | Keywords, one search each |\n| `pageIds` | array | – | Numeric Page IDs or URLs containing `view_all_page_id=` / `?id=` |\n| `adIds` | array | – | Numeric Ad Library IDs or ads-library URLs containing `?id=` |\n| `bylines` | array | – | \"Paid for by\" funding-entity names (exact string matching; always searched in the political & issue archive, where this filter exists) |\n| `country` | select | `ALL` | Single country code; ignored when `countries` is set |\n| `countries` | multi-select | – | Several country codes searched together (true union) |\n| `adActiveStatus` | select | `active` | `all` / `active` / `inactive` |\n| `adType` | select | `all` | `all` / `political_and_issue_ads` / `housing` / `employment` / `credit` |\n| `mediaType` | select | `all` | `all` / `image` / `video` / `meme` / `none` |\n| `publisherPlatforms` | multi-select | – | FACEBOOK / INSTAGRAM / MESSENGER / AUDIENCE_NETWORK / WHATSAPP / THREADS |\n| `contentLanguages` | array | – | ISO 639-1 codes of the ad creative (e.g. `en`, `de`) |\n| `searchType` | select | `keyword_unordered` | Any-order or exact-phrase keyword matching |\n| `startDate` | date | – | Ads with impressions on/after this date (delivery window) |\n| `endDate` | date | – | Ads with impressions on/before this date |\n| `sortBy` | select | `relevance` | `relevance` or `total_impressions` |\n| `resultsPerSearch` | integer | `50` | Cap per search target (1–100000) |\n| `maxItems` | integer | `1000` | Global cap across everything (1–100000) |\n| `includeEuDetails` | boolean | `true` | Fetch EU transparency, payer/beneficiary and advertiser profile per ad |\n| `rehostMedia` | boolean | `true` | Copy the primary media into a permanent URL (originals kept in `media_url_original`) |\n| `onlyTotal` | boolean | `false` | Return just the total result count per target, read from the Ad Library page in one lightweight request (no browser, no pagination) — respects every filter including the date window; Facebook caps displayed totals at 50,001 (50,000+) |\n\n## Output fields\n\nEvery record is omit-empty (a field that does not apply is absent, never null).\n\n| Field | Meaning |\n|---|---|\n| `ad_id`, `ad_snapshot_url` | Ad Library ID and its public snapshot URL |\n| `page_id`, `page_name`, `page_url`, `page_profile_picture_url` | Advertiser identity |\n| `page_like_count`, `page_categories`, `page_verification`, `page_is_deleted` | Advertiser page signals |\n| `advertiser_ig_username`, `advertiser_ig_followers`, `advertiser_ig_verified`, `advertiser_about` | Linked Instagram profile and About text |\n| `ad_text`, `title`, `caption`, `link_description`, `display_format` | Creative text (as Meta serves it) |\n| `template_body`, `template_title`, `template_tokens`, `resolved_ad_text`, `resolved_title` | Dynamic-creative handling: raw `{{…}}` placeholders are kept in `template_body`/`template_title`, their token names in `template_tokens`, and a token-free `resolved_ad_text`/`resolved_title` is attached when the payload's carousel cards carry the served variant |\n| `cta_text`, `cta_type`, `link_url` | Call to action and destination |\n| `media_type`, `media_url`, `media_url_original`, `media_url_expires_at` | Primary creative media |\n| `image_urls`, `video_urls`, `video_preview_urls` | All creative media URLs |\n| `cards` | Carousel cards (title, body, caption, link, CTA, image, videos) |\n| `start_date`, `end_date`, `days_running`, `status`, `is_active` | Delivery window and live status |\n| `publisher_platform` | Placements (Facebook, Instagram, Messenger, …) |\n| `collation_count`, `collation_id` | Creative-reuse group size and ID |\n| `categories`, `gated_type`, `regional_regulation_data` | Special categories and regulation flags |\n| `spend`, `spend_lower_bound`, `spend_upper_bound`, `currency` | Spend range (political & EU-regulated ads) |\n| `impressions`, `impressions_index`, `impressions_lower_bound`, `impressions_upper_bound`, `reach_estimate` | Impression/reach signals (same gating) |\n| `byline`, `disclaimer_label` | \"Paid for by\" funding entity |\n| `eu_total_reach`, `age_country_gender_reach_breakdown` | EU DSA total reach and per-country age/gender breakdown |\n| `target_age_audience`, `target_gender_audience`, `target_location_audience` | Declared EU/UK targeting |\n| `audience_age_gender`, `audience_location`, `audience_single_country` | Audience distribution as published |\n| `payer_beneficiary`, `violation_types`, `is_violating_eu_siep` | EU payer/beneficiary declarations and violations |\n| `contains_digital_created_media`, `contains_sensitive_content`, `has_user_reported`, `is_aaa_eligible`, `total_active_time`, `hide_data_status`, `state_media_run_label` | Additional Meta flags |\n| `search_term`, `scraped_at` | Which search produced the row, and when |\n\nDiagnostic rows use `type: \"facebook_ads_library_diagnostic\"` with `searchTerm`, `outcome`, `message` and `scrapedAt`; `onlyTotal` runs push `type: \"facebook_ads_library_total\"` with `total_results`. Ad-ID lookups that neither the search endpoint nor the ad's own page can resolve produce a `detail_unavailable` diagnostic that reports Facebook's own reason (`NO_AD_FOUND`) — no record is ever fabricated.\n\n## Example\n\n```json\n{\n    \"mode\": \"search\",\n    \"searchTerms\": [\"coffee\"],\n    \"country\": \"US\",\n    \"adActiveStatus\": \"active\",\n    \"includeEuDetails\": true,\n    \"maxItems\": 50\n}\n```\n\n## FAQ\n\n**Do I need a Facebook account or cookies?** No. The actor works with an anonymous guest session by default.\n\n**Why is spend missing on some ads?** Meta publishes spend and impressions ranges only for political/issue ads and EU-regulated advertising. The actor returns those fields when the source has them and omits them otherwise — it never fills a gap with a guess.\n\n**Why did my political search for an EU country return all ad types?** Meta's political/issue archive does not cover EU/EEA countries; EU political ads live in the general transparency stream, so the actor automatically searches all types there and says so in the run log.\n\n**Will image and video links keep working?** Facebook's media links are signed and expire within days. With `rehostMedia` on, the primary media is copied to a permanent URL first and the original is preserved in `media_url_original`; the arrays keep Meta's URLs, each with its expiry in `media_url_expires_at`.\n\n**How far back does the data go?** Whatever the public Ad Library serves for your query: seven years for political/issue ads, one year for ads delivered to the EU, and live archive coverage for commercial ads.\n\n**Can I scrape several countries or targets at once?** Yes — `countries` yields a union, and every target list can run together in one job.\n\n**What is `collation_count`?** The number of ad variants Meta groups under the same creative and text — a quick way to spot heavily scaled campaigns.\n\n**Why does `ad_text` sometimes contain `{{product.brand}}`?** Dynamic-creative (DCO/DPA) ads are stored with template placeholders; Meta resolves them only when the ad is delivered. The actor keeps the served text untouched in `ad_text`, records the placeholder in `template_body`/`template_tokens`, and attaches `resolved_ad_text`/`resolved_title` when the payload's cards contain the resolved creative instead of inventing one.\n\n**Is the total count exact?** It is the number the Ad Library page itself displays for your filters. Meta caps the display at 50,001, meaning \"50,000 or more\"; below that it is exact. Totals are not available for byline searches because the Ad Library UI has no byline filter.\n",
      "input": {
        "title": "Facebook Ad Transparency Extractor Input",
        "description": "Search the Facebook Ad Library by keyword, advertiser Page, Ad Library ID, or \"Paid for by\" name. Returns ad creative, media, run dates, platforms, political spend/impressions and EU transparency reach. No login, cookies or Meta API token required.",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "What to scrape. Leave empty to process every target list you filled in (searchTerms, pageIds, adIds, bylines) in one run.",
            "editor": "select",
            "enum": [
              "",
              "search",
              "byPage",
              "byAdId",
              "byByline"
            ],
            "enumTitles": [
              "All provided targets (default)",
              "Search by keyword",
              "All ads from advertiser Pages",
              "Lookup specific ads by Ad Library ID",
              "Search by \"Paid for by\" name"
            ],
            "default": "",
            "prefill": "search"
          },
          "searchTerms": {
            "title": "Search Terms",
            "type": "array",
            "description": "Keywords to search for in the Ad Library, one search per term. Example: [\"coffee\", \"nike\"].",
            "editor": "stringList",
            "items": {
              "type": "string"
            },
            "prefill": [
              "coffee"
            ]
          },
          "pageIds": {
            "title": "Page IDs / Advertiser Search",
            "type": "array",
            "description": "Facebook Page IDs to fetch all ads from (numeric IDs, or URLs containing view_all_page_id= or profile.php?id=). Each page is searched separately.",
            "editor": "stringList",
            "items": {
              "type": "string"
            }
          },
          "adIds": {
            "title": "Direct Ad IDs",
            "type": "array",
            "description": "Ad Library IDs to fetch directly (numeric IDs or Ads Library URLs containing ?id=). All other filters are ignored in this mode.",
            "editor": "stringList",
            "items": {
              "type": "string"
            }
          },
          "bylines": {
            "title": "Search by \"Paid for by\" name",
            "type": "array",
            "description": "Funding-entity / committee names from the \"Paid for by\" disclaimer on political and issue ads. Matching is exact (case-insensitive fallback): use the name as it appears in the ad. Byline targets always search the political & issue archive, since the Ad Library ignores this filter elsewhere.",
            "editor": "stringList",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Country to search ads in, or ALL for every country. Ignored when the Countries multi-select below is set.",
            "editor": "select",
            "default": "ALL",
            "enum": [
              "ALL",
              "AF",
              "AL",
              "DZ",
              "AS",
              "AD",
              "AO",
              "AI",
              "AQ",
              "AG",
              "AR",
              "AM",
              "AW",
              "AU",
              "AT",
              "AZ",
              "BS",
              "BH",
              "BD",
              "BB",
              "BY",
              "BE",
              "BZ",
              "BJ",
              "BM",
              "BT",
              "BO",
              "BA",
              "BW",
              "BR",
              "BN",
              "BG",
              "BF",
              "BI",
              "KH",
              "CM",
              "CA",
              "CV",
              "KY",
              "CF",
              "TD",
              "CL",
              "CN",
              "CO",
              "KM",
              "CG",
              "CD",
              "CR",
              "HR",
              "CU",
              "CY",
              "CZ",
              "DK",
              "DJ",
              "DM",
              "DO",
              "EC",
              "EG",
              "SV",
              "GQ",
              "ER",
              "EE",
              "SZ",
              "ET",
              "FJ",
              "FI",
              "FR",
              "GF",
              "PF",
              "GA",
              "GM",
              "GE",
              "DE",
              "GH",
              "GI",
              "GR",
              "GL",
              "GD",
              "GP",
              "GU",
              "GT",
              "GN",
              "GW",
              "GY",
              "HT",
              "HN",
              "HK",
              "HU",
              "IS",
              "IN",
              "ID",
              "IR",
              "IQ",
              "IE",
              "IL",
              "IT",
              "JM",
              "JP",
              "JO",
              "KZ",
              "KE",
              "KI",
              "KW",
              "KG",
              "LA",
              "LV",
              "LB",
              "LS",
              "LR",
              "LY",
              "LI",
              "LT",
              "LU",
              "MO",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MH",
              "MQ",
              "MR",
              "MU",
              "MX",
              "FM",
              "MD",
              "MC",
              "MN",
              "ME",
              "MS",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NR",
              "NP",
              "NL",
              "NC",
              "NZ",
              "NI",
              "NE",
              "NG",
              "NU",
              "MK",
              "NO",
              "OM",
              "PK",
              "PW",
              "PS",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PL",
              "PT",
              "PR",
              "QA",
              "RO",
              "RU",
              "RW",
              "WS",
              "SM",
              "ST",
              "SA",
              "SN",
              "RS",
              "SC",
              "SL",
              "SG",
              "SK",
              "SI",
              "SB",
              "SO",
              "ZA",
              "KR",
              "SS",
              "ES",
              "LK",
              "KN",
              "LC",
              "VC",
              "SD",
              "SR",
              "SE",
              "CH",
              "SY",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TL",
              "TG",
              "TO",
              "TT",
              "TN",
              "TR",
              "TM",
              "TC",
              "TV",
              "UG",
              "UA",
              "AE",
              "GB",
              "US",
              "UY",
              "UZ",
              "VU",
              "VA",
              "VE",
              "VN",
              "VG",
              "VI",
              "YE",
              "ZM",
              "ZW"
            ],
            "enumTitles": [
              "All Countries",
              "Afghanistan",
              "Albania",
              "Algeria",
              "American Samoa",
              "Andorra",
              "Angola",
              "Anguilla",
              "Antarctica",
              "Antigua and Barbuda",
              "Argentina",
              "Armenia",
              "Aruba",
              "Australia",
              "Austria",
              "Azerbaijan",
              "Bahamas",
              "Bahrain",
              "Bangladesh",
              "Barbados",
              "Belarus",
              "Belgium",
              "Belize",
              "Benin",
              "Bermuda",
              "Bhutan",
              "Bolivia",
              "Bosnia and Herzegovina",
              "Botswana",
              "Brazil",
              "Brunei",
              "Bulgaria",
              "Burkina Faso",
              "Burundi",
              "Cambodia",
              "Cameroon",
              "Canada",
              "Cape Verde",
              "Cayman Islands",
              "Central African Republic",
              "Chad",
              "Chile",
              "China",
              "Colombia",
              "Comoros",
              "Congo",
              "Congo (DRC)",
              "Costa Rica",
              "Croatia",
              "Cuba",
              "Cyprus",
              "Czechia",
              "Denmark",
              "Djibouti",
              "Dominica",
              "Dominican Republic",
              "Ecuador",
              "Egypt",
              "El Salvador",
              "Equatorial Guinea",
              "Eritrea",
              "Estonia",
              "Eswatini",
              "Ethiopia",
              "Fiji",
              "Finland",
              "France",
              "French Guiana",
              "French Polynesia",
              "Gabon",
              "Gambia",
              "Georgia",
              "Germany",
              "Ghana",
              "Gibraltar",
              "Greece",
              "Greenland",
              "Grenada",
              "Guadeloupe",
              "Guam",
              "Guatemala",
              "Guinea",
              "Guinea-Bissau",
              "Guyana",
              "Haiti",
              "Honduras",
              "Hong Kong",
              "Hungary",
              "Iceland",
              "India",
              "Indonesia",
              "Iran",
              "Iraq",
              "Ireland",
              "Israel",
              "Italy",
              "Jamaica",
              "Japan",
              "Jordan",
              "Kazakhstan",
              "Kenya",
              "Kiribati",
              "Kuwait",
              "Kyrgyzstan",
              "Laos",
              "Latvia",
              "Lebanon",
              "Lesotho",
              "Liberia",
              "Libya",
              "Liechtenstein",
              "Lithuania",
              "Luxembourg",
              "Macau",
              "Madagascar",
              "Malawi",
              "Malaysia",
              "Maldives",
              "Mali",
              "Malta",
              "Marshall Islands",
              "Martinique",
              "Mauritania",
              "Mauritius",
              "Mexico",
              "Micronesia",
              "Moldova",
              "Monaco",
              "Mongolia",
              "Montenegro",
              "Montserrat",
              "Morocco",
              "Mozambique",
              "Myanmar",
              "Namibia",
              "Nauru",
              "Nepal",
              "Netherlands",
              "New Caledonia",
              "New Zealand",
              "Nicaragua",
              "Niger",
              "Nigeria",
              "Niue",
              "North Macedonia",
              "Norway",
              "Oman",
              "Pakistan",
              "Palau",
              "Palestine",
              "Panama",
              "Papua New Guinea",
              "Paraguay",
              "Peru",
              "Philippines",
              "Poland",
              "Portugal",
              "Puerto Rico",
              "Qatar",
              "Romania",
              "Russia",
              "Rwanda",
              "Samoa",
              "San Marino",
              "Sao Tome and Principe",
              "Saudi Arabia",
              "Senegal",
              "Serbia",
              "Seychelles",
              "Sierra Leone",
              "Singapore",
              "Slovakia",
              "Slovenia",
              "Solomon Islands",
              "Somalia",
              "South Africa",
              "South Korea",
              "South Sudan",
              "Spain",
              "Sri Lanka",
              "St. Kitts and Nevis",
              "St. Lucia",
              "St. Vincent and the Grenadines",
              "Sudan",
              "Suriname",
              "Sweden",
              "Switzerland",
              "Syria",
              "Taiwan",
              "Tajikistan",
              "Tanzania",
              "Thailand",
              "Timor-Leste",
              "Togo",
              "Tonga",
              "Trinidad and Tobago",
              "Tunisia",
              "Turkiye",
              "Turkmenistan",
              "Turks and Caicos Islands",
              "Tuvalu",
              "Uganda",
              "Ukraine",
              "United Arab Emirates",
              "United Kingdom",
              "United States",
              "Uruguay",
              "Uzbekistan",
              "Vanuatu",
              "Vatican City",
              "Venezuela",
              "Vietnam",
              "British Virgin Islands",
              "U.S. Virgin Islands",
              "Yemen",
              "Zambia",
              "Zimbabwe"
            ]
          },
          "countries": {
            "title": "Countries (multi-select)",
            "type": "array",
            "description": "One or more country codes, searched together as a union (unlike the single Country field). Takes precedence over Country when set.",
            "editor": "select",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "ALL",
                "AF",
                "AL",
                "DZ",
                "AS",
                "AD",
                "AO",
                "AI",
                "AQ",
                "AG",
                "AR",
                "AM",
                "AW",
                "AU",
                "AT",
                "AZ",
                "BS",
                "BH",
                "BD",
                "BB",
                "BY",
                "BE",
                "BZ",
                "BJ",
                "BM",
                "BT",
                "BO",
                "BA",
                "BW",
                "BR",
                "BN",
                "BG",
                "BF",
                "BI",
                "KH",
                "CM",
                "CA",
                "CV",
                "KY",
                "CF",
                "TD",
                "CL",
                "CN",
                "CO",
                "KM",
                "CG",
                "CD",
                "CR",
                "HR",
                "CU",
                "CY",
                "CZ",
                "DK",
                "DJ",
                "DM",
                "DO",
                "EC",
                "EG",
                "SV",
                "GQ",
                "ER",
                "EE",
                "SZ",
                "ET",
                "FJ",
                "FI",
                "FR",
                "GF",
                "PF",
                "GA",
                "GM",
                "GE",
                "DE",
                "GH",
                "GI",
                "GR",
                "GL",
                "GD",
                "GP",
                "GU",
                "GT",
                "GN",
                "GW",
                "GY",
                "HT",
                "HN",
                "HK",
                "HU",
                "IS",
                "IN",
                "ID",
                "IR",
                "IQ",
                "IE",
                "IL",
                "IT",
                "JM",
                "JP",
                "JO",
                "KZ",
                "KE",
                "KI",
                "KW",
                "KG",
                "LA",
                "LV",
                "LB",
                "LS",
                "LR",
                "LY",
                "LI",
                "LT",
                "LU",
                "MO",
                "MG",
                "MW",
                "MY",
                "MV",
                "ML",
                "MT",
                "MH",
                "MQ",
                "MR",
                "MU",
                "MX",
                "FM",
                "MD",
                "MC",
                "MN",
                "ME",
                "MS",
                "MA",
                "MZ",
                "MM",
                "NA",
                "NR",
                "NP",
                "NL",
                "NC",
                "NZ",
                "NI",
                "NE",
                "NG",
                "NU",
                "MK",
                "NO",
                "OM",
                "PK",
                "PW",
                "PS",
                "PA",
                "PG",
                "PY",
                "PE",
                "PH",
                "PL",
                "PT",
                "PR",
                "QA",
                "RO",
                "RU",
                "RW",
                "WS",
                "SM",
                "ST",
                "SA",
                "SN",
                "RS",
                "SC",
                "SL",
                "SG",
                "SK",
                "SI",
                "SB",
                "SO",
                "ZA",
                "KR",
                "SS",
                "ES",
                "LK",
                "KN",
                "LC",
                "VC",
                "SD",
                "SR",
                "SE",
                "CH",
                "SY",
                "TW",
                "TJ",
                "TZ",
                "TH",
                "TL",
                "TG",
                "TO",
                "TT",
                "TN",
                "TR",
                "TM",
                "TC",
                "TV",
                "UG",
                "UA",
                "AE",
                "GB",
                "US",
                "UY",
                "UZ",
                "VU",
                "VA",
                "VE",
                "VN",
                "VG",
                "VI",
                "YE",
                "ZM",
                "ZW"
              ],
              "enumTitles": [
                "All Countries",
                "Afghanistan",
                "Albania",
                "Algeria",
                "American Samoa",
                "Andorra",
                "Angola",
                "Anguilla",
                "Antarctica",
                "Antigua and Barbuda",
                "Argentina",
                "Armenia",
                "Aruba",
                "Australia",
                "Austria",
                "Azerbaijan",
                "Bahamas",
                "Bahrain",
                "Bangladesh",
                "Barbados",
                "Belarus",
                "Belgium",
                "Belize",
                "Benin",
                "Bermuda",
                "Bhutan",
                "Bolivia",
                "Bosnia and Herzegovina",
                "Botswana",
                "Brazil",
                "Brunei",
                "Bulgaria",
                "Burkina Faso",
                "Burundi",
                "Cambodia",
                "Cameroon",
                "Canada",
                "Cape Verde",
                "Cayman Islands",
                "Central African Republic",
                "Chad",
                "Chile",
                "China",
                "Colombia",
                "Comoros",
                "Congo",
                "Congo (DRC)",
                "Costa Rica",
                "Croatia",
                "Cuba",
                "Cyprus",
                "Czechia",
                "Denmark",
                "Djibouti",
                "Dominica",
                "Dominican Republic",
                "Ecuador",
                "Egypt",
                "El Salvador",
                "Equatorial Guinea",
                "Eritrea",
                "Estonia",
                "Eswatini",
                "Ethiopia",
                "Fiji",
                "Finland",
                "France",
                "French Guiana",
                "French Polynesia",
                "Gabon",
                "Gambia",
                "Georgia",
                "Germany",
                "Ghana",
                "Gibraltar",
                "Greece",
                "Greenland",
                "Grenada",
                "Guadeloupe",
                "Guam",
                "Guatemala",
                "Guinea",
                "Guinea-Bissau",
                "Guyana",
                "Haiti",
                "Honduras",
                "Hong Kong",
                "Hungary",
                "Iceland",
                "India",
                "Indonesia",
                "Iran",
                "Iraq",
                "Ireland",
                "Israel",
                "Italy",
                "Jamaica",
                "Japan",
                "Jordan",
                "Kazakhstan",
                "Kenya",
                "Kiribati",
                "Kuwait",
                "Kyrgyzstan",
                "Laos",
                "Latvia",
                "Lebanon",
                "Lesotho",
                "Liberia",
                "Libya",
                "Liechtenstein",
                "Lithuania",
                "Luxembourg",
                "Macau",
                "Madagascar",
                "Malawi",
                "Malaysia",
                "Maldives",
                "Mali",
                "Malta",
                "Marshall Islands",
                "Martinique",
                "Mauritania",
                "Mauritius",
                "Mexico",
                "Micronesia",
                "Moldova",
                "Monaco",
                "Mongolia",
                "Montenegro",
                "Montserrat",
                "Morocco",
                "Mozambique",
                "Myanmar",
                "Namibia",
                "Nauru",
                "Nepal",
                "Netherlands",
                "New Caledonia",
                "New Zealand",
                "Nicaragua",
                "Niger",
                "Nigeria",
                "Niue",
                "North Macedonia",
                "Norway",
                "Oman",
                "Pakistan",
                "Palau",
                "Palestine",
                "Panama",
                "Papua New Guinea",
                "Paraguay",
                "Peru",
                "Philippines",
                "Poland",
                "Portugal",
                "Puerto Rico",
                "Qatar",
                "Romania",
                "Russia",
                "Rwanda",
                "Samoa",
                "San Marino",
                "Sao Tome and Principe",
                "Saudi Arabia",
                "Senegal",
                "Serbia",
                "Seychelles",
                "Sierra Leone",
                "Singapore",
                "Slovakia",
                "Slovenia",
                "Solomon Islands",
                "Somalia",
                "South Africa",
                "South Korea",
                "South Sudan",
                "Spain",
                "Sri Lanka",
                "St. Kitts and Nevis",
                "St. Lucia",
                "St. Vincent and the Grenadines",
                "Sudan",
                "Suriname",
                "Sweden",
                "Switzerland",
                "Syria",
                "Taiwan",
                "Tajikistan",
                "Tanzania",
                "Thailand",
                "Timor-Leste",
                "Togo",
                "Tonga",
                "Trinidad and Tobago",
                "Tunisia",
                "Turkiye",
                "Turkmenistan",
                "Turks and Caicos Islands",
                "Tuvalu",
                "Uganda",
                "Ukraine",
                "United Arab Emirates",
                "United Kingdom",
                "United States",
                "Uruguay",
                "Uzbekistan",
                "Vanuatu",
                "Vatican City",
                "Venezuela",
                "Vietnam",
                "British Virgin Islands",
                "U.S. Virgin Islands",
                "Yemen",
                "Zambia",
                "Zimbabwe"
              ]
            }
          },
          "adActiveStatus": {
            "title": "Ad Status",
            "type": "string",
            "description": "Filter by ad active status.",
            "default": "active",
            "prefill": "active",
            "enum": [
              "all",
              "active",
              "inactive"
            ],
            "enumTitles": [
              "All Ads",
              "Active Only",
              "Inactive Only"
            ],
            "editor": "select"
          },
          "adType": {
            "title": "Ad Type",
            "type": "string",
            "description": "Filter by ad category. Note: the political-and-issue archive excludes EU/EEA countries, so EU political searches automatically use All Types (EU transparency stream).",
            "default": "all",
            "prefill": "all",
            "enum": [
              "all",
              "political_and_issue_ads",
              "housing",
              "employment",
              "credit"
            ],
            "enumTitles": [
              "All Types",
              "Political & Issue Ads",
              "Housing",
              "Employment",
              "Credit"
            ],
            "editor": "select"
          },
          "mediaType": {
            "title": "Media Type",
            "type": "string",
            "description": "Filter by the ad's creative media type.",
            "default": "all",
            "prefill": "all",
            "enum": [
              "all",
              "image",
              "video",
              "meme",
              "none"
            ],
            "enumTitles": [
              "All Media",
              "Image",
              "Video",
              "Meme",
              "No Media"
            ],
            "editor": "select"
          },
          "publisherPlatforms": {
            "title": "Publisher Platforms",
            "type": "array",
            "description": "Only return ads shown on these platforms. Leave empty for all platforms.",
            "editor": "select",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "FACEBOOK",
                "INSTAGRAM",
                "MESSENGER",
                "AUDIENCE_NETWORK",
                "WHATSAPP",
                "THREADS"
              ],
              "enumTitles": [
                "Facebook",
                "Instagram",
                "Messenger",
                "Audience Network",
                "WhatsApp",
                "Threads"
              ]
            }
          },
          "contentLanguages": {
            "title": "Ad Content Languages",
            "type": "array",
            "description": "2-letter ISO language codes (e.g. en, de, es) to restrict ads by creative language.",
            "editor": "stringList",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Keyword Match",
            "type": "string",
            "description": "How keyword search terms are matched (mode=search only).",
            "default": "keyword_unordered",
            "prefill": "keyword_unordered",
            "enum": [
              "keyword_unordered",
              "keyword_exact_phrase"
            ],
            "enumTitles": [
              "Any order (default)",
              "Exact phrase"
            ],
            "editor": "select"
          },
          "startDate": {
            "title": "Start Date",
            "type": "string",
            "description": "Only include ads that had impressions on or after this date (YYYY-MM-DD). Combined with End Date it forms a delivery window.",
            "editor": "datepicker"
          },
          "endDate": {
            "title": "End Date",
            "type": "string",
            "description": "Only include ads that had impressions on or before this date (YYYY-MM-DD).",
            "editor": "datepicker"
          },
          "sortBy": {
            "title": "Sort By",
            "type": "string",
            "description": "Order results by relevance (Facebook's default) or by total impressions.",
            "default": "relevance",
            "prefill": "relevance",
            "enum": [
              "relevance",
              "total_impressions"
            ],
            "enumTitles": [
              "Relevance (default)",
              "Total Impressions"
            ],
            "editor": "select"
          },
          "resultsPerSearch": {
            "title": "Results Per Search Term",
            "type": "integer",
            "description": "Maximum number of ads to extract per search term / page / ad / byline.",
            "default": 50,
            "minimum": 1,
            "maximum": 100000,
            "prefill": 3
          },
          "maxItems": {
            "title": "Max Ads (global)",
            "type": "integer",
            "description": "Stop the whole run after this many ads, across all search targets.",
            "default": 1000,
            "minimum": 1,
            "maximum": 100000,
            "prefill": 3
          },
          "includeEuDetails": {
            "title": "Include EU Transparency & Advertiser Details",
            "type": "boolean",
            "description": "Fetch per-ad detail data: EU total reach, age/country/gender reach breakdown, targeting, payer/beneficiary, advertiser Instagram profile and page About. Adds one extra request per ad.",
            "default": true,
            "prefill": false
          },
          "rehostMedia": {
            "title": "Rehost Media URLs",
            "type": "boolean",
            "description": "Copy each ad's primary media into this run's key-value store and output the permanent URL (Facebook's own media URLs expire after a few days). The original signed URL is kept in media_url_original.",
            "default": true,
            "prefill": false
          },
          "onlyTotal": {
            "title": "Only Total Results",
            "type": "boolean",
            "description": "Skip ad scraping and return only the total number of results per search target (one lightweight page request, no browser). Counts respect the keyword, country, status, ad type, media type and date window; Facebook caps displayed totals at 50,001 (50,000+). Not available for byline searches.",
            "default": false,
            "prefill": false
          }
        }
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "Facebook Ad Transparency Extractor Output",
        "description": "One record per Facebook Ad Library ad, with creative text, media, run dates, platforms, political spend/impressions and EU DSA transparency fields. Records where an ad did not receive a field (e.g. spend on a commercial ad) simply omit it.",
        "properties": {
          "ads": {
            "type": "string",
            "title": "Ad Library Data",
            "description": "Dataset containing all scraped Facebook ads, one JSON object per ad",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "dockerfile": "../Dockerfile",
      "storages": {
        "dataset": {
          "actorSpecification": 1,
          "title": "Facebook Ad Library Data",
          "views": {
            "overview": {
              "title": "Ad Overview",
              "transformation": {
                "fields": [
                  "ad_id",
                  "page_name",
                  "ad_text",
                  "start_date",
                  "status",
                  "media_type",
                  "cta_text",
                  "link_url",
                  "publisher_platform",
                  "collation_count",
                  "spend",
                  "impressions",
                  "ad_snapshot_url",
                  "search_term"
                ]
              },
              "display": {
                "component": "table",
                "properties": {
                  "ad_id": {
                    "label": "Ad ID",
                    "format": "text"
                  },
                  "page_name": {
                    "label": "Page Name",
                    "format": "text"
                  },
                  "ad_text": {
                    "label": "Ad Text",
                    "format": "text"
                  },
                  "start_date": {
                    "label": "Started",
                    "format": "text"
                  },
                  "status": {
                    "label": "Status",
                    "format": "text"
                  },
                  "media_type": {
                    "label": "Media",
                    "format": "text"
                  },
                  "cta_text": {
                    "label": "CTA",
                    "format": "text"
                  },
                  "link_url": {
                    "label": "Link URL",
                    "format": "link"
                  },
                  "publisher_platform": {
                    "label": "Platforms",
                    "format": "text"
                  },
                  "collation_count": {
                    "label": "Creative Reuse",
                    "format": "text"
                  },
                  "spend": {
                    "label": "Spend",
                    "format": "text"
                  },
                  "impressions": {
                    "label": "Impressions",
                    "format": "text"
                  },
                  "ad_snapshot_url": {
                    "label": "Snapshot URL",
                    "format": "link"
                  },
                  "search_term": {
                    "label": "Search Term",
                    "format": "text"
                  }
                }
              }
            },
            "detailed": {
              "title": "Detailed View",
              "transformation": {
                "fields": [
                  "ad_id",
                  "page_name",
                  "page_id",
                  "page_url",
                  "ad_text",
                  "resolved_ad_text",
                  "template_tokens",
                  "title",
                  "caption",
                  "cta_text",
                  "link_url",
                  "link_description",
                  "display_format",
                  "start_date",
                  "end_date",
                  "days_running",
                  "status",
                  "is_active",
                  "media_type",
                  "media_url",
                  "image_urls",
                  "video_urls",
                  "publisher_platform",
                  "collation_count",
                  "collation_id",
                  "page_like_count",
                  "page_categories",
                  "advertiser_ig_username",
                  "advertiser_ig_followers",
                  "spend",
                  "impressions",
                  "reach_estimate",
                  "currency",
                  "byline",
                  "disclaimer_label",
                  "gated_type",
                  "regional_regulation_data",
                  "contains_digital_created_media",
                  "ad_snapshot_url",
                  "search_term",
                  "scraped_at"
                ]
              },
              "display": {
                "component": "table",
                "properties": {
                  "ad_id": {
                    "label": "Ad ID",
                    "format": "text"
                  },
                  "page_name": {
                    "label": "Page Name",
                    "format": "text"
                  },
                  "page_id": {
                    "label": "Page ID",
                    "format": "text"
                  },
                  "page_url": {
                    "label": "Page URL",
                    "format": "link"
                  },
                  "ad_text": {
                    "label": "Ad Text",
                    "format": "text"
                  },
                  "resolved_ad_text": {
                    "label": "Resolved Ad Text",
                    "format": "text"
                  },
                  "template_tokens": {
                    "label": "Template Tokens",
                    "format": "text"
                  },
                  "title": {
                    "label": "Title",
                    "format": "text"
                  },
                  "caption": {
                    "label": "Caption",
                    "format": "text"
                  },
                  "cta_text": {
                    "label": "CTA",
                    "format": "text"
                  },
                  "link_url": {
                    "label": "Link URL",
                    "format": "link"
                  },
                  "link_description": {
                    "label": "Link Description",
                    "format": "text"
                  },
                  "display_format": {
                    "label": "Display Format",
                    "format": "text"
                  },
                  "start_date": {
                    "label": "Started",
                    "format": "text"
                  },
                  "end_date": {
                    "label": "Ended",
                    "format": "text"
                  },
                  "days_running": {
                    "label": "Days Running",
                    "format": "text"
                  },
                  "status": {
                    "label": "Status",
                    "format": "text"
                  },
                  "is_active": {
                    "label": "Active",
                    "format": "text"
                  },
                  "media_type": {
                    "label": "Media Type",
                    "format": "text"
                  },
                  "media_url": {
                    "label": "Media URL",
                    "format": "link"
                  },
                  "image_urls": {
                    "label": "Image URLs",
                    "format": "text"
                  },
                  "video_urls": {
                    "label": "Video URLs",
                    "format": "text"
                  },
                  "publisher_platform": {
                    "label": "Platforms",
                    "format": "text"
                  },
                  "collation_count": {
                    "label": "Creative Reuse",
                    "format": "text"
                  },
                  "collation_id": {
                    "label": "Collation ID",
                    "format": "text"
                  },
                  "page_like_count": {
                    "label": "Page Likes",
                    "format": "text"
                  },
                  "page_categories": {
                    "label": "Page Categories",
                    "format": "text"
                  },
                  "advertiser_ig_username": {
                    "label": "IG Username",
                    "format": "text"
                  },
                  "advertiser_ig_followers": {
                    "label": "IG Followers",
                    "format": "text"
                  },
                  "spend": {
                    "label": "Spend",
                    "format": "text"
                  },
                  "impressions": {
                    "label": "Impressions",
                    "format": "text"
                  },
                  "reach_estimate": {
                    "label": "Reach Estimate",
                    "format": "text"
                  },
                  "currency": {
                    "label": "Currency",
                    "format": "text"
                  },
                  "byline": {
                    "label": "Paid For By",
                    "format": "text"
                  },
                  "disclaimer_label": {
                    "label": "Disclaimer",
                    "format": "text"
                  },
                  "gated_type": {
                    "label": "Gated Type",
                    "format": "text"
                  },
                  "regional_regulation_data": {
                    "label": "Regional Regulation",
                    "format": "text"
                  },
                  "contains_digital_created_media": {
                    "label": "AI Media",
                    "format": "text"
                  },
                  "ad_snapshot_url": {
                    "label": "Snapshot URL",
                    "format": "link"
                  },
                  "search_term": {
                    "label": "Search Term",
                    "format": "text"
                  },
                  "scraped_at": {
                    "label": "Scraped At",
                    "format": "text"
                  }
                }
              }
            },
            "euTransparency": {
              "title": "EU Transparency & Political Ads",
              "transformation": {
                "fields": [
                  "ad_id",
                  "page_name",
                  "byline",
                  "categories",
                  "spend",
                  "spend_lower_bound",
                  "spend_upper_bound",
                  "impressions",
                  "reach_estimate",
                  "currency",
                  "eu_total_reach",
                  "target_age_audience",
                  "target_gender_audience",
                  "target_location_audience",
                  "age_country_gender_reach_breakdown",
                  "payer_beneficiary",
                  "audience_age_gender",
                  "audience_location",
                  "audience_single_country",
                  "violation_types",
                  "is_violating_eu_siep",
                  "ad_snapshot_url",
                  "search_term"
                ]
              },
              "display": {
                "component": "table",
                "properties": {
                  "ad_id": {
                    "label": "Ad ID",
                    "format": "text"
                  },
                  "page_name": {
                    "label": "Page Name",
                    "format": "text"
                  },
                  "byline": {
                    "label": "Paid For By",
                    "format": "text"
                  },
                  "categories": {
                    "label": "Categories",
                    "format": "text"
                  },
                  "spend": {
                    "label": "Spend",
                    "format": "text"
                  },
                  "spend_lower_bound": {
                    "label": "Spend Min",
                    "format": "text"
                  },
                  "spend_upper_bound": {
                    "label": "Spend Max",
                    "format": "text"
                  },
                  "impressions": {
                    "label": "Impressions",
                    "format": "text"
                  },
                  "reach_estimate": {
                    "label": "Reach",
                    "format": "text"
                  },
                  "currency": {
                    "label": "Currency",
                    "format": "text"
                  },
                  "eu_total_reach": {
                    "label": "EU Reach",
                    "format": "text"
                  },
                  "target_age_audience": {
                    "label": "Target Ages",
                    "format": "text"
                  },
                  "target_gender_audience": {
                    "label": "Target Gender",
                    "format": "text"
                  },
                  "target_location_audience": {
                    "label": "Target Locations",
                    "format": "text"
                  },
                  "age_country_gender_reach_breakdown": {
                    "label": "Reach Breakdown",
                    "format": "text"
                  },
                  "payer_beneficiary": {
                    "label": "Payer / Beneficiary",
                    "format": "text"
                  },
                  "audience_age_gender": {
                    "label": "Audience Age/Gender",
                    "format": "text"
                  },
                  "audience_location": {
                    "label": "Audience Location",
                    "format": "text"
                  },
                  "audience_single_country": {
                    "label": "Country",
                    "format": "text"
                  },
                  "violation_types": {
                    "label": "Violations",
                    "format": "text"
                  },
                  "is_violating_eu_siep": {
                    "label": "EU SIEP Violation",
                    "format": "text"
                  },
                  "ad_snapshot_url": {
                    "label": "Snapshot URL",
                    "format": "link"
                  },
                  "search_term": {
                    "label": "Search Term",
                    "format": "text"
                  }
                }
              }
            }
          }
        }
      }
    },
    "buildNumber": "1.0.2",
    "imageDigest": "16bf73621048707945d1a4377ef5fea5d3df97b6c531931af42cb4e6202ca7d2",
    "actVersion": {
      "sourceType": "TARBALL",
      "buildTag": "latest",
      "versionNumber": "1.0"
    },
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0.1768511111111111
    }
  }
}