타게팅 검색

타게팅 사양의 여러 기준에 따라 광고 세트를 타게팅합니다. 대부분 타겟은 사전에 정의된 값입니다(예: 국가 '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

유형: 배열

country, country_group, region, city, zip, geo_market 또는 electoral_district(마지막 항목은 미국에만 해당)
location_typestype=adcountry 등 항목보다 선호됩니다.

region_id

유형: 정수

검색할 지역

country_code

유형: 문자열

검색할 국가: country_code=US

국가

타게팅이 가능한 국가는 모두 국가 코드가 있습니다. type=adgeolocation&location_types=['country']의 선택적 매개변수는 다음과 같습니다.

이름 설명

q

유형: 문자열

값을 자동 완성하는 문자열. location_types=['country']가 있는 모든 국가를 나열하려면 q=를 공백으로 두고 큰 숫자로 제한을 설정해야 합니다(예: limit=1000).

match_country_code

유형: 부울

기본값은 false입니다.

국가 코드로 국가를 찾습니다. name에 대해 country_code 기준으로 국가를 매칭합니다.

국가 그룹

모든 국가 그룹은 검색 가능한 코드가 있으며, 국가 리스트를 가져올 수 있습니다. 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_citytrue로 설정되어 있으면 이 도시를 타게팅할 수 있습니다.

지역

타게팅에 사용할 수 있는 다른 지역이 있습니다. 아래에 언급했듯이 일부 지역은 아직 정의되지 않았습니다.

영역설명

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에서 타게팅할 우편번호를 검색할 수 있습니다. 우편번호를 검색할 때는 location_types=['zip']을 포함한 adgeolocation을 권장합니다. 지원되는 우편번호를 사용하는 국가의 리스트는 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 코드

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 엔드포인트로 보냅니다. typeadinterest로 설정하고, q는 검색할 관심사로 설정합니다.

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

응답에는 다음 필드가 반환됩니다.

이름 설명

id

정수

관심사 타게팅의 Facebook ID

locale

문자열

가능할 경우 language_TERRITORY 형식을 사용해 특정 로캘의 언어로 콘텐츠를 검색합니다. 기본값은 en_US입니다.

name

문자열

관심사 이름

path

문자열 배열

타게팅을 위한 카테고리와 모든 상위 카테고리 포함

관심사 추천

GET 요청을 /search 엔드포인트로 보냅니다. typeadinterestsuggestion으로 설정하여 관심사와 관련된 추천 관심사 리스트를 가져옵니다.

쿼리 샘플

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

유형: ID 배열

interest_list가 없을 경우 필수 항목.

검증할 ID 리스트

관심사

타게팅 가능한 관심사를 둘러보려면 GET 요청을 /search 엔드포인트로 보냅니다. 이때 typeadTargetingCategory로 설정하고 classinterests로 설정합니다.

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 ID

audience_size_lower_bound

정수

예상 하한 타겟 대상 규모

audience_size_upper_bound

정수

예상 상한 타겟 대상 규모

path

유형: 문자열 배열

이 타게팅을 위한 카테고리와 모든 상위 카테고리

description

유형: 문자열

타겟 대상에 대한 설명

type

유형: 문자열

타게팅 카테고리 클래스

인구 통계학적 특성

직장, 교육, 직무 유형, 결혼/연애 상태 유형을 포함합니다. 최근에 발생한 중요 이벤트(3개월, 6개월, 1년 단위)에 따라 타게팅할 수도 있습니다. ID와 이름으로 타게팅할 학교를 참조할 수 있습니다.

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
    }
  ]
}

학교 전공

ID와 이름으로 전공을 타게팅합니다. 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
    }
  ]
}

직장 고용주

타게팅 가능한 고용주를 ID와 이름으로 참조합니다. 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
    }
  ]
}

직책

자체 선언하고 타게팅 가능한 모든 직책은 ID와 이름이 있습니다. 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 ID

coverage

유형: 정수

예상 타겟 대상 규모

subtext

유형: 문자열

타겟 대상에 대한 설명


다음은 이 API의 공통 매개변수입니다. 유형별 입력 매개변수는 아래의 자세한 정보를 참조하세요.

매개변수 이름 설명

q

대부분 검색 유형에 필수 항목.

값을 자동 완성하는 문자열.

type

필수 항목.

검색할 자동 완성 데이터 유형. 아래를 참조하세요.

list

선택 사항.

FIPS 코드 대신 선호하는 Facebook 글로벌 ID를 검색합니다. 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의 가능한 값은 interests, behaviors, demographics, life_events, industries, income, family_statuses, user_device, user_os입니다.

adworkemployer

직장 고용주에 대한 자동 완성 값

adworkposition

직무에 대한 자동 완성 값

인구 통계학적 특성 둘러보기

type=adTargetingCategoryclass를 사용하여 모든 가능한 인구 통계학적 특성 타게팅 옵션을 검색합니다.

이름 설명

class

유형: 문자열

life_events, industries, income, family_statuses, user_device 중 하나를 지정합니다. demographics를 지정하여 모두 검색합니다.


일부 국가에는 인구 통계학적 특성 타게팅 옵션이 제공되지 않습니다. Facebook은 이 API를 호출하는 데 사용한 액세스 토큰이 발급된 사용자의 본국 설정에 따라 빈 결과가 나오는 등 서로 상이한 결과를 반환할 수 있습니다.

응답에는 다음 필드가 포함됩니다.

이름 설명

name

유형: 문자열

인구 통계학적 특성 타게팅의 이름

id

유형: 정수

인구 통계학적 특성 타게팅의 Facebook ID

audience_size_lower_bound

정수

예상 하한 타겟 대상 규모

audience_size_upper_bound

정수

예상 상한 타겟 대상 규모

description

유형: 문자열

타겟 대상에 대한 설명

type

유형: 문자열

인구 통계학적 특성의 유형 (모든 인구 통계학적 특성을 검색할 때 유용함)

path

유형: 문자열 배열

타게팅이 속한 카테고리와 모든 상위 카테고리 포함