Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

ardasoyturk/cloudflare-worker-twitter

Repository files navigation

Cloudflare Worker for Twitter API

Warning

This Cloudflare Worker codebase is from 2021. Many of the API endpoints may have changed since then. Cloudflare Workers have evolved significantly from that time to today. Although I believe this code should still work, I do not recommend using it in production.

If you want to use it in production, I am not going to update the code myself, you may fork the repository and apply your changes.

API Reference

Get user data

GET /?username=twitterapi
Parameter Type Description
username string Required. The twitter username of the account that you're looking for.

Get user's liked tweets

GET /?username=twitterapi&lookup=likes
Parameter Type Description
username string Required. The twitter username of the account that you're looking for.
lookup string Required. Type likes to get the likes.
count number Optional. Specifies the number of records to retrieve. Must be less than or equal to 200; defaults to 20.
since_id number Optional. Returns results with an ID greater than (that is, more recent than) the specified ID.
max_id number Optional. Returns results with an ID less than (that is, older than) or equal to the specified ID.

Installation

You need to install Cloudflare Wrangler and Node.js to initialize this worker locally.

wrangler generate cloudflare-worker-twitter https://github.com/ardasoyturk/cloudflare-worker-twitter

You can use wrangler dev command to test the worker locally and use wrangler publish to publish your worker to Cloudflare Workers.

🤢 Issues

If you run into issues with this specific project, please feel free to file an issue here. If the problem is with Wrangler, please file an issue here.

Releases

No releases published

Packages

 
 
 

Contributors