Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tufayellus/twitter-tweet-scraper-api-php

A PHP curl based Twitter tweets scraper API developed by Tufayel Ahmed
https://github.com/tufayellus/twitter-tweet-scraper-api-php

tweets twitter twitter-api twitter-scraper twitter-scraper-php twitter-scraping

Last synced: 8 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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=="
}