Retrieve all comments for any tweet

Returns an array of replies that are part of the requested tweet's thread (including direct replies and 2nd level replies). Behind the scenes this method will recursively request the GET /twitter/search endpoint using conversation_id:[tweet_id] search query in order to retrieve all replies.

For convenience of the crypto-focused users of the API, we attempt to parse a blockchain wallet address present in each reply and store it in wallet_address property of the response. For simplicity, any alphanumeric string of 25+ characters is assumed to be an address. If you rely on this property - make sure to implement additional verifications on your side.

Known limitation: occasionally Twitter does not return all replies through the search endpoint, therefore total number of results generated by this async job may be lower than reply_count reported by Twitter under the main tweet. For example, any low-quality or spam replies will be missing.

Endpoint

POST https://api.socialdata.tools/twitter/tweets/[tweet_id]/comments/asyncJob

Endpoint parameters

Response codes

  • HTTP 200 OK - succeeded

  • HTTP 402 Payment Required - not enough credits to perform this request. You need to have enough balance to retrieve all comments reported by Twitter under tweet_id, unless max_count property is set

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

  • HTTP 500 Internal Server Error - other error (highly unlikely)

Example response

// If succeeded: 
{
    "status": "success",
    "job_id": 42
}

Example job status response

Once a job is processed, the following response will be provided by GET /jobs/[job_id] endpoint or by webhook event:

{
    "job_id": 42
    "status": "success",
    "result": {
        "is_compressed": false,
        "datafile_url": "https://s3.amazonaws.com/..."
    }
}

Last updated