{"id":20391107,"url":"https://github.com/aditya76-git/threadscrape-threads-net-web-api","last_synced_at":"2025-08-31T16:40:13.322Z","repository":{"id":193840898,"uuid":"689595139","full_name":"aditya76-git/threadscrape-threads-net-web-api","owner":"aditya76-git","description":"ThreadScrape - Threads.net WEB API","archived":false,"fork":false,"pushed_at":"2023-09-15T15:17:08.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T00:44:22.994Z","etag":null,"topics":["api","python","threads","threads-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aditya76-git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-10T10:13:14.000Z","updated_at":"2023-09-10T13:38:35.000Z","dependencies_parsed_at":"2024-11-15T03:28:59.841Z","dependency_job_id":"8919055f-1923-4821-9618-45c83a7658ae","html_url":"https://github.com/aditya76-git/threadscrape-threads-net-web-api","commit_stats":null,"previous_names":["aditya76-git/threadscrape-threads-net-web-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aditya76-git/threadscrape-threads-net-web-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aditya76-git%2Fthreadscrape-threads-net-web-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aditya76-git%2Fthreadscrape-threads-net-web-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aditya76-git%2Fthreadscrape-threads-net-web-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aditya76-git%2Fthreadscrape-threads-net-web-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aditya76-git","download_url":"https://codeload.github.com/aditya76-git/threadscrape-threads-net-web-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aditya76-git%2Fthreadscrape-threads-net-web-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273010882,"owners_count":25030367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","python","threads","threads-api"],"created_at":"2024-11-15T03:28:52.696Z","updated_at":"2025-08-31T16:40:13.281Z","avatar_url":"https://github.com/aditya76-git.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n\r\n![Logo](https://i.imgur.com/OPzvKEZ.png)\r\n\u003cdiv style=\"text-align:center;\"\u003e\r\n  \u003ca href=\"https://github.com/aditya76-git\"\u003eaditya76-git\u003c/a\u003e /\r\n  \u003ca href=\"https://github.com/aditya76-git/threadscrape-threads-net-web-api\"\u003ethreadscrape-threads-net-web-api\u003c/a\u003e\r\n\u003c/div\u003e\r\n\r\n\u003cbr /\u003e\r\n\r\n\u003c!-- \u003cimg src=\"https://i.imgur.com/y3L6XfN.png\" align=\"right\" /\u003e --\u003e\r\n\r\n# ThreadScrape - Threads.net WEB-API\r\nAccess Account Information, User Details, Search Content with ThreadScrape\r\n\r\n\r\n\r\n## 📋Details\r\n\r\n- 👤 USER\r\n  - [Get User ID](#get-user-id)\r\n  - [Get Profile Info](#get-profile-info)\r\n  - [Get Followers](#get-followers)\r\n  - [Get Following](#get-following)\r\n  - [Get User Profile Threads](#get-user-profile-threads)\r\n  - [Get Recommended User](#get-recommended-user)\r\n\r\n- 📝 POST\r\n  - [Get Post Info](#get-post-info)\r\n  - [Get Post Media](#get-post-media)\r\n\r\n- 🔍 SEARCH\r\n  - [Search](#search)\r\n\r\n- ⚙️ ACTIONS\r\n  - [Follow User](#follow-user)\r\n  - [UnFollow User](#unfollow-user)\r\n  - [Block User](#block-user)\r\n  - [UnBlock User](#unblock-user)\r\n  - [Like Post](#like-post)\r\n  - [UnLike Post](#unlike-post)\r\n  - [Create Thread](#create-thread)\r\n  - [Delete Thread](#delete-thread)\r\n  - [Update Reply Permission](#update-reply-permission)\r\n\r\n## ⚠️ Disclaimer\r\n\r\nPlease note that the `threadscrape` package is provided as-is and is not officially endorsed or supported by `Threads`. While we have taken care to ensure that the package interacts with the Threads API in a secure and compliant manner, we cannot guarantee the safety of your Threads account.\r\n\r\nBy using the `threadscrape` package, you acknowledge and agree that you are responsible for any actions taken with your Threads account, and you use the package at your own risk. We recommend using the package responsibly\r\n\r\nWe are not liable for any potential consequences that may arise from using the `threadscrape` package, including but not limited to `account suspension`, `data loss`, or any other `issues` related to your `Threads` account.\r\n\r\nIt's important to exercise `caution` and ensure that you keep your `sensitive information`, such as the `sessionid` , `fb_dtsg` , `csrftoken` cookie, `private` and `secure`. If you have any concerns or questions, please refer to the documentation or seek assistance from the community.\r\n\r\n\r\n\r\n## ⚙️Installation\r\n\r\nOpen your terminal or command prompt and enter the following command:\r\n\r\n\r\n\r\n```bash\r\npip install git+https://github.com/aditya76-git/threadscrape-threads-net-web-api@main\r\n```\r\n\u003e **Note:** To use threadscrape you need to have a Active Threads Account \r\n\r\n## 🚀 Initialization\r\n\r\nTo get started with ThreadScrape, you'll need to initialize an instance of the `ThreadScrape` class by passing your user session data as an argument. Make sure to replace `\"your_session_id\"`, `\"your_fb_dtsg\"`, and `\"your_csrftoken\"` with your actual session data.\r\n\r\n```python\r\nfrom threadscrape import ThreadScrape\r\n\r\n# Your user session data\r\nsession_data = {\r\n    \"sessionid\": \"your_session_id\",\r\n    \"fb_dtsg\": \"your_fb_dtsg\",\r\n    \"x-csrftoken\": \"your_csrftoken\"\r\n}\r\n\r\n# Initialize a ThreadScrape instance\r\napi = ThreadScrape(session_data)\r\n```\r\n\r\n## 📌 Note\r\n\r\nEvery time you log in with your Threads account, the previous session data expires. This means that any session values obtained during a previous login session, such as `sessionid`, `fb_dtsg`, and `x-csrftoken`, will no longer work. Make sure to update these values with the latest session data after each login to ensure `ThreadScrape` continue to function correctly.\r\n\r\nLogIn Once and obtain the session data and don't logout. If you will logout you will have to update session data again\r\n\r\n\r\n\r\n## 🔍 How to Find sessionid and csrftoken cookie?\r\n\r\n- `sessionid` and `csrftoken` cookie is required to authenticate against `Threads` in order to have access to the required services.\r\n- Using any extensions like `Cookie-Editor` can easily help you find it\r\n- [Extension Link - Chrome WEB Store](https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm)\r\n\r\n![Finding the sessionid Cookie Value](https://i.imgur.com/9CrGIkQ.png \"Finding the sessionid Cookie Value\")\r\n![Finding the csrftoken Cookie Value](https://i.imgur.com/EPZ23tZ.png \"Finding the csrftoken Cookie Value\")\r\n\r\n\r\n\u003e **Note:** While cookies can contain sensitive information, the sessionid and csrftoken cookie value is required for authentication and direct communication with the Threads API within the scope of this open-source project. Rest assured that your cookies will not be sent to any external server; it is solely used for interacting with Thread's services through the project's codebase. However, caution is advised when sharing this cookie value outside the context of this project, as it could potentially lead to unauthorized access to your Threads account.\r\n\r\n\r\n## 🔍 How to Find fb_dtsg payload value\r\n[STEP BY STEP GUIDE](https://graph.org/How-to-Find-Your-fb-dtsg-Payload-Value-09-10)\r\n\r\n\u003ca href=\"https://graph.org/How-to-Find-Your-fb-dtsg-Payload-Value-09-10\"\u003e\r\n  \u003cimg src=\"https://i.imgur.com/DgY0plu.png\" alt=\"Finding the fb_dtsg Payload Value\"\u003e\r\n\u003c/a\u003e\r\n\r\n## 👤 USER\r\n\r\n#### \u003ca id=\"get-user-id\"\u003e\u003c/a\u003e➡️ Get UserID\r\n\r\n```python3\r\napi.get_user_id(username)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `username` | `str` | **Required**. The username or profile URL of the user. | thedankoe |\r\n\r\nReturns:\r\n- int: The user ID.\r\n\r\n\r\n#### \u003ca id=\"get-profile-info\"\u003e\u003c/a\u003e➡️ Get Profile Info\r\n\r\n```python3\r\napi.get_profile_info(username)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `username` | `str` | **Required**. The username or profile URL of the user. | thedankoe |\r\n\r\nReturns:\r\n- dict: A JSON response containing profile information.\r\n\r\n\r\n#### \u003ca id=\"get-followers\"\u003e\u003c/a\u003e➡️ Get Followers\r\n\r\n```python3\r\napi.get_followers(username)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `username` | `str` | **Required**. The username or profile URL of the user. | thedankoe |\r\n\r\nReturns:\r\n- dict: A JSON response containing Followers information.\r\n\r\n\r\n#### \u003ca id=\"get-following\"\u003e\u003c/a\u003e➡️ Get Following\r\n\r\n```python3\r\napi.get_following(username)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `username` | `str` | **Required**. The username or profile URL of the user. | thedankoe |\r\n\r\nReturns:\r\n- dict: A JSON response containing Following information.\r\n\r\n\r\n#### \u003ca id=\"get-user-profile-threads\"\u003e\u003c/a\u003e➡️ Get User Profile Threads\r\n\r\n```python3\r\napi.get_user_profile_threads(username)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `username` | `str` | **Required**. The username or profile URL of the user. | thedankoe |\r\n\r\nReturns:\r\n- dict: A JSON response containing threads associated with a user's profile.\r\n\r\n\r\n#### \u003ca id=\"get-recommended-user\"\u003e\u003c/a\u003e➡️ Get Recommended User\r\n\r\n```python3\r\napi.get_recommended_users(limit=10)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `limit` | `int` | **Optional**. The maximum number of recommended users to retrieve (default is 20). | 10 |\r\n\r\nReturns:\r\n- dict: A JSON response containing recommended Threads users to follow.\r\n\r\n\r\n## 📝 POST\r\n\r\n#### \u003ca id=\"get-post-info\"\u003e\u003c/a\u003e➡️ Get Post Info\r\n\r\n```python3\r\napi.get_post_info(postURL)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `postURL` | `str` | **Required**. The url of the post to get info for. | https://www.threads.net/@r2recody/post/CxAMlXULQ54 |\r\n\r\nReturns:\r\n- int: The user ID.\r\n\r\n\r\n#### \u003ca id=\"get-post-media\"\u003e\u003c/a\u003e➡️ Get Post Media\r\n\r\n```python3\r\napi.get_post_media(postURL)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `postURL` | `str` | **Required**. The url of the post to get media for. | https://www.threads.net/@codeforreal/post/Cw-P6KtvtUD |\r\n| `image_size` | `str` | **Optional**. Image Size if available | 640 |\r\n\r\nNote: \r\n- For a post having images it will return JSON including all available images\r\n- For a post having videos it will return JSON including the thumbnail of all available videos\r\n\r\nReturns:\r\n- dict: A JSON containing Media Info (Images and Videos)\r\n\r\n\r\n\r\n## 🔍 SEARCH\r\n#### \u003ca id=\"search\"\u003e\u003c/a\u003e➡️ Search\r\n\r\n```python3\r\napi.search(query , limit=10)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `query` | `str` | **Required**. The search query. | zuck |\r\n| `limit` | `str` | **Optional**. The maximum number of results to return (default is 10). | 10 |\r\n\r\nReturns:\r\n- dict: A JSON response containing search information.\r\n\r\n\r\n## ⚙️ ACTIONS\r\n#### \u003ca id=\"follow-user\"\u003e\u003c/a\u003e➡️ Follow User\r\n\r\n```python3\r\napi.follow_user(username)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `username` | `str` | **Required**. The username or profile URL of the user to follow. | zuck |\r\n\r\n\r\nReturns:\r\n- dict: A JSON response confirming the follow action.\r\n\r\n#### \u003ca id=\"unfollow-user\"\u003e\u003c/a\u003e➡️ UnFollow User\r\n\r\n```python3\r\napi.unfollow_user(username)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `username` | `str` | **Required**. The username or profile URL of the user to unfollow. | zuck |\r\n\r\n\r\nReturns:\r\n- dict: A JSON response confirming the unfollow action.\r\n\r\n#### \u003ca id=\"block-user\"\u003e\u003c/a\u003e➡️ Block User\r\n\r\n```python3\r\napi.block_user(username)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `username` | `str` | **Required**. The username or profile URL of the user to block. | zuck |\r\n\r\n\r\nReturns:\r\n- dict: A JSON response confirming the block action.\r\n\r\n#### \u003ca id=\"unblock-user\"\u003e\u003c/a\u003e➡️ UnBlock User\r\n\r\n```python3\r\napi.unblock_user(username)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `username` | `str` | **Required**. The username or profile URL of the user to unblock. | zuck |\r\n\r\n\r\nReturns:\r\n- dict: A JSON response confirming the unblock action.\r\n\r\n\r\n#### \u003ca id=\"like-post\"\u003e\u003c/a\u003e➡️ Like Post\r\n\r\n```python3\r\napi.like_post(postURL)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `postURL` | `str` | **Required**. The URL of the post to like. | https://www.threads.net/@zuck/post/Cwm6qX_LL_M |\r\n\r\nReturns:\r\n- dict: A JSON response confirming the like action.\r\n\r\n\r\n\r\n#### \u003ca id=\"unlike-post\"\u003e\u003c/a\u003e➡️ UnLike Post\r\n\r\n```python3\r\napi.unlike_post(postURL)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `postURL` | `str` | **Required**. The URL of the post to unlike. | https://www.threads.net/@zuck/post/Cwm6qX_LL_M |\r\n\r\n\r\nReturns:\r\n- dict: A JSON response confirming the unlike action.\r\n\r\n\r\n#### \u003ca id=\"create-thread\"\u003e\u003c/a\u003e➡️ Create Thread\r\n\r\n```python3\r\napi.create_thread(text)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `text` | `str` | **Required**. The text content of the thread. | Hello World Posting from ThreadScrape |\r\n\r\n\r\nReturns:\r\n- dict: A JSON response containing the Thread Info.\r\n\r\n\r\n#### \u003ca id=\"delete-thread\"\u003e\u003c/a\u003e➡️ Delete Thread\r\n\r\n```python3\r\napi.delete_thread(postURL)\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `postURL` | `str` | **Required**. The URL of the thread to delete. | url |\r\n\r\n\r\nReturns:\r\n- dict: A JSON response confirming the thread deletion.\r\n\r\n\r\n#### \u003ca id=\"update-reply-permission\"\u003e\u003c/a\u003e➡️ Update Reply Permission\r\n\r\n```python3\r\napi.update_reply_permission(postURL, option = \"your_followers\")\r\n```\r\n| Parameter | Type | Description | Example |\r\n| :-------- | :--- | :---------- | :--- |\r\n| `postURL` | `str` | **Required**. The URL of the thread to delete. | url |\r\n| `option` | `str` | **Optional**. The reply permission option (default is \"accounts_you_follow\"). Available Options are mentioned_only, your_followers and accounts_you_follow | your_followers |\r\n\r\n\r\nReturns:\r\n- dict: A JSON response confirming the update.\r\n\r\n\r\n\r\n## 🌟 Show Your Support\r\n\r\n- If you find this project useful or interesting, please consider giving it a star on GitHub. It's a simple way to show your support and help others discover the project.\r\n\r\n\r\n![Github Stars](https://img.shields.io/github/stars/aditya76-git/threadscrape-threads-net-web-api?style=social \"Github Stars\")\r\n\r\n## 👨‍💻Developement\r\n\r\nThank you for your interest in contributing to this project! There are several ways you can get involved:\r\n\r\n- **Opening Issues**: If you encounter a bug, have a feature request, or want to suggest an improvement, please open an issue. We appreciate your feedback!\r\n- **Cloning the Project**: To work on the project locally, you can clone the repository by running:\r\n```bash\r\ngit clone https://github.com/aditya76-git/threadscrape-threads-net-web-api.git\r\n```\r\n- **Sending Pull Requests**: If you'd like to contribute directly to the codebase, you can fork the repository, make your changes, and then send a pull request. We welcome your contributions!\r\n\r\n\r\n\r\n\r\n## 💻Authors\r\n\r\n- Copyright © 2023 - [aditya76-git](https://github.com/aditya76-git) / [threadscrape-threads-net-web-api](https://github.com/aditya76-git/threadscrape-threads-net-web-api)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faditya76-git%2Fthreadscrape-threads-net-web-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faditya76-git%2Fthreadscrape-threads-net-web-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faditya76-git%2Fthreadscrape-threads-net-web-api/lists"}