目標指定搜尋

根據一系列您在目標指定規格中提供的條件鎖定廣告組合。大部分目標都是預先定義的值,例如國家「Japan」或城市「Tokyo」。

使用推廣 API 的目標指定搜尋功能,以找出有效的值:https://graph.facebook.com/{API_VERSION}/search。您必須以 UTF8 格式提供查詢字串。

目標指定選項狀態

如要驗證指定目標物件的目前和/或已計劃狀態,請使用 targeting_option_list 參數:

curl -G \
  -d 'targeting_option_list=[<TARGETING_OPTION_ ID>,<TARGETING_OPTION_ID>]' 
  -d 'type=targetingoptionstatus'  
  https://graph.facebook.com/<API_VERSION>/search

回應:

{"data":[{"id":"<TARGETING_OPTION_ ID>","current_status":"NON-DELIVERABLE"},{"id":"<TARGETING_OPTION_ID>","current_status":"NON-DELIVERABLE","future_plan":[{"key":"2018-05-10T00:00:00+0000","value":"DEPRECATING"}]}]

傳回欄位

欄位

current_status

  • NORMAL
  • NON-DELIVERABLE:不會刊登,但廣告組合或會根據預先設定的規則繼續刊登。
  • DEPRECATING:根據此目標設定的廣告組合會繼續刊登,但物件不能用作建立新的廣告組合或更新廣告組合。更新後,除非您將此字詞刪除,否則系統將會拒絕含有此字詞的廣告組合。
  • INCLUSION-ONLY:物件不能用作目標設定排除。
  • UNKNOWN

future_plan

時戳與狀態的對應表。傳回日期和已計劃狀態的對應表,該表的值與 current_status 的可用值相同。

地理位置

type=adgeolocation 按國家/地區、國家/地區群組、城市、州份/省份、郵遞區號,以及其他地理區域搜尋目標。您可運用 type=adgeolocation 指定選填參數。如要找出美國的國碼:

curl -G \
  -d 'location_types=["country"]' \
  -d 'type=adgeolocation' \
  -d 'q=un' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應:

{
  "data": [
    {
      "key": "GB", 
      "name": "United Kingdom", 
      "type": "country", 
      "supports_city": false, 
      "supports_region": false
    }, 
    {
      "key": "AE", 
      "name": "United Arab Emirates", 
      "type": "country", 
      "supports_city": false, 
      "supports_region": false
    }, 
    {
      "key": "UM", 
      "name": "United States Minor Outlying Islands", 
      "type": "country", 
      "supports_city": false, 
      "supports_region": false
    }
  ]
}

key 是一個固定數字,每個類別中只得一個,例如國家/地區或國家/地區群組。其他欄位可能隨時變更,包括 name。運用 key 定義目標指定規格

在回應中:

  • 如果 supports_regiontrue,則代表這個國家/地區有地區代碼
  • 如果 supports_citytrue,則代表這個國家/地區有城市代碼
名稱 描述

location_types

類型:陣列

countrycountry_groupregioncityzipgeo_market,或 electoral_district,後者僅適用於美國。
建議使用 location_types 而非 type=adcountry 等。

region_id

類型:整數

要搜尋的地區

country_code

類型:字串

要搜尋的國家/地區:country_code=US

國家/地區

您可以指定的每個國家/地區都有國碼/區碼。type=adgeolocation&location_types=['country'] 的選填參數:

名稱 描述

q

類型:字串

自動完成值的字串。如要列出全部擁有 location_types=['country'] 的國家/地區,請將這個參數留空為 q=,並設定限制為大數值 limit=1000

match_country_code

類型:布林值

預設為 false

按國碼/區碼搜尋國家/地區。運用 country_codename 配對國家/地區

國家/地區群組

所有國家/地區群組都有提供代碼以便搜尋,以取得國家/地區名單。對於所有名稱為 mercosur 的國家/地區群組:

curl -G \
  -d 'location_types=["country_group"]' \
  -d 'type=adgeolocation' \
  -d 'q=mercosur' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應:

{
  "data": [
    {
      "key": "mercosur",
      "name": "Mercosur",
      "type": "country_group",
      "country_codes": [
        "BR",
        "AR",
        "UY",
        "PY",
        "VE"
      ],
      "is_worldwide": false,
      "supports_region": true,
      "supports_city": true
    }
  ]
}

如果 is_worldwidetrue,則代表此為全球國家/地區群組。如果 supports_regiontrue,則代表國家/地區群組有地區代碼。如果 supports_citytrue,則代表群組有城市代碼。

地區

如要搜尋所有以代碼 al 開頭的區域:

curl -G \
  -d 'location_types=["region"]' \
  -d 'type=adgeolocation' \
  -d 'q=al' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應:

{
  "data": [
    {
      "key": "3843",
      "name": "Alabama",
      "type": "region",
      "country_code": "US",
      "country_name": "United States",
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "3844",
      "name": "Alaska",
      "type": "region",
      "country_code": "US",
      "country_name": "United States",
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "527",
      "name": "Alberta",
      "type": "region",
      "country_code": "CA",
      "country_name": "Canada",
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "1089",
      "name": "Alsace",
      "type": "region",
      "country_code": "FR",
      "country_name": "France",
      "supports_region": true,
      "supports_city": true
    }
  ]
}

type=adgeolocation&location_types=['region'] 的適用選項:

名稱 描述

q

類型:字串

用以自動完成值的字串。如要取得全部帶有 location_types=['region'] 的國家/地區:請勿提供參數(q=),並設定限制為大數值(limit=1000

如果 supports_regiontrue,您可以指定此地區。如果 supports_citytrue,則代表地區有城市代碼。

城市

自 2019 年 3 月,我們將多個城市重新分類為其他角色,但您仍可繼續使用 city。而搜尋會傳回前身為城市的結果。

如要搜尋所有以 Manhattan 開頭的城市代碼:

curl -G \
     -d 'location_types=["city"]' \
     -d 'type=adgeolocation' \
     -d 'q=Manhattan' \
     -d 'access_token=ACCESS_TOKEN' \
     https://graph.facebook.com/VERSION/search

回應:

{
  "data": [
    {
      "key": "2447439",
      "name": "Manhattan",
      "type": "city",
      "country_code": "US",
      "country_name": "United States",
      "region": "Kansas",
      "region_id": 3859,
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "2439596",
      "name": "Manhattan",
      "type": "city",
      "country_code": "US",
      "country_name": "United States",
      "region": "Illinois",
      "region_id": 3856,
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "2479541",
      "name": "Manhattan",
      "type": "city",
      "country_code": "US",
      "country_name": "United States",
      "region": "Montana",
      "region_id": 3869,
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "2428908",
      "name": "Manhattan",
      "type": "city",
      "country_code": "US",
      "country_name": "United States",
      "region": "Florida",
      "region_id": 3852,
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "2703980",
      "name": "Manhattan",
      "type": "subcity",
      "country_code": "US",
      "country_name": "United States",
      "region": "New York",
      "region_id": 3875,
      "supports_region": true,
      "supports_city": true,
      "geo_hierarchy_level": "SUBCITY",
      "geo_hierarchy_name": "BOROUGH"
    },
   ...

如果 supports_region 是 true,則您可指定這個城市的地區。如果 supports_city 設定為 true,則您可將目標指定為這個城市。

地理區域

您也可以使用其他地理區域來指定目標。如下所述,其中一些區域尚未定義。

區域描述

LARGE_GEO_AREA

通常為覆蓋數百平方公里或更大面積的選區或省份。範例:LebanonAkkar

MEDIUM_GEO_AREA

通常為覆蓋多個城市的國家/地區。範例:United States 州份 Virginia 中的縣 Henrico

SMALL_GEO_AREA

通常為城市或城鎮附近的住宅區。範例:Spain 馬貝拉附近的 El Rosario

SUBCITY

例如行政區。範例:New YorkBrooklyn

NEIGHBORHOOD

城市內的區域。範例:TexasBarton Estates, Irving

SUBNEIGHBORHOOD

尚未可供使用。

METRO_AREA

環繞大都市的人口稠密區域。尚未可供使用。

地理區域層級如下所示(從大到小):

  • REGION
  • LARGE_GEO_AREA
  • MEDIUM_GEO_AREA
  • SMALL_GEO_AREA
  • METRO_AREA
  • CITY
  • SUBCITY
  • NEIGHBORHOOD
  • SUBNEIGHBORHOOD

郵遞區號

您亦可以搜尋郵遞區號,以在 Facebook 指定目標。搜尋郵遞區號時,我們建議同時使用 adgeolocationlocation_types=['zip']。請瀏覽 Meta 幫助中心 ,查看支援郵遞區號的國家/地區清單。

搜尋以 9 開頭的郵遞區號:

curl -G \
  -d 'location_types=["zip"]' \
  -d 'type=adgeolocation' \
  -d 'q=9' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/LATEST-API-VERSION/search

回應:

{
  "data": [
    {
      "key": "US:90028",
      "name": "90028",
      "type": "zip",
      "country_code": "US",
      "country_name": "United States",
      "region": "California",
      "region_id": 3847,
      "primary_city": "Los Angeles",
      "primary_city_id": 2420379,
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "US:94110",
      "name": "94110",
      "type": "zip",
      "country_code": "US",
      "country_name": "United States",
      "region": "California",
      "region_id": 3847,
      "primary_city": "San Francisco",
      "primary_city_id": 2421836,
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "US:94501",
      "name": "94501",
      "type": "zip",
      "country_code": "US",
      "country_name": "United States",
      "region": "California",
      "region_id": 3847,
      "primary_city": "Alameda",
      "primary_city_id": 2417628,
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "US:95190",
      "name": "95190",
      "type": "zip",
      "country_code": "US",
      "country_name": "United States",
      "region": "California",
      "region_id": 3847,
      "primary_city": "San Jose",
      "primary_city_id": 2421846,
      "supports_region": true,
      "supports_city": true
    }
  ]
}

地區

按地區設定代碼搜尋的可指定地區設定。如要搜尋所有以 en 開頭的地區設定:

curl -G \
  -d 'type=adlocale' \
  -d 'q=en' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應:

{
{
      "data": [
        {
          "key": 51, 
          "name": "English (Upside Down)"
        }, 
        {
          "key": 6, 
          "name": "English (US)"
        }, 
        {
          "key": 24, 
          "name": "English (UK)"
        }
      ]
    }
}
名稱 描述

q

類型:字串

用以自動完成值的字串。如要取得所有地區設定,請將這個參數留空為 q=,並設定限制為大數值 limit=1000

DMA 代碼

如要取得這些代碼,請在您的查詢中指定 type=adgeolocationlocation_types=['geo_market']。如要搜尋以「New」開頭的 DMA 代碼:

curl -G \
  -d 'location_types=["geo_market"]' \
  -d 'type=adgeolocation' \
  -d 'q=New' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

結果:

{
  "data": [
    {
      "key": "DMA:622",
      "name": "New Orleans",
      "type": "geo_market",
      "country_code": "US",
      "country_name": "United States",
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "DMA:501",
      "name": "New York",
      "type": "geo_market",
      "country_code": "US",
      "country_name": "United States",
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "DMA:533",
      "name": "Hartford &amp; New Haven",
      "type": "geo_market",
      "country_code": "US",
      "country_name": "United States",
      "supports_region": true,
      "supports_city": true
    },
    {
....
    }
  ]
}

選區

如要搜尋想指定目標的選區,請指定 type=adgeolocationlocation_types=['electoral_district']。如要搜尋加州的選區:

curl -G \
  -d 'location_types=["electoral_district"]' \
  -d 'type=adgeolocation' \
  -d 'q=California' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應:

{
  "data": [
    {
      "key": "US:CA14",
      "name": "California's 14th District",
      "type": "electoral_district",
      "country_code": "US",
      "country_name": "United States",
      "region": "California",
      "region_id": 3847,
      "supports_region": true,
      "supports_city": true
    },
    {
      "key": "US:CA02",
      "name": "California's 2nd District",
      "type": "electoral_district",
      "country_code": "US",
      "country_name": "United States",
      "region": "California",
      "region_id": 3847,
      "supports_region": true,
      "supports_city": true
    },
 ...
}

地理位置中繼資料

您能以 type=adgeolocationmeta 使用額外選填參數:

curl -G \
  -d 'cities=[2418779]' \
  -d 'zips=["US:90210"]' \
  -d 'countries=["US","JP"]' \
  -d 'regions=[10]' \
  -d 'type=adgeolocationmeta' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應為帶有指定地理位置中繼資料的 JSON 物件:

{
  "data": {
    "countries": {
      "US": {
        "key": "US", 
        "type": "country", 
        "name": "United States", 
        "supports_city": true, 
        "supports_region": true
      }, 
      "JP": {
        "key": "JP", 
        "type": "country", 
        "name": "Japan", 
        "supports_city": true, 
        "supports_region": true
      }
    }, 
    "regions": {
      "10": {
        "key": "10", 
        "type": "region", 
        "name": "Dubai", 
        "country_code": "AE", 
        "supports_city": true, 
        "supports_region": false
      }
    }, 
    "cities": {
      "2418779": {
        "key": "2418779", 
        "type": "city", 
        "name": "Danville", 
        "region_id": 3847, 
        "region": "California", 
        "country_code": "US", 
        "supports_city": true, 
        "supports_region": true
      }
    }, 
    "zips": {
      "US:90210": {
        "key": "US:90210", 
        "type": "zip", 
        "name": "90210", 
        "primary_city": "Beverly Hills", 
        "region_id": 3847, 
        "region": "California", 
        "country_code": "US", 
        "supports_city": true, 
        "supports_region": true
      }
    }
  }
}

選項:

名稱 描述

countries

類型:字串

國家/地區代碼陣列

regions

類型:整數

地區代碼陣列

country_groups

類型:字串

國家/地區群組代碼陣列

cities

類型:整數

城市鍵陣列

zips

類型:字串

完整的郵遞區號陣列。例如 US:92103

半徑建議

如要在特定地點指定目標,運用 suggested_radius 取得建議半徑範圍,以便接觸更多用戶:

curl -G \
  -d 'latitude=37.449478' \
  -d 'longitude=-122.173016' \
  -d 'type=adradiussuggestion' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應為帶 suggested_radiusdistance_unit 的 JSON 物件。

{
  "data": [
    {
      "suggested_radius": 10,
      "distance_unit": "mile"
    }
  ]
}

在指定 distance_unit 的情況下擷取 suggested_radius 的範例:

curl -G \
  -d 'latitude=37.449478' \
  -d 'longitude=-122.173016' \
  -d 'type=adradiussuggestion' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search
{
  "data": [
    {
      "suggested_radius": 16,
      "distance_unit": "kilometer"
    }
  ]
}

請使用以下參數:

名稱 描述

latitude

類型:浮點

此為必要項目。

地點的緯度

longitude

類型:浮點

此為必要項目。

地點的經度

distance_unit

類型:字串

此為選用項目。

量度單位,milekilometer

請參閱與建議一起使用的本地知名度廣告

興趣

傳送 GET 要求至 /search 端點,並將 type 設定至 adinterestq 設定至指定興趣,以便搜尋:

curl -G \
  -d 'type=adinterest' \
  -d 'q=baseball' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應會傳回以下欄位:

名稱 描述

id

整數

興趣目標指定的 Facebook 編號

locale

字串

如適用,以 language_TERRITORY 格式擷取特定地區語言的內容。預設為 en_US

name

字串

興趣名稱

path

字串陣列

包括目標指定的類別和任何母類別

興趣建議

傳送 GET 要求至 /search 端點,並將 type 設定至 adinterestsuggestion,以取得與您興趣相關的建議興趣清單。

查詢範例

curl -G \
  -d 'interest_list=["Basketball"]' \
  -d 'type=adinterestsuggestion' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/<API_VERSION>/search

回應範例

{
  "data": [
    {
      "id": "6003598240487",
      "name": "la biblia",
      "audience_size": 7419780,
      "path": [
  ],
      "description": null
   },
   {
      "id": "6003022269556",
      "name": "Rugby football",
      "audience_size": 13214830,
      "path": [
  ],
      "description": null
   },
   {
      "id": "6003146664949",
      "name": "Netball",
      "audience_size": 4333770,
      "path": [
  ],
"description": null
   },
   {
      "id": "6003013291881",
      "name": "Kaizer Chiefs F.C.",
      "audience_size": 1812850,
      "path": [
  ],
      "description": null
  },
  ....
  {
      "id": "6003400886535",
      "name": "espn sportscenter",
      "audience_size": 222960,
      "path": [
  ],
     "description": null
  },
  {
     "id": "6002925969459",
     "name": "watching movies",
     "audience_size": 4630950,
     "path": [
  ],
     "description": null
  },
  {
     "id": "6003214125247",
     "name": "lakers",
     "audience_size": 340360,
     "path": [
  ],
     "description": null
  }

選項包括:

名稱 描述

interest_list

類型:字串陣列

此為必要項目。

您需要取得建議的字詞清單。區分大小楷。

限制

  • 搜尋結果不會傳回所有可選用的興趣。
  • 您可隨時重新命名興趣,但這樣可能會導致無法按名稱驗證。因此,我們建議使用 interest_fbid_list 驗證興趣,而非使用名稱。使用 type=adinterestvalid 和需要驗證的興趣來查詢,以檢查字詞是否有效:
curl -G \
  -d 'interest_list=["Japan","nonexistantkeyword"]' \
  -d 'type=adinterestvalid' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應:

{
  "data": [
    {
      "name": "Japan",
      "valid": true,
      "id": 6003700426513,
      "audience_size": 68310258
    },
    {
      "name": "nonexistantkeyword",
      "valid": false
    }
  ]
}

選項:

名稱 描述

interest_list

類型:字串陣列

如果沒有 interest_fbid_list,此為必要項目。

要驗證的字詞清單。區分大小楷。

interest_fbid_list

類型:編號陣列

如果沒有 interest_list,此為必要項目。

要驗證的編號清單。

興趣

如要瀏覽可以指定為目標的興趣,傳送 GET 要求至 /search 端點,並將 type 設定為 adTargetingCategory,以及將 class 設定為 interests

curl -G \
  -d 'type=adTargetingCategory' \
  -d 'class=interests' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

限制

  • 搜尋結果不會傳回所有可選用的興趣。

行為

根據用戶的動作或之前的購買行為來指定目標。運用 type=adTargetingCategory&class=behaviors 擷取所有可能的行為目標指定選項。

curl -G \
  -d 'type=adTargetingCategory' \
  -d 'class=behaviors' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應包含以下內容:

名稱 描述

name

類型:字串

行為目標指定名稱

id

類型:整數

行為目標指定的 Facebook 編號

audience_size_lower_bound

整數

目標廣告受眾人數估計值下限

audience_size_upper_bound

整數

目標廣告受眾人數估計值上限

path

類型:字串陣列

類別及這個目標指定的任何母類別

description

類型:字串

描述目標廣告受眾

type

類型:字串

目標指定類別分類

人口統計資料

這個部分包括工作場所、教育程度、職位名稱類型及感情狀態類型。您亦可以根據最近時期的人生大事指定目標:3 個月、6 個月或 1 年。您可以按編號及名稱引用要指定的學校。

如要搜尋所有以 ha 開頭的學校:

curl -G \
  -d 'type=adeducationschool' \
  -d 'q=ha' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應:

 {
  "data": [
    {
      "name": "Harvard University", 
      "id": 105930651606,
      "coverage": 8395398,
      "subtext": "Cambridge, Massachusetts"
    }, 
    {
      "name": "Hajvery University", 
      "id": 148971135122588,
      "coverage": 124162
    }, 
    {
      "name": "Harvard-Westlake School", 
      "id": 107799365910274,
      "coverage": 14106
    }
  ]
}

在校主修科目

按編號及名稱指定主修科目。如要搜尋所有以 ph 開頭的主修科目:

curl -G \
  -d 'type=adeducationmajor' \
  -d 'q=ph' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應:

{
  "data": [
    {
      "name": "Photography", 
      "id": 108170975877442,
      "coverage": 613618
    }, 
    {
      "name": "Physics", 
      "id": 109279729089828,
      "coverage": 942491
    }, 
    {
      "name": "Philosophy", 
      "id": 108026662559095,
      "coverage": 701271
    }
  ]
}

僱主

按編號及名稱引用可指定的僱主。如要搜尋所有以 mic 開頭的僱主:

curl -G \
  -d 'type=adworkemployer' \
  -d 'q=mic' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應:

{
  "data": [
    {
      "name": "Western Michigan University", 
      "id": 10022826163,
      "coverage": 24366
    }, 
    {
      "name": "University of Michigan", 
      "id": 21105780752,
      "coverage": 17357
    }, 
    {
      "name": "Michigan State University - SPARTANS", 
      "id": 8891783019,
      "coverage": 65853
    }
  ]
}

職位名稱

每種自稱而且可指定的職位名稱都有編號和名稱。如要獲取所有包含 Business Analyst 的職位名稱:

curl -G \
  -d 'type=adworkposition' \
  -d 'q=Business Analyst' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v<API_VERSION>/search

回應:

{
   "data": [
    {
      "name": "Business Analyst", 
      "id": 105763692790962,
      "coverage": 282124
    }, 
    {
      "name": "Financial Analyst", 
      "id": 112930925387573,
      "coverage": 212889
    }
  ]
}

回應含有以下欄位:

名稱 描述

name

類型:字串

人口統計目標指定的名稱

id

類型:整數

人口統計目標指定的 Facebook 編號

coverage

類型:整數

目標廣告受眾人數估值

subtext

類型:字串

目標廣告受眾描述


以下列出這個 API 的常見參數。如果是類型專用的輸入參數,請參閱以下詳細資料。

參數名稱 描述

q

此為大部分搜尋類型的必要項目。

用以自動完成值的字串。

type

此為必要項目。

要擷取的自動完成數據類型。詳情請參閱下文

list

此為選用項目。

擷取偏好的 Facebook 全球編號,而不是 FIPS 程式碼。支援 adzipcode

使用時,值須為 GLOBAL

limit

此為選用項目。

最多可傳回的結果,預設為 8 個

根據自動完成數據的類別,提供合適的 type。如要擷取地區,請指定 type=adlocale。有效類別為:

「type」參數的值 描述

adeducationschool

自動完成大專院校目標指定

adeducationmajor

自動完成大專院校主修科目目標指定

adgeolocation

自動完成國家/地區、城市、州份及郵遞區號組合

adgeolocation.adcountry

自動完成國家/地區

adgeolocation.adzipcode

自動完成郵遞區號

adgeolocation.adgeolocationmeta

地理位置的額外中繼資料

adgeolocation.adradiussuggestion

傳回建議地點的半徑

adinterest

自動完成地區設定的目標指定

adinterest.adinterestsuggestion

根據興趣目標指定提供的建議

adinterest.adinterestvalid

將字串驗證為有效興趣目標指定選項

adlocale

自動完成地區設定的目標指定

adTargetingCategory

忽略參數「q」。使用參數「class」查看全部可能的類別目標指定選項。
class 的可能值為:interestsbehaviorsdemographicslife_eventsindustriesincomefamily_statusesuser_deviceuser_os

adworkemployer

僱主的自動完成值

adworkposition

職位名稱的自動完成值

人口統計瀏覽

使用 type=adTargetingCategoryclass 擷取全部可能的人口統計目標指定選項。

名稱 描述

class

類型:字串

指定一個:life_eventsindustriesincomefamily_statusesuser_device。指定 demographics 即可擷取所有。


並非所有國家/地區都可使用人口統計目標指定選項。視乎用戶(其存取憑證用於作出這次 API 呼喚)的所在國家/地區設定,Facebook 可能會傳回不同結果,包括空白結果。

回應將包含以下欄位:

名稱 描述

name

類型:字串

人口統計目標指定名稱

id

類型:整數

人口統計目標指定 Facebook 編號

audience_size_lower_bound

整數

目標廣告受眾人數估計值下限

audience_size_upper_bound

整數

目標廣告受眾人數估計值上限

description

類型:字串

目標廣告受眾描述

type

類型:字串

人口統計類型。如果您擷取所有人口統計資料,這項就很有用。

path

類型:字串陣列

包括類別以及目標指定隸屬的任何母類別