Twitter API - GET /posts Method
This method allows obtaining results processed from each Worker configured in Twitter. Temporal delimiters can be used to narrow down the returned content.
This is a basic method that returns complete results about a tweet's publication, including basic information about the user who posted it. It is sufficient for statistical analysis that does not require detailed information about the user.
GET Parameters
The API call is constructed from the basic structure:
https://twitter.trawlingweb.com/posts/{WORKERID}?token={APIKEY}
PATH Parameters
| Element | Description |
|---|---|
| protocol | Can be either http or https |
| domain | API address twitter.trawlingweb.com |
| method | posts |
| workerid | Identifier that allows access to a specific worker and retrieves the results generated by the configured keywords in it. It functions like a library or list of keywords, allowing you to obtain relevant results based on those keywords. |
QUERY Parameters
| Parameter | Description | Default | Example |
|---|---|---|---|
| token | APIKEY to validate and access the TrawlingWeb system. Each user has their own individual and non-transferable APIKEY linked to their services and features. | Required value | ?token={APIKEY} |
| ts | Initial time delimiter. Unix Time format in milliseconds | Delimits to 1 month in the past from the request | &ts=1518472804000 |
| tsi | Final time delimiter. Unix Time format in milliseconds | Delimits with the request date | &tsi=1524818189854 |
Response Output - RESPONSE
This method aims to retrieve all results related to a worker's keywords. However, the elements listed below will not be considered in their entirety for this method; they will only be sortable by date-related attributes.
Once a request is made to the Twitter API, it will return a response structured as follows:
Publication Data
| Field | Description | Searchable | Sortable | Type | Format |
|---|---|---|---|---|---|
| id | Identification code assigned by Trawlingweb to each tracked publication | No | No | String | |
| hash | Identification code based on the text | No | No | String | |
| published | Date the post was published | No | No | Date | ISO 8601-UTC |
| crawled | Indexing date | No | Yes | Integer | UNIX Timestamp milliseconds |
| updated | Update date | No | Yes | Integer | UNIX Timestamp milliseconds |
| post_id | Post ID | No | No | String | |
| url | Publication URL | No | No | String | |
| text | Text of the publication | No | No | String | |
| lang | When present, indicates a BCP 47 language identifier corresponding to the language detected by the machine for the Tweet text, or und if no language could be detected | No | No | String | |
| retweet_count | Number of times this Tweet has been retweeted | No | No | Integer | |
| reply_count | Number of times this Tweet has been replied to | No | No | Integer | |
| favorite_count | Indicates approximately how many times Twitter users liked this Tweet | No | No | Integer | |
| reproductions_count | Number of times this Tweet has been played | No | No | Integer | |
| user_name | User name | No | No | String | |
| user_screen_name | Displayed user name | No | No | String | |
| user_url | User URL | No | No | String | |
| user_profile_image_url | An HTTP-based URL pointing to the user's profile image | No | No | String | |
| entities_url | Mentioned links | No | No | String | |
| hashtags | Hashtags referenced in the text | No | No | String | |
| user_mentions | Names referenced in the text | No | No | String | |
| time_distance | Hours elapsed between the publication date and the indexing date | No | No | Decimal | |
| Reply | Indicates if it is a reply to an original tweet | No | No | Boolean | |
| Quote | Indicates if it is a quote of an original tweet | No | No | Boolean |
Important Notes on the "reply" and "quote" Fields
| Aspect | Reply | Quote |
|---|---|---|
| Purpose | Participate in a direct conversation | Reference or comment on a tweet independently |
| Linking | in_reply_to_status_id points to the original tweet |
referenced_tweets with type: "quoted" points to the quoted tweet |
| Visualization | Appears in the conversation thread | Appears as an independent tweet with the quoted tweet embedded |
| Context | Part of a dialogue chain | Adds an additional layer of comment or context |
| Accounting | Counted as a single post, even if linked to the original tweet | Counted as a single post, even if linked to the original tweet |
Example response in json format:
"json"
"response" : {
"data" : [{
"id": "...",
"hash": "...",
"published" : "...",
"crawled" : "...",
"updated" : "...",
"post_id" : "...",
"url" : "...",
"text" : "...",
"lang" : "...",
"retweet_count" : "...",
"reply_count" : "...",
"favorite_count" : "...",
"reproductions_count" : "...",
"created_at" : "...",
"user_name" : "...",
"user_screen_name" : "...",
"user_url" : "...",
"user_profile_image_url" : "...",
"entities_url" : "...",
"hashtags" : "...",
"user_mentions" : "...",
"time_distance" : "...",
"reply" : "..."
}],
"totalResults" : "...",
"restResults" : "...",
"next" : "..."
}
Outcome example
requestLeft 9999999
totalResults 295404987
next "http://twitter.trawlingweb.com/posts/1234567891234567891234567891234567.123456789?token=1234567891234567891234567891234567891234&ts=1555327617000&tsi=1554076800000"
}
Contact
If you have any questions, need assistance, want to hire or expand your services, please contact us.
Technical Support (SAT):
Administrative Support (SAC):
Sales Support: