Retrieve thread

Returns an array of tweets associated with a thread and a next_cursor value used to retrieve more pages (if the thread contains more than 30 posts)

Endpoint

GET https://api.socialdata.tools/twitter/thread/[id]?cursor=...

Endpoint parameters

Name
Description
Example

id (Required)

The numerical ID of a thread's first tweet

1549281861687451648

cursor (Optional)

Cursor value obtained from next_cursor response property

PAAAAPAtPBwcFoCAsrHQ6pOAKxUC...

Common Issues and Best Practices

  • In languages where the id value exceeds the default Integer type limit (e.g., Node.js), store id as a string. Use the id_str property returned by the API for these values

  • Always URL-encode the cursor value when passing it back to the API for subsequent requests

Response codes

  • HTTP 200 OK - succeeded

  • HTTP 402 Payment Required - not enough credits to perform this request

  • HTTP 404 Not Found - requested tweet does not exist

  • HTTP 422 Unprocessable Content - validation failed (e.g. one of the required parameters was not provided)

  • HTTP 500 Internal Server Error - other error, typically means that SocialData API failed to obtain the requested information and you should try again later

Rate limits

By default each user has a limit of 120 requests per minute shared across all endpoints. Please reach out to support@socialdata.tools if you need to raise your rate limit.

Example request

curl "https://api.socialdata.tools/twitter/thread/1549281861687451648"
-H 'Authorization: Bearer API_KEY'
-H 'Accept: application/json'

Example response

// If succeeded: 
{
	"tweets": [
		{
			"tweet_created_at": "2022-07-19T06:35:54+00:00",
			"id": 1549281861687451648,
			"id_str": "1549281861687451648",
			"text": null,
			"full_text": "100 tips I learned growing an iOS app to ~$5M in sales in 3 yrs, going through YC 1.5 times, and co-founding @Superwall 👇",
			"source": "<a href=\"https:\/\/getchirrapp.com\" rel=\"nofollow\">chirr.app<\/a>",
			"truncated": false,
			"in_reply_to_status_id": null,
			"in_reply_to_status_id_str": null,
			"in_reply_to_user_id": null,
			"in_reply_to_user_id_str": null,
			"in_reply_to_screen_name": null,
			"user": {
				"id": 15118774,
				"id_str": "15118774",
				"name": "Jake Mor",
				"screen_name": "jakemor",
				"location": "New York, USA",
				"url": "http:\/\/superwall.com",
				"description": "CEO @Superwall — build & test paywalls without shipping updates. Past: Founder @FitnessAI_ (acquired). YC W20 & S21",
				"protected": false,
				"verified": true,
				"followers_count": 5423,
				"friends_count": 556,
				"listed_count": 95,
				"favourites_count": 1161,
				"statuses_count": 1683,
				"created_at": "2008-06-14T18:37:41+00:00",
				"profile_banner_url": "https:\/\/pbs.twimg.com\/profile_banners\/15118774\/1636564314",
				"profile_image_url_https": "https:\/\/pbs.twimg.com\/profile_images\/1167559170540875777\/nRn7p8em_normal.jpg",
				"can_dm": true
			},
			"quoted_status_id": null,
			"quoted_status_id_str": null,
			"is_quote_status": false,
			"quoted_status": null,
			"retweeted_status": null,
			"quote_count": 73,
			"reply_count": 105,
			"retweet_count": 492,
			"favorite_count": 9419,
			"views_count": null,
			"bookmark_count": 4614,
			"lang": "en",
			"entities": {
				"user_mentions": [
					{
						"id_str": "1427520876325613571",
						"name": "Superwall",
						"screen_name": "Superwall",
						"indices": [
							109,
							119
						]
					}
				],
				"urls": [],
				"hashtags": [],
				"symbols": []
			},
			"is_pinned": false
		},
		...
	],
	"next_cursor": "PAAAAPAtPBwcFoCAsrHQ6pOAKxUCAAAYJmNvbnZlcnNhdGlvbnRocmVhZC0xNTQ5MjgxODYyNDYzNTA0Mzg0IgAA"
}

// If failed:
{
    "status":"error",
    "message":"Tweet not found"
}

Last updated