目標設定搜尋

根據您在目標設定規格中提供的多項條件,鎖定廣告組合。大部分的目標是預先定義的值,例如「日本」國家或「東京」城市。

使用「行銷 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_marketelectoral_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 StatesVirginia 州的 Henrico

SMALL_GEO_AREA

一般稱為住宅區,靠近城市或城鎮。範例:Spain 鄰近馬爾貝拉(Marbella)的 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

類型:字串

選用項目。

度量單位,英里(mile)或公里(kilometer

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

興趣

傳送一項 GET 要求至 /search 端點,並將 type 設為 adinterest、將 q 設為要搜尋的特定興趣:

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 要設為 adTargetingCategoryclass 要設為 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

類型:字串陣列

包括目標設定隸屬的類別及任何上層類別