Skip to content

Latest commit

 

History

History
169 lines (110 loc) · 7.99 KB

File metadata and controls

169 lines (110 loc) · 7.99 KB

Tweets

Overview

Available Operations

Detail

Retrieve detailed information for one or more tweets by ID (no cookie required). The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.

Example Usage

using System.Collections.Generic;
using XapiScraper;
using XapiScraper.Models.Components;

var sdk = new XapiScraperSDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

List<string> req = new List<string>() {
    "2076874251915743687",
};

var res = await sdk.Tweets.DetailAsync(req);

// handle response

Parameters

Parameter Type Required Description
request List<string> ✔️ The request object to use for the request.

Response

TweetsDetailResponse

Errors

Error Type Status Code Content Type
XapiScraper.Models.Errors.HTTPValidationError 422 application/json
XapiScraper.Models.Errors.APIException 4XX, 5XX */*

Thread

Retrieve all tweets in a thread by tweet ID, sorted by latest.

Example Usage

using XapiScraper;
using XapiScraper.Models.Components;

var sdk = new XapiScraperSDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

TweetThreadByIdBody req = new TweetThreadByIdBody() {
    TweetId = "<id>",
};

var res = await sdk.Tweets.ThreadAsync(req);

// handle response

Parameters

Parameter Type Required Description
request TweetThreadByIdBody ✔️ The request object to use for the request.

Response

TweetsThreadResponse

Errors

Error Type Status Code Content Type
XapiScraper.Models.Errors.HTTPValidationError 422 application/json
XapiScraper.Models.Errors.APIException 4XX, 5XX */*

Lookup

Retrieve detailed information for multiple Tweets by their IDs. The maximum input quantity is limited by your plan's QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.

Example Usage

using System.Collections.Generic;
using XapiScraper;
using XapiScraper.Models.Components;

var sdk = new XapiScraperSDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

List<string> req = new List<string>() {
    "1803006263529541838",
};

var res = await sdk.Tweets.LookupAsync(req);

// handle response

Parameters

Parameter Type Required Description
request List<string> ✔️ The request object to use for the request.

Response

TweetsLookupResponse

Errors

Error Type Status Code Content Type
XapiScraper.Models.Errors.HTTPValidationError 422 application/json
XapiScraper.Models.Errors.APIException 4XX, 5XX */*

Similar

Get similar tweets

Example Usage

using XapiScraper;
using XapiScraper.Models.Components;
using XapiScraper.Models.Requests;

var sdk = new XapiScraperSDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

TweetsSimilarRequest req = new TweetsSimilarRequest() {
    TweetId = "<id>",
};

var res = await sdk.Tweets.SimilarAsync(req);

// handle response

Parameters

Parameter Type Required Description
request TweetsSimilarRequest ✔️ The request object to use for the request.

Response

TweetsSimilarResponse

Errors

Error Type Status Code Content Type
XapiScraper.Models.Errors.HTTPValidationError 422 application/json
XapiScraper.Models.Errors.APIException 4XX, 5XX */*