Skip to content

Latest commit

 

History

History
147 lines (102 loc) · 7.15 KB

File metadata and controls

147 lines (102 loc) · 7.15 KB

Search

Overview

Available Operations

Advanced

Perform advanced Twitter search with cursor-based pagination. Each page returns up to 20 tweets. Pass next_cursor from the previous response to continue. Pricing: $0.10 per 1,000 tweets. 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>");

AdvancedSearchCursorQuery req = new AdvancedSearchCursorQuery() {
    SearchTerms = new List<string>() {
        "<value 1>",
        "<value 2>",
        "<value 3>",
    },
    SortBy = "<value>",
    NextCursor = "",
};

var res = await sdk.Search.AdvancedAsync(req);

// handle response

Parameters

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

Response

SearchAdvancedResponse

Errors

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

Cashtags

Search for tweets containing specific cashtags (stock symbols), $0.10/1000 tweets. 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>");

CashtagsQuery req = new CashtagsQuery() {
    Cashtags = new List<string>() {
        "AAPL",
        "TSLA",
    },
    StartTime = "1775726400",
    EndTime = "1775727300",
    Language = CashtagsQueryLanguage.En,
};

var res = await sdk.Search.CashtagsAsync(req);

// handle response

Parameters

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

Response

SearchCashtagsResponse

Errors

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

Hashtags

Search for tweets containing specific hashtags. 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>");

HashtagsQuery req = new HashtagsQuery() {
    Hashtags = new List<string>() {
        "btc",
        "eth",
    },
    StartTime = "1775726400",
    EndTime = "1775727300",
    Language = HashtagsQueryLanguage.En,
};

var res = await sdk.Search.HashtagsAsync(req);

// handle response

Parameters

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

Response

SearchHashtagsResponse

Errors

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