Ready-to-run code examples for thredly — the Threads & Instagram data API.
- An API key from thredly.dev
- Set
THREDLY_API_KEYas an environment variable
export THREDLY_API_KEY=your-api-key-here| Example | Language | Description |
|---|---|---|
| basic-user-profile | TypeScript | Resolve username → fetch full user profile |
| fetch-user-posts | TypeScript | Paginated post collection with cursor loop |
| search-threads | TypeScript | Search top, recent, and profile results |
| basic_user_profile | Python | Resolve username → fetch full user profile |
| bulk_data_collection | Python | Collect all posts and export to CSV |
| pandas_analysis | Python | Load posts into pandas and analyze engagement |
| quickstart | cURL | Get user info and search in one script |
| pagination | cURL | Cursor-based pagination loop |
| research-template | Jupyter | Complete research workflow notebook |
cd typescript
npm install
npx ts-node basic-user-profile.tscd python
pip install -r requirements.txt
python basic_user_profile.pycd curl
chmod +x quickstart.sh
./quickstart.shcd jupyter
pip install jupyter pandas matplotlib requests
jupyter notebook research-template.ipynbAll examples use https://thredly.dev/api as the base URL.
- thredly.dev — API documentation and sign-up
- threads-api-client — Official TypeScript SDK
- threads-connect — Session management tool
MIT — see LICENSE