The Subscribed Links API provides a number of common object types that you can use in your queries. For example, if you want your Subscribed Links to respond to search queries like "badminton clubs in Milpitas", you can use the [City] special object type as shown:
<Query>badminton clubs in [City]</Query>
Unlike the object types that you create, these special object types do not require you to create supporting data objects.
This reference page assumes that you know how to create object types, and use response attributes.
Contents
The Subscribed Links API provides the following special object types:
The object type [City] matches names of cities and towns in the United States and Canada. It accepts queries in the form of city name and state or province name. Large cities do not need to be accompanied by the state or province. So, for example, the following Query element matches user queries like "elevation of San Francisco", "elevation of Springfield, IL ", and so on.
<Query>elevation of [City]</Query>
The resulting extracted objects have the following response attributes:
fullname - The full name of the city and its state or province. For example, the extracted objects would take the form of: "San Francisco, California" or "Vancouver, British Columbia".
abbrev - The name of the city appended to the state or province abbreviation. City names composed of multiple words should be concatenated. For example, the extracted objects would take the form of: "SanFranciscoCA".
zipcode - A zip code in the city. For example, the extracted objects would take the form of: 94555.
Countries
The object type [Country] matches names of countries. For example, the following Query element matches user queries like "GDP of Germany", "GDP of Kazakhstan", and so on.
<Query>gdp of [Country]</Query>
The resulting extracted objects have the following
result attributes:
fullname - The full name of the country. For example, the extracted objects would take the form of: "Italy".
code_n - The ISO 3166-1 numeric code for the country. For example, the extracted objects would take the form of: "380".
code_a2 - The ISO 3166-1 alpha-2 code for the country. For example, the extracted objects would take the form of: "IT".
code_a3 - The ISO 3166-1 alpha-3 code for the country. For example, the extracted objects would take the form of: "ITA".
tld - The Internet top level domain code for the country. For example, the extracted objects would take the form of: ".it".
Dates
The object type [date]matches dates in US-English format. It accepts search queries in mm/dd/yy (06/16/07), mm/dd/yyyy (06/16/2007), or month day and year (June 16, 2007) formats. For example, the following Query element matches queries like "sunset on December 12".
<Query>sunset on [date]</Query>
The resulting extracted objects have the following
result attributes:
year - The year in four digits.
mon - The month in numeric form (1-12).
mon_name - The name of the month (January-December).
mday - The day of the month (1-31).
wday - The day of the week in numeric form (1 = Sunday, 7 = Saturday).
wday_name -The name of the weekday (Monday, Tuesday, and so on).
Time
The object type[timeofday]matches times. It accepts search queries in 12-hour or 24-hour formats. For example, the following Query element matches queries like "shows starting 3 pm".
<Query>shows starting [timeofday]</Query>
The resulting extracted objects have the following
result attributes:
hour_24 - The hour on a 24-hour clock (0-23).
hour_12 - The hour on a 12-hour clock (1-12).
ampm - The meridiem ("AM" or "PM").
min - The minute (0-59).
sec -The second (0-59).
Range of Time
The object type [timerange] matches a range of times in 12-hour or 24-hour format. For example, the following Query element matches queries like "trains between 12:00 and 13:00".
<Query>trains between [timerange]</Query>
The resulting extracted objects for the beginning and the end of the time range have the following
result attributes:
start_hour_24 and finish_hour_24 - The beginning and end of the time range on a 24-hour clock (0-23).
start_hour_12 and finish_hour_12 - The beginning and end of the time range on a 12-hour clock (1-12).
start_ampm and finish_ampm - The beginning and end of the time range in meridiem ("AM" or "PM").
start_min and finish_min - The beginning and end of the time range in minutes (0-59).
start_sec and finish_sec -The beginning and end of the time range in seconds (0-59).