# xdevplatform/samples

Sample code for the X API v2 endpoints

Repository: https://github.com/xdevplatform/samples
Canonical: https://ross.abutalabs.com/products/xdevplatform-samples
Homepage: https://docs.x.com/x-api/getting-started/about-x-api
Language: Python
License: Apache-2.0
License Family: permissive
Topics: twitter, twitter-api, ruby, java, python, nodejs, javascript, twitter-api-v2
Last push: 2026-03-20T01:39:45+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 73, release rhythm 35, longevity 100
- inputs: {"age_days": 2212, "days_push": 167, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3200, forks 1092 (observed 2026-08-28T04:07:48.450827+00:00)

## What it is
A collection of working sample code for the X (Twitter) API v2, with examples in Python, JavaScript, Ruby, Java, and R covering posts, users, timelines, streams, and more. It includes LLM-friendly documentation files and a machine-readable endpoint catalog.

## Use cases
- learn how to call the X API v2
- search recent posts with the twitter api
- post a tweet programmatically using oauth 2.0
- stream filtered tweets in real time
- upload media to X via the api
- manage followers, blocks, and mutes through the api
- example code for twitter api in ruby or java

## When to choose
- you want copy-paste working examples for X API v2 endpoints
- you need samples across multiple languages like Python, JavaScript, Ruby, Java, or R
- you are building a bot or integration and need auth patterns (bearer token, OAuth 2.0 PKCE, OAuth 1.0a)

## When to avoid
- you need a production-ready client library rather than example scripts
- you are integrating with a platform other than X/Twitter
- you need X API v1.1 legacy endpoint coverage

## Facets
- artifact type: learning-resource
- maturity: active
- function: http-client, developer-tools, sdk
- domain: apis, social-media, developer-tools, tutorials
- platform: python, jvm, cross-platform
- tags: x-api, twitter-api, code-samples, oauth, api-examples, nodejs

## Member repositories
- xdevplatform/samples (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:48.450827+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:24:50.720905+00:00, confidence not recorded.
  - readme: https://github.com/xdevplatform/samples (fetched 2026-08-28T04:07:48.450827+00:00, sha 8da822f65162)
  - homepage: https://docs.x.com/x-api/getting-started/about-x-api (fetched 2026-08-29T09:38:31.873359+00:00, sha 3ddd286016d1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
