Skip to content

Latest commit

 

History

History
88 lines (57 loc) · 4.44 KB

File metadata and controls

88 lines (57 loc) · 4.44 KB

Articles

Overview

Available Operations

  • Fetch - Batch Fetch X Articles
  • Markdown - Fetch Article as Markdown

Fetch

Retrieves detailed article content for a specified list of X (Twitter) IDs. Use this endpoint to fetch full text, metadata, and media links for multiple posts in a single request. 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.Articles.FetchAsync(req);

// handle response

Parameters

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

Response

ArticlesFetchResponse

Errors

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

Markdown

Retrieves the content of an X (Twitter) article formatted as clean, valid Markdown. The response body is delivered as a raw UTF-8 string, optimized for direct import into static site generators, Obsidian, Notion, or any standard Markdown editor.

Example Usage

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

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

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

var res = await sdk.Articles.MarkdownAsync(req);

// handle response

Parameters

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

Response

ArticlesMarkdownResponse

Errors

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