定位选项
GET targeting_criteria/app_store_categories¶
了解基于应用商店类别的推广产品可用定位标准。应用商店类别仅适用于 iOS App Store 和 Google Play 商店。
已安装应用类别定位允许根据用户已安装或表示感兴趣的应用类别来定位用户。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/app_store_categories
参数¶
名称 | 说明 |
---|---|
q 可选 |
用于确定定位标准范围的可选查询。忽略此参数可检索所有结果。 类型:string 示例: |
os_type 可选 |
根据特定应用商店确定结果的范围。 类型:enum 可能值: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/app_store_categories?q=music&os_type=IOS
响应示例¶
{
"data": [
{
"name": "Games: Music",
"targeting_type": "APP_STORE_CATEGORY",
"targeting_value": "qouq",
"os_type": "IOS"
},
{
"name": "Music",
"targeting_type": "APP_STORE_CATEGORY",
"targeting_value": "qov2",
"os_type": "IOS"
}
],
"request": {
"params": {
"q": "music",
"os_type": "IOS"
}
}
}
GET targeting_criteria/conversations¶
了解基于对话的推广产品可用定位标准。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/conversations
参数¶
名称 | 说明 |
---|---|
conversation_type 可选 |
用于确定某些对话类型范围的可选查询。 类型:enum 可能值: |
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 200 最小值、最大值: 1 、1000 |
cursor 可选 |
指定光标以获取下一页结果。参阅分页了解更多信息。 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/conversations?count=2
响应示例¶
{
"request": {
"params": {
"count": 2
}
},
"next_cursor": "1f7m7",
"data": [
{
"targeting_type": "CONVERSATION",
"targeting_value": "a1",
"name": "NFL",
"conversation_type": "SPORTS"
},
{
"targeting_type": "CONVERSATION",
"targeting_value": "a2",
"name": "NBA",
"conversation_type": "SPORTS"
}
]
}
GET targeting_criteria/devices¶
了解基于设备的推广产品可用定位标准。设备定位适用于推广推文。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/devices
参数¶
名称 | 说明 |
---|---|
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 200 最小值、最大值: 1 、1000 |
q 可选 |
用于确定定位标准范围的可选查询。忽略此参数可检索所有结果。 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/devices?count=2&q=iphone
响应示例¶
{
"data": [
{
"name": "iPhone 3GS",
"manufacturer": "Apple",
"os_type": "iOS",
"targeting_value": "1q",
"targeting_type": "DEVICE"
},
{
"name": "iPhone 4",
"manufacturer": "Apple",
"os_type": "iOS",
"targeting_value": "1r",
"targeting_type": "DEVICE"
}
],
"request": {
"params": {
"q": "iphone",
"count": 2
}
}
}
GET targeting_criteria/events¶
了解基于事件的推广产品可用定位标准。每个行项目只能定位一个事件。
注意:事件往往跨越不同时区,导致从跨时区角度考虑事件时间非常复杂。为简单起见,无论事件处于哪个区域和时区,此端点上的所有事件 start_time
和 end_time
的值都以 UTC±00:00 时间表示。在查询事件 start_time
和 end_time
的值以及与之交互时,应牢记这种设计。例如,美国的独立日在 UTC±00:00 中表示为 start_time=2017-07-04T00:00:00Z
和 end_time=2017-07-05T00:00:00Z
,这样可以避免美国境内多个时区共度这一假期的问题。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/events
参数¶
名称 | 说明 |
---|---|
event_types 必需 |
用于确定某些事件类型范围的可选查询。 类型:enum 可能值: |
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 200 最小值、最大值: 1 、1000 |
country_codes 可选 |
可选查询,用于将定位标准搜索范围限定为具有 2 个字母的 ISO 国家/地区代码的特定国家/地区。如果未指定此参数,将返回所有事件。 类型:string |
cursor 可选 |
指定光标以获取下一页结果。参阅分页了解更多信息。 类型:string 示例: |
end_time 可选 |
广告活动结束时间,以 ISO 8601 表示。 类型:string 示例: |
start_time 可选 |
行项目将开始投放的时间,以 ISO 8601 表示。 注意:默认为当前时间。 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/events?count=1
响应示例¶
{
"request": {
"params": {
"count": 1
}
},
"data_type": "events",
"data": [
{
"reach": {
"total_reach": null
},
"name": "New Year's",
"start_time": "2017-12-31T00:00:00Z",
"top_users": [],
"top_tweets": [],
"top_hashtags": [],
"gender_breakdown_percentage": {},
"end_time": "2018-01-02T00:00:00Z",
"country_code": null,
"device_breakdown_percentage": {},
"targeting_value": "1ex",
"is_global": true,
"event_type": "HOLIDAY",
"country_breakdown_percentage": {}
}
],
"next_cursor": "uww0"
}
GET targeting_criteria/interests¶
了解基于兴趣的推广产品可用定位标准。兴趣不常更改,但我们建议你至少每周刷新一次此列表。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/interests
参数¶
名称 | 说明 |
---|---|
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 200 最小值、最大值: 1 、1000 |
cursor 可选 |
指定光标以获取下一页结果。参阅分页了解更多信息。 类型:string 示例: |
q 可选 |
用于确定定位标准范围的可选查询。忽略此参数可检索所有结果。 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/interests?q=books
响应示例¶
{
"data": [
{
"name": "Books and literature/Biographies and memoirs",
"targeting_type": "INTEREST",
"targeting_value": "1001"
}
],
"request": {
"params": {
"q": "books",
"count": 1
}
},
"next_cursor": "6by4n4"
}
GET targeting_criteria/languages¶
了解可用定位语言。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/languages
参数¶
名称 | 说明 |
---|---|
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 200 最小值、最大值: 1 、1000 |
cursor 可选 |
指定光标以获取下一页结果。参阅分页了解更多信息。 类型:string 示例: |
q 可选 |
用于确定定位标准范围的可选查询。忽略此参数可检索所有结果。 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/languages?q=english
响应示例¶
{
"data": [
{
"name": "English",
"targeting_type": "LANGUAGE",
"targeting_value": "en"
}
],
"request": {
"params": {
"q": "english"
}
},
"next_cursor": null
}
GET targeting_criteria/locations¶
了解基于位置的推广产品可用定位标准。地理定位适用于国家/地区级别、州/地区级别、城市级别和邮政编码级别的推广账号和推广推文。若要检索邮政编码级别的分析结果,则必须使用邮政编码定位。
注意:要检索特定的可定位城市,例如旧金山或纽约,请使用带有 location_type
请求参数的 CITIES
枚举值。
要定位指定市场区域 (DMA),请使用 METROS
枚举值。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/locations
参数¶
名称 | 说明 |
---|---|
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 200 最小值、最大值: 1 、1000 |
country_code 可选 |
可选查询,用于将定位标准搜索范围限定为具有 2 个字母的 ISO 国家/地区代码的特定国家/地区。忽略此参数可检索所有国家/地区的结果。 类型:string 示例: |
cursor 可选 |
指定光标以获取下一页结果。参阅分页了解更多信息。 类型:string 示例: |
location_type 可选 |
根据特定位置类型确定结果的范围。某些位置可能不提供比 类型:enum 可能值: |
q 可选 |
用于确定定位标准搜索范围的可选查询。忽略此参数可检索所有结果。 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/locations?location_type=CITIES&q=los angeles
响应示例¶
{
"data": [
{
"name": "Los Angeles, Los Angeles CA, CA, USA",
"country_code": "US",
"location_type": "CITIES",
"targeting_value": "3b77caf94bfc81fe",
"targeting_type": "LOCATION"
},
{
"name": "East Los Angeles, Los Angeles CA, CA, USA",
"country_code": "US",
"location_type": "CITIES",
"targeting_value": "67571a7baaa5906b",
"targeting_type": "LOCATION"
},
{
"name": "Lake Los Angeles, Los Angeles CA, CA, USA",
"country_code": "US",
"location_type": "CITIES",
"targeting_value": "ea9bfbd43c93400f",
"targeting_type": "LOCATION"
},
{
"name": "Los Gatos, San Francisco-Oakland-San Jose CA, CA, USA",
"country_code": "US",
"location_type": "CITIES",
"targeting_value": "a2de7c70b82b0ca0",
"targeting_type": "LOCATION"
},
{
"name": "Los Altos, Monterey-Salinas CA, CA, USA",
"country_code": "US",
"location_type": "CITIES",
"targeting_value": "6a4364ea6f987c10",
"targeting_type": "LOCATION"
},
{
"name": "Los Banos, CA, USA",
"country_code": "US",
"location_type": "CITIES",
"targeting_value": "b1b6fc646de75904",
"targeting_type": "LOCATION"
},
{
"name": "Los Alamitos, Los Angeles CA, CA, USA",
"country_code": "US",
"location_type": "CITIES",
"targeting_value": "0799ff0a3c1006e9",
"targeting_type": "LOCATION"
},
{
"name": "Los Angeles, US",
"country_code": "US",
"location_type": "CITIES",
"targeting_value": "019940ae78c7b3bc",
"targeting_type": "LOCATION"
}
],
"request": {
"params": {
"location_type": "CITIES",
"q": "los angeles"
}
},
"next_cursor": null
}
GET targeting_criteria/network_operators¶
了解基于网络运营商的推广产品可用定位标准。
通过此端点,可在多个国家/地区查找可定位的运营商,例如 AT&T、Verizon、Sprint、T-Mobile 等。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/network_operators
参数¶
名称 | 说明 |
---|---|
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 200 最小值、最大值: 1 、1000 |
country_code 可选 |
可选查询,用于将定位标准搜索范围限定为具有 2 个字母的 ISO 国家/地区代码的特定国家/地区。如果未指定此参数,则仅返回美国的合作伙伴受众。 类型:string 默认值: |
cursor 可选 |
指定光标以获取下一页结果。参阅分页了解更多信息。 类型:string 示例: |
q 可选 |
用于确定定位标准搜索范围的可选查询。忽略此参数可检索所有结果。 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/network_operators?count=5&country_code=US
响应示例¶
{
"data": [
{
"country_code": "US",
"targeting_type": "NETWORK_OPERATOR",
"name": "Advantage",
"targeting_value": "2l"
},
{
"country_code": "US",
"targeting_type": "NETWORK_OPERATOR",
"name": "Aeris",
"targeting_value": "1b"
},
{
"country_code": "US",
"targeting_type": "NETWORK_OPERATOR",
"name": "Airadigm",
"targeting_value": "2t"
},
{
"country_code": "US",
"targeting_type": "NETWORK_OPERATOR",
"name": "Airlink PCS",
"targeting_value": "14"
},
{
"country_code": "US",
"targeting_type": "NETWORK_OPERATOR",
"name": "Airpeak",
"targeting_value": "1i"
}
],
"request": {
"params": {
"country_code": "US",
"count": 5
}
},
"next_cursor": "o7x9iet1a5u608olj4"
}
GET targeting_criteria/platform_versions¶
了解基于移动 OS 版本的推广产品可用定位标准。平台版本定位适用于推广账号和推广推文。它可用于定位到移动操作系统版本的修正版本,如 Android 8.0 或 iOS 10.0。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/platform_versions
参数¶
名称 | 说明 |
---|---|
q 可选 |
用于确定定位标准搜索范围的可选查询。忽略此参数可检索所有结果。 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/platform_versions
响应示例¶
{
"data": [
{...},
{
"name": "Ice Cream Sandwich",
"number": "4.0",
"os_type": "Android",
"targeting_type": "PLATFORM_VERSION",
"targeting_value": "17"
},
{
"name": "Jelly Bean",
"number": "4.1",
"os_type": "Android",
"targeting_type": "PLATFORM_VERSION",
"targeting_value": "18"
},
{...}
],
"data_type": "targeting_criterion",
"request": {
"params": {}
}
}
GET targeting_criteria/platforms¶
了解基于平台的推广产品可用定位标准。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/platforms
参数¶
名称 | 说明 |
---|---|
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 200 最小值、最大值: 1 、1000 |
q 可选 |
用于确定定位标准搜索范围的可选查询。忽略此参数可检索所有结果。 类型:string 示例: |
lang 可选 |
使用 ISO-639-1 语言代码。传递后,将在响应中返回另一个 localized_name 属性。 类型:int、string 示例: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/platforms
响应示例¶
{
"data": [
{
"name": "iOS",
"targeting_type": "PLATFORM",
"targeting_value": "0"
},
{
"name": "Android",
"targeting_type": "PLATFORM",
"targeting_value": "1"
},
{
"name": "BlackBerry phones and tablets",
"targeting_type": "PLATFORM",
"targeting_value": "2"
},
{
"name": "Mobile web on other devices",
"targeting_type": "PLATFORM",
"targeting_value": "3"
},
{
"name": "Desktop and laptop computers",
"targeting_type": "PLATFORM",
"targeting_value": "4"
}
],
"request": {
"params": {}
}
}
GET targeting_criteria/tv_markets¶
了解基于电视市场的推广产品可用定位标准。按区域返回市场,可用于查询 GET targeting_criteria / tv_shows 端点。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/tv_markets
参数¶
无
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/tv_markets
响应示例¶
{
"data": [
{
"name": "France",
"country_code": "FR",
"locale": "fr-FR"
},
{
"name": "Chile",
"country_code": "CL",
"locale": "es-CL"
},
{
"name": "Germany",
"country_code": "DE",
"locale": "de-DE"
},
{
"name": "Netherlands",
"country_code": "NL",
"locale": "nl-NL"
},
{
"name": "United States",
"country_code": "US",
"locale": "en-US"
},
{
"name": "Venezuela",
"country_code": "VE",
"locale": "es-VE"
},
{
"name": "Brazil",
"country_code": "BR",
"locale": "pt-BR"
},
{
"name": "Mexico",
"country_code": "MX",
"locale": "es-MX"
},
{
"name": "Colombia",
"country_code": "CO",
"locale": "es-CO"
},
{
"name": "United Kingdom",
"country_code": "GB",
"locale": "en-GB"
},
{
"name": "Argentina",
"country_code": "AR",
"locale": "es-AR"
},
{
"name": "Japan",
"country_code": "JP",
"locale": "ja-JP"
},
{
"name": "Canada",
"country_code": "CA",
"locale": "en-CA"
},
{
"name": "Spain",
"country_code": "ES",
"locale": "es-ES"
},
{
"name": "Italy",
"country_code": "IT",
"locale": "it-IT"
},
{
"name": "United States - Hispanic",
"country_code": "US",
"locale": "es-US"
},
{
"name": "Ireland",
"country_code": "IE",
"locale": "en-IE"
}
],
"request": {
"params": {}
}
}
GET targeting_criteria/tv_shows¶
了解基于电视节目的推广产品可用定位标准。在某些市场,电视节目定位适用于推广推文。有关可用市场,请参阅 GET targeting_criteria/tv_markets 端点。
注意:对于所有用户少于 1,000 个的受众,其 estimated_users
值都将显示为 1000
。
注意:目前已不再支持电视频道和类型定位选项。
资源 URL¶
https://ads-api.twitter.com/10/targeting_criteria/tv_shows
参数¶
名称 | 说明 |
---|---|
locale 必需 |
指定 tv_market_locale 以查询可用电视节目,为必需参数。根据 GET targeting_criteria/tv_markets 返回的 类型:string 示例: |
count 可选 |
指定每个不同请求尝试检索的记录数量。 类型:int 默认值: 50 最小值、最大值: 1 、50 |
cursor 可选 |
指定光标以获取下一页结果。参阅分页了解更多信息。 类型:string 示例: |
q 可选 |
用于确定定位标准搜索范围的可选查询。忽略此参数可检索所有结果。 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/10/targeting_criteria/tv_shows?locale=en-US&q=news&count=1
响应示例¶
{
"data": [
{
"name": "NewsWatch",
"targeting_value": 10027243420,
"genre": "PAID",
"locales": [
{
"language": "en",
"country": "US"
}
]
}
],
"next_cursor": "c-22838-zdQDJrTxSvOYfQOhb2IlGQ",
"request": {
"params": {
"locale": {
"countryCode": "US",
"languageCode": "en"
},
"count": 1,
"q": "news"
}
}
}