# Pyktok

> Python module that downloads TikTok videos, metadata and comments from video, user and hashtag pages.

Source: https://osinttools.io/tools/pyktok/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

- **Inputs:** URL, Username
- **Category:** Social media intelligence
- **Pricing:** Free, open source
- **Footprint:** passive (does not contact the target)
- **Account required:** no
- **API:** no public API
- **Platforms:** Python library
- **Website:** https://github.com/dfreelon/pyktok
- **GitHub:** dfreelon/pyktok, 468 stars · Python · BSD-3-Clause · last commit 2025-10-04
- **Listed:** Nov 27
- **Last verified by an editor:** Nov 27, 2026

## What it does

Pyktok is a Python module by researcher Deen Freelon for collecting TikTok data. It pulls information from the JSON embedded in TikTok pages and from undocumented endpoints, and can save videos, one row of metadata per video, comments and the full JSON object, as well as around thirty videos at a time from a user, hashtag or related-videos page.

Researchers and investigators use it to archive TikTok videos together with their metadata in CSV form, for example to build a dataset of posts from an account or hashtag. It can borrow cookies from a local browser, and some functions only work when that browser is logged in to TikTok.

Footprint is passive: it reads its own index or third-party records and does not contact the target. No account is needed. There is no public API.

## Features

- Video download
- Metadata export to CSV
- Comment collection
- User and hashtag page collection
- Full JSON object export

## Pros

- Saves media and metadata together for evidence
- Simple Python functions
- Widely used in academic research
- Open source (BSD-3-Clause)

## Cons

- Can stop working whenever TikTok changes its pages
- Hashtag and user collection returns only about 30 videos per call
- Some functions need a logged-in browser on the same machine

## When to use it

- Use it when you need to archive a set of TikTok videos with their metadata.
- Use it when you want the comments under a TikTok video in a spreadsheet.

## Quick start

pip:

```
pip install pyktok
playwright install
```

## Alternatives

- [Archivarix Tube Search](https://osinttools.io/tools/archivarix-tube-search/): Search engine for deleted YouTube videos that recovers titles, descriptions, thumbnails and subtitles from web archives. (Freemium · URL, Username · passive)
- [Arctic Shift](https://osinttools.io/tools/arctic-shift/): Free Reddit archive with a web search for posts and comments by subreddit, author, date and text, plus an API and dumps. (Free · Username, URL · passive · 1,933 GitHub stars)
- [Deleted Tweet Finder](https://osinttools.io/tools/deleted-tweet-finder/): Henk van Ess's form that checks a tweet or X profile URL against several web archives and search engine caches in one go. (Free · URL, Username · passive)
- [Facebook GraphQL Scraper](https://osinttools.io/tools/facebook-gql-scraper/): Python library that collects Facebook profiles, posts, comments, reactions, groups and Marketplace data through Facebook's GraphQL. (Open source · Username, URL · passive · 97 GitHub stars)
- [Junkipedia](https://osinttools.io/tools/junkipedia/): Application-only platform for tracking and analysing public posts across 15 social platforms, built for public-interest researchers. (Freemium · Username, URL · passive)
- [Maltego Telegram](https://osinttools.io/tools/maltego-telegram/): Maltego transforms for Telegram that link channels, users, sticker pack owners, similar channels and deleted posts. (Open source · Username, URL · active · 604 GitHub stars)

All alternatives to Pyktok in one table: https://osinttools.io/tools/pyktok/alternatives/

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
