A scraper for the Threads app, built with Node.js and Express.js.
This application provides three API endpoints to fetch user-related data from the Threads app.
Threads is a text-based app built by Meta to rival Twitter. The app became available on July 6th, 2023, to users in more than 100 countries. Threads was built by the Instagram team, allowing Instagram users to log into Threads through their Instagram account. The app bears many similarities to Twitter, from its layout to its product description.
- ⚙️ Node.js (version 12.20.0 or higher)
-
🚀 Clone the repository:
git clone https://github.com/pingdeepak/threads-scraper.git
-
📦 Install the dependencies:
cd threads-scraper npm install
-
▶️ Start the server:npm start
The server will start running at
http://localhost:3000
(or the specified port). -
API Endpoints:
-
🔍 Fetch userid by username:
- Endpoint:
GET /userid/:username
- Example:
GET /userid/johndoe
- Response:
{ "userid": "12345" }
- Endpoint:
-
👤 Fetch user profile by userid:
- Endpoint:
GET /userprofile/:userid
- Example:
GET /userprofile/12345
- Response: User profile JSON data
- Endpoint:
-
💬 Fetch threads or posts of userid:
- Endpoint:
GET /threads/:userid
- Example:
GET /threads/12345
- Response: Threads or posts JSON data
- Endpoint:
-
Contributions are welcome! If you find any issues or have suggestions for improvements, please create an issue or submit a pull request.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.