Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xquik.com/llms.txt

Use this file to discover all available pages before exploring further.

Use the C# SDK for typed .NET Standard 2.0+ access to Xquik from services, workers, console tools, and ASP.NET backends.

Install

dotnet add package XTwitterScraper

Authenticate

export X_TWITTER_SCRAPER_API_KEY="xq_YOUR_KEY_HERE"
new XTwitterScraperClient() reads X_TWITTER_SCRAPER_API_KEY, X_TWITTER_SCRAPER_BEARER_TOKEN, and X_TWITTER_SCRAPER_BASE_URL.

Basic Example

using XTwitterScraper;
using XTwitterScraper.Models.X.Tweets;

XTwitterScraperClient client = new();

TweetSearchParams parameters = new()
{
    Q = "from:elonmusk",
    Limit = 10,
};

var tweets = await client.X.Tweets.Search(parameters);

Error Handling

The C# SDK throws generated exception types for non-success responses and connection failures.
StatusException
400XTwitterScraperBadRequestException
401XTwitterScraperUnauthorizedException
403XTwitterScraperForbiddenException
404XTwitterScraperNotFoundException
422XTwitterScraperUnprocessableEntityException
429XTwitterScraperRateLimitException
5xxXTwitterScraper5xxException
Use the error handling guide for response body fields and retry recommendations.

Pagination

Paginated responses expose generated fields such as HasNextPage. Pass cursor parameters from the previous response when an endpoint supports cursor pagination.
if (tweets.HasNextPage)
{
    await Console.Error.WriteLineAsync("More results are available");
}

Webhooks & References