Skip to content

Releases: tweetapi/node

v1.1.0

08 Apr 15:17

Choose a tag to compare

What's New

Automatic Retry with Backoff

The SDK now automatically retries on transient errors with exponential backoff + jitter:

  • 429 (Rate Limit) — waits the retryAfter duration from the API, then retries
  • 5xx (Server Error) — retries with exponential backoff
  • Network errors — retries on timeouts and connection failures
  • 4xx (Client Error) — never retried (fail immediately)

Fully configurable via the new retry option:

const client = new TweetAPI({
  apiKey: "YOUR_API_KEY",
  retry: { maxRetries: 5, initialRetryDelay: 2000, backoffMultiplier: 3, maxRetryDelay: 60000 },
});

// Or disable entirely
const client = new TweetAPI({ apiKey: "YOUR_API_KEY", retry: false });

Auto-Pagination Helpers

New paginate() and paginatePages() async generators — no more manual cursor loops:

import { paginate } from "tweetapi-node";

for await (const user of paginate(
  (cursor) => client.user.getFollowers({ userId: "123", cursor }),
  { maxPages: 5 },
)) {
  console.log(user.username);
}

Works with any paginated endpoint — followers, tweets, search, lists, communities, etc.

Rate Limit Awareness

  • 429 retryAfter is respected automatically during retry
  • Last rate limit state exposed via client.rateLimitInfo

New Exports

  • paginate, paginatePages — pagination helper functions
  • RetryOptions, RateLimitInfo, PaginateOptions — TypeScript types

Full Changelog

v1.0.0...v1.1.0

v1.0.0

01 Apr 12:45

Choose a tag to compare

Official Node.js/TypeScript SDK for TweetAPI.

  • 70+ endpoints across 11 resource categories (user, tweet, post, interaction, list, community, space, explore, auth, xchat, DMs)
  • Full TypeScript types for all requests and responses
  • Typed error handling (RateLimitError, NotFoundError, AuthenticationError, etc.)
  • Zero dependencies — native fetch (Node.js 18+)
  • ESM + CommonJS dual build
npm install tweetapi-node

Documentation · Get API Key (Free)