Skip to content

A PHP curl based Twitter tweets scraper API developed by Tufayel Ahmed

License

Notifications You must be signed in to change notification settings

TufayelLUS/Twitter-Tweet-Scraper-API-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Twitter Tweet Scraper API using PHP

A php curl based twitter tweets scraper API developed by Tufayel Ahmed

Purpose

This API was built for those who wants to collect tweets programmatically from profiles or those who wants to delete their twitter account but wants to backup their tweets.

Some Helpful Information

  • There are 20 tweets returned per each request made.
  • Twitter has rate limiting feature, so don't plan to go mad.
  • I am not hosting this API just to play safe.
  • To bypass rate limit, implement rotating proxies if you plan to use it in production level.

Documentation

GET /tweets.php

Parameter:

username - twitter username of target account (required)
nextPageCursor - token for accessing next tweets/pagination (not required for initial API call, required for accessing next pages)

Example:

  • For accessing first page:
    /tweets.php?username=tufayel_cse

Sample Response:

{
  "tweets":["tweet body here", "another tweet body here"],
  "nextPageCursor":"HBaGwLrlrJv63SAAAA=="
}
  • For accessing next pages and so on(set nextPageCursor value received in previous request):
    /tweets.php?username=tufayel_cse&nextPageCursor=HBaGwLrlrJv63SAAAA==

Sample Response:

{
  "tweets":["next page tweets"],
  "nextPageCursor":"HBaGwvdfgfv63SAAAA=="
}

Releases

No releases published

Packages

No packages published

Languages