search Service (com.ibi.agents.XDTwitterSearch)

Syntax:

com.ibi.agents.XDTwitterSearch

iIT Service Object:

format: search

Description: Returns a collection of relevant Tweets matching a specified query.

Parameters:

Parameter

Description

Query *

A UTF-8, URL-encoded search query of 500 characters maximum, including operators. Queries may additionally be limited by complexity.

Lang

Restricts tweets to the given language, given by an ISO 639-1 two-letter code. Language detection is best-effort.

Locale

Specifies the language of the query you are sending (only ja is currently effective). This is intended for language-specific consumers, and the default should work in the majority of cases.

Max ID

Returns results with an ID less than (that is, older than) or equal to the specified ID.

Since ID

Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of tweets which can be accessed through the API. If the limit of tweets has occurred since the since_id, the since_id will be forced to the oldest ID available.

Count

The number of tweets to return per page, up to a maximum of 100. The defaults is 15. This was formerly the parameter in the old Search API.

Result Type

Optional. Specifies what type of search results you would prefer to receive. The current default is mixed. Valid values include:

  • mixed - Include both popular and real time results in the response.
  • recent - return only the most recent results in the response.
  • popular - return only the most popular results in the response.

Until

Returns tweets created before the given date. Date should be formatted as YYYY-MM-DD. Keep in mind that the search index has a seven-day limit. In other words, no tweets will be found for a date older than one week.

Geocode

Returns tweets by users located within a given radius of the given 'latitude,longitude'. The location is preferentially taken from the Geotagging API, but will fall back to their Twitter profile. The parameter value is specified by 'latitude,longitude,radius', where radius units must be specified as either mi (miles) or km (kilometers). Note that you cannot use the near operator via the API to geocode arbitrary locations. However, you can use this geocode parameter to search near geocodes directly. A maximum of 1,000 distinct sub-regions will be considered when using the radius modifier.

Radius

The radius to be used in the geocode.

Units

The unit of measurement of the given radius. Can be mi (miles) or km (kilometers). Miles is the default.

Consumer Key *

Is your Twitter Application Consumer Key. If you don't have this information, please go to http://dev.twitter.com. Sign in with your Twitter account, Choose My Applications and click Create a New Application then follow the prompts to get Consumer Key, Consumer Secret, Access Token, and Access Token Secret.

Consumer Secret *

Is your Twitter Application Consumer Secret. If you don't have this information, please go to http://dev.twitter.com. Sign in with your Twitter account, Choose My Applications and click Create a New Application then follow the prompts to get Consumer Key, Consumer Secret, Access Token, and Access Token Secret.

Access Token *

Is your Twitter Application Access Token. If you don't have this information, please go to http://dev.twitter.com. Sign in with your Twitter account, Choose My Applications and click Create a New Application then follow the prompts to get Consumer Key, Consumer Secret, Access Token, and Access Token Secret.

Access Token Secret *

Is your Twitter Application Access Token Secret. If you don't have this information, please go to http://dev.twitter.com. Sign in with your Twitter account, Choose My Applications and click Create a New Application then follow the prompts to get Consumer Key, Consumer Secret, Access Token, and Access Token Secret.

Enabled *

If on, emit through the proxy server.

Host

The HTTP proxy server host name.

Port

The HTTP proxy server port.

User

The HTTP proxy server user name.

Password

The HTTP proxy server password.

Connection Timeout

The HTTP connection timeout in milliseconds.

Read Timeout

The HTTP read timeout in milliseconds.

Streaming Read Timeout

The streaming API's HTTP Read timeout in milliseconds.

Retry Count

The number of HTTP retries.

Retry Interval *

The HTTP retry interval in seconds.

Pretty Debug

Prettifies JSON debug output if set to true.

Stream Base URL

The streaming API base URL.

Site Stream Base URL

The Site Streams API base URL.

Edges:

The following table lists the available Line Edges for the search Service (com.ibi.agents.XDTwitterSearch).

Line Edge

Description

OnError

An exception occurred during execution.

OnSuccess

The operation was successful.

OnFailure

A fail condition occurred during execution.

onFailConnect

Could not connect to Twitter.

onFailParse

Could not parse a document.

OnFailTwitterException

Twitter threw an exception.

OnFailTwitterOperation

Could not perform the Twitter operation requested.