Retrieve user's articles

Returns array of articles posted by the user. You can request additional results by sending another request to the same endpoint using cursor parameter.

Endpoint

GET https://api.socialdata.tools/twitter/user/[user_id]/articles

Endpoint parameters

Name
Description
Example

user_id (Required)

The ID of the user for whom to return results.

1034554665109676033

cursor (Optional)

Cursor value obtained from next_cursor response property Omit this value to retrieve the first page

DAACCgACGC12FhmAJxAKAAMYLXYWGX_Y8AgABAAAAAILAAUAAADoRW1QQzZ3QUFBZlEvZ0d...

Common Issues and Best Practices

  • In languages where the user_id value exceeds the default Integer type limit (e.g., Node.js), store user_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

Endpoint codes

  • HTTP 200 OK - succeeded

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

  • HTTP 403 Forbidden - user's profile is set to "protected"

  • HTTP 404 Not Found - requested user 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/user/1034554665109676033/articles"
-H 'Authorization: Bearer API_KEY'
-H 'Accept: application/json'

Example response

// If succeeded: 
{
    "next_cursor": "DAACCgACGC12FhmAJxAKAAMYLXYWGX_Y8AgABAAAAAILAAUAAADoRW1QQzZ3QUFBZlEvZ0dKTjB2R3AvQUFBQUJNWUxTNkQyQmFoUXhndFRReS9Ga0NOR0MwZG9yS1hzU2NZTFFwYm0xY1I0aGd0YmhZc1drQ3FHQzBjUXNSV1lSZ1lMVml5V3BxQU9CZ3RMbUhUV2tDb0dDMVFuVW1YMEFzWUxKYURhOVpob3hndFZtaklGakNNR0MxWGdlT1dZSE1ZTFRYNFNwZUEraGd0Y2h2bEYxRkxHQzFNMi83V1VGc1lMTTZwemhZQWt4Z3RWMkJKbDNGN0dDMWFGTXBYUUY4WUxUUERuRlp3UVE9PQgABgAAAAAIAAcAAAAADAAICgABGCyWg2vWYaMAAAA",
    "articles": [
        {
            "published_at": "2024-06-07T17:52:39+00:00",
	    "id": 1799137410284134858,
	    "id_str": "1799137410284134858",
	    "title": "Introducing Upland Neighborhood Bundles",
	    "preview_text": "As Upland continues to grow and solidify its position as the premier web3 metaverse, we recognize the need to offer entire exclusive neighborhoods to our partners and large communities eager to join",
	    "cover_url": "https:\/\/pbs.twimg.com\/media\/GPfRKLpaIAAQzNL.jpg"
	},
	...
    ]
]

// If failed:
{
    "status":"error",
    "message":"Failed to fetch data from Twitter"
}

Last updated