Baidu Tieba 贴吧 Scraper
Pricing
from $1.99 / 1,000 posts
Baidu Tieba 贴吧 Scraper
Scrape Baidu Tieba 百度贴吧 posts, comments and replies from keyword search, forum tabs, hot topics, user profiles and post links. Get text, images, videos, views, likes, author level, IP region and forum data. No login. Export JSON, CSV, Excel or use the API.
Pricing
from $1.99 / 1,000 posts
Rating
0.0
(0)
Developer
ParseBird
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Security
Limited permissionsShare
Baidu Tieba 贴吧 Scraper
Baidu Tieba Scraper extracts public posts, comments and replies from Baidu Tieba (百度贴吧), China's largest forum community. Search Tieba by keyword, scrape forum (吧) tabs, hot topics (话题) and user profiles, or paste post links. Each post comes back with its text, images, video, views, replies, likes, saves, shares, author and forum data. Comments come with the author's level, gender and IP region. You don't need a Baidu account, a cookie or an API key.
| One row per Tieba post (30+ fields) and, if you want them, one row per comment (楼层) and reply (楼中楼), from keyword search, forum tabs, hot topics, user profiles or post links. |
Copy to your AI assistant
Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.
Apify Actor: parsebird/baidu-tieba-scraper. Scrapes public Baidu Tieba (tieba.baidu.com, 百度贴吧) posts, comments and replies without login. Call via ApifyClient: client.actor("parsebird/baidu-tieba-scraper").call(run_input={"searchTerms": ["AI"], "sortSearchBy": "latest", "maxPosts": 50}). Inputs (combine any): searchTerms (string[]: keywords, one search each), sortSearchBy ("most_relevant" | "latest" | "oldest", default "most_relevant"), searchWithinForum (string: forum name, ID or https://tieba.baidu.com/f?kw= URL to search inside one forum), forums (object[]: {forum: name | ID | URL, tabs: ["highlights" | "popular" | "latest" | "video"], customTabs: string[] of the forum's own Chinese tab names, maxPostsPerTab: integer}), urls ({url}[]: post URLs https://tieba.baidu.com/p/<id>, profile URLs https://tieba.baidu.com/home/main?id=tb.1.… or ?un=<name>, hot topic URLs https://tieba.baidu.com/hottopic/browse/hottopic?topic_id=…, forum URLs /f?kw=…), topics (string[]: topic names like 剧情 or #剧情), sortTopicPostsBy ("hottest" | "latest"), maxCommentsPerPost (integer, default 0), maxRepliesPerComment (integer, default 0), sortCommentsBy ("popular" | "latest" | "oldest", default "latest"), maxPosts (integer, default 50, 0 = no limit: per search term, topic, profile or forum link), proxyConfiguration (optional). Output: dataset rows with type "post" (postId, threadId, url, title, content, images[{width,height,smallPic,waterPic,bigPic}], videoInfo{playUrl,playCount,duration,thumbnailUrl,height,width}, authorName, authorId, authorIsVerified, authorLevel, authorAvatarUrl, ipAddress, createTime (s), createTimeUtc, viewCount, commentCount, collectCount, shareCount, agreeCount, disagreeCount, diffAgreeCount, validPostCount, forumId, forumName, forumAvatarUrl, forumPrimaryCategory, forumSecondaryCategory, sourceType, sourceValue, forumTab) or type "comment" (commentId, threadId, postUrl, floor, content, images[], mentions[{name,id}], createTime (ms), createTimeUtc, agreeCount, disagreeCount, diffAgreeCount, replyCount, authorId, authorName, authorNameShow, authorAvatarUrl, authorLevel, authorLevelInForum, authorLevelName, authorIsVerified, authorGender, ipAddress, replyToCommentId). Pricing: pay per post and per comment saved. Full API spec: https://apify.com/parsebird/baidu-tieba-scraper/api. Get your token: https://console.apify.com/settings/integrations.
What is Baidu Tieba Scraper?
Baidu Tieba Scraper turns Tieba threads into structured data. Enter a keyword, a forum or a link and click Start. You get clean rows of Tieba data: post titles and full first-floor text, image links in three sizes, video files, view and reply counts, likes and dislikes, plus the forum's name and category. Turn on comments to get each floor and its replies with the author's level and IP region. Download the results as JSON, CSV or Excel, or read them through the API.
It works as a Baidu Tieba API alternative. Baidu has no public data API for Tieba, so the Actor reads the same public data the Tieba app shows a logged-out visitor. You never have to sign in or scan a QR code.
What can Baidu Tieba Scraper do?
- 🔍 Search Tieba by keyword. Search all of Tieba, or one forum only, and sort by most relevant, latest or oldest.
- 🗂️ Scrape forum tabs. Pick 精品 highlights, 热门 popular, 最新 latest and 视频 video tabs, or any of the forum's own tabs (like 影视评论 in 电影吧) by their Chinese name.
- #️⃣ Scrape hot topics. Enter a topic name such as
剧情or paste a hot topic link, sorted by hottest or latest. - 👤 Scrape user profiles. Paste a profile link to get the threads that user started.
- 🔗 Scrape single posts. Paste post links to get the post and, if you want, its comments.
- 💬 Scrape comments and replies. Set how many floors per post and how many 楼中楼 replies per floor, sorted by popular, latest or oldest.
- 📅 Schedule and monitor. Re-run a search or forum tab every day with Apify Schedules to catch new threads.
- 🔌 API and integrations. Use the Apify API, or send results to Google Sheets, Zapier, Make, Slack or webhooks with Apify integrations. Export as JSON, CSV, Excel, XML or HTML.
What data can you extract from Baidu Tieba?
Posts (type: "post")
| Field | Description |
|---|---|
postId · threadId · url | ID of the first floor, thread ID and the tieba.baidu.com/p/… link |
title · content | Thread title and the full text of the first floor (emoji shown as [笑眼]) |
images | Each image with width, height and three sizes: smallPic (720 px), waterPic (960 px) and bigPic (original) |
videoInfo | playUrl (MP4), playCount, duration (s), thumbnailUrl, width, height. null when the post has no video |
authorName · authorId · authorLevel · authorIsVerified · authorAvatarUrl | The poster. authorLevel is their level in this forum |
ipAddress | The poster's IP region as Tieba shows it, for example 广东 |
createTime · createTimeUtc | Post time as a Unix timestamp in seconds, and as ISO 8601 in UTC |
viewCount · commentCount · validPostCount | Views, Tieba's reply count, and the number of floors still visible |
agreeCount · disagreeCount · diffAgreeCount | Likes, dislikes and likes minus dislikes |
collectCount · shareCount | Saves (收藏) and shares |
forumId · forumName · forumAvatarUrl · forumPrimaryCategory · forumSecondaryCategory | The forum (吧) and Tieba's two category levels, for example 影视综 / 影视话题 |
sourceType · sourceValue · forumTab | Which of your inputs found the post |
Comments and replies (type: "comment")
| Field | Description |
|---|---|
commentId · threadId · postUrl · floor | Comment ID, its thread and the floor number (楼层). Replies have no floor |
content · images · mentions | Comment text, image links and @mentions as {name, id} |
createTime · createTimeUtc | Comment time as a Unix timestamp in milliseconds, and as ISO 8601 in UTC |
agreeCount · disagreeCount · diffAgreeCount · replyCount | Likes, dislikes, the difference, and the number of 楼中楼 replies |
authorName · authorNameShow · authorAvatarUrl · authorId | The commenter's username, display name, avatar and ID |
authorLevel · authorLevelInForum · authorLevelName | Tieba account level, level in this forum and the forum's name for that level, for example 银幕巨人 |
authorGender · authorIsVerified · ipAddress | male, female or null, verification flag and IP region |
replyToCommentId | For replies: the floor (comment) they belong to. null for floors |
How to scrape Baidu Tieba
- Open Baidu Tieba Scraper on Apify Store and click Try for free.
- Fill in one or more inputs: Search terms, Forums, Direct URLs or Topics. You can mix them in one run.
- To get comments, set Max comments per post and, for replies, Max replies per comment.
- Set Max posts for each search term, topic, profile or forum link.
- Click Start. When the run finishes, open the Output tab. The Posts and Comments views split the two row types. Download your Tieba data as JSON, CSV, Excel, XML or HTML, or read it through the API.
Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
searchTerms | string[] | — | Keywords to search. Each keyword is a separate search |
sortSearchBy | string | most_relevant | most_relevant, latest or oldest |
searchWithinForum | string | — | Forum name, ID or URL to search inside. Empty = all of Tieba |
forums | object[] | — | {forum, tabs, customTabs, maxPostsPerTab}. tabs: highlights, popular, latest, video. customTabs: the forum's own tab names in Chinese, exactly as shown. Without tabs, latest is used |
urls | object[] | — | Post, user profile, hot topic and forum links |
topics | string[] | — | Hot topic names, with or without # |
sortTopicPostsBy | string | hottest | hottest or latest, for topics and hot topic links |
maxCommentsPerPost | integer | 0 | Floors to save per post. 0 = no comments |
maxRepliesPerComment | integer | 0 | 楼中楼 replies to save per floor. 0 = no replies |
sortCommentsBy | string | latest | popular, latest or oldest |
maxPosts | integer | 50 | Posts per search term, topic, profile or forum link. 0 = no limit |
proxyConfiguration | object | — | Optional. Not needed for normal use |
Example inputs
Search two keywords, newest first:
{ "searchTerms": ["AI", "电视剧"], "sortSearchBy": "latest", "maxPosts": 50 }
Scrape the highlights and latest tabs of 科技吧, and the custom 影视评论 tab of 电影吧:
{"forums": [{ "forum": "科技吧", "tabs": ["highlights", "latest"], "maxPostsPerTab": 30 },{ "forum": "https://tieba.baidu.com/f?kw=电影", "customTabs": ["影视评论"], "maxPostsPerTab": 30 }]}
Scrape the newest posts of a hot topic:
{ "topics": ["剧情"], "sortTopicPostsBy": "latest", "maxPosts": 50 }
Scrape a post with 20 floors and up to 10 replies each:
{"urls": [{ "url": "https://tieba.baidu.com/p/10860925843" }],"maxCommentsPerPost": 20,"maxRepliesPerComment": 10}
Output example
A post (image URLs shortened):
{"postId": 153712361553,"type": "post","url": "https://tieba.baidu.com/p/10860925843","threadId": 10860925843,"title": "被《功夫女足》片尾彩蛋搞泪目了!","authorName": "看雪不玩雪","authorId": 4090775523,"authorIsVerified": false,"authorLevel": 5,"authorAvatarUrl": "https://gss0.bdstatic.com/6LZ1dD3d1sgCo2Kml5_Y_D3/sys/portrait/item/tb.1.5b48a8ad.K37H3d0FFqmwSw03QJcC9Q?t=1793884649","content": "星爷虽然全程没出镜,但片尾字幕时,他和林子聪以背影现身,完美复刻了《少林足球》的经典造型!……","images": [{"width": 560,"height": 247,"smallPic": "https://tiebapic.baidu.com/forum/w%3D720%3Bq%3D60%3Bg%3D0/sign=…/fddeb48f8c5494ee263d511b6bf5e0fe99257e91.jpg?tbpicau=…","waterPic": "https://tiebapic.baidu.com/forum/w%3D960%3Bq%3D100/sign=…/fddeb48f8c5494ee263d511b6bf5e0fe99257e91.jpg?tbpicau=…","bigPic": "https://tiebapic.baidu.com/forum/pic/item/fddeb48f8c5494ee263d511b6bf5e0fe99257e91.jpg?tbpicau=…"}],"videoInfo": null,"createTime": 1783779579,"createTimeUtc": "2026-07-11T14:19:39.000Z","viewCount": 76185,"commentCount": 103,"collectCount": 10,"shareCount": 1,"agreeCount": 349,"disagreeCount": 21,"diffAgreeCount": 328,"validPostCount": 46,"forumId": 14,"forumName": "电影","forumAvatarUrl": "https://tiebapic.baidu.com/forum/w%3D120%3Bh%3D120/sign=…/0824ab18972bd407babbddbf6c899e510fb30977.jpg?tbpicau=…","forumPrimaryCategory": "影视综","forumSecondaryCategory": "影视话题","ipAddress": "广东","sourceType": "url","sourceValue": "https://tieba.baidu.com/p/10860925843?fr=frs","scrapedAt": "2026-11-05T13:17:31Z"}
A reply (楼中楼) under floor 153717143852:
{"type": "comment","commentId": 153734339766,"threadId": 10860925843,"postUrl": "https://tieba.baidu.com/p/10860925843","floor": null,"authorId": 3105949402,"images": [],"mentions": [],"content": "***等不到","createTime": 1784345649000,"createTimeUtc": "2026-07-18T03:34:09.000Z","agreeCount": 0,"disagreeCount": 0,"diffAgreeCount": 0,"replyCount": 0,"authorName": null,"authorNameShow": "我爱福宝FB","authorAvatarUrl": "https://himg.bdimg.com/sys/portrait/item/tb.1.1e004e71.1FXG1i0F_PCwxR799P-cLA?t=1793884651","authorLevel": null,"authorLevelInForum": 1,"authorIsVerified": false,"authorGender": null,"authorLevelName": "群众演员","ipAddress": null,"replyToCommentId": 153717143852,"scrapedAt": "2026-11-05T13:17:31Z"}
How much does it cost to scrape Baidu Tieba?
Baidu Tieba Scraper uses pay-per-event pricing. You pay for each post and each comment or reply saved to your dataset. Compute and proxy costs are included in the price. Deleted posts, invalid links and duplicates are free.
| Event | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| Post (per 1,000) | $2.99 | $2.49 | $2.29 | $1.99 |
| Comment or reply (per 1,000) | $1.79 | $1.49 | $1.29 | $0.99 |
For example, on the Free plan 100 posts cost about $0.30. The same 100 posts with 10 comments each (1,000 comments) cost about $0.30 + $1.79 = $2.09. Use Max posts, Max comments per post or a maximum cost per run in Apify Console to cap a run. The Actor stops cleanly when it reaches any of these limits.
Use the Baidu Tieba API from Python or JavaScript
Get your API token from Apify Console, then call the Actor with the Apify API client for Python or for JavaScript.
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("parsebird/baidu-tieba-scraper").call(run_input={"searchTerms": ["电视剧"],"sortSearchBy": "latest","maxPosts": 50,"maxCommentsPerPost": 10,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():if item["type"] == "post":print(item["forumName"], item["title"], item["viewCount"])
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('parsebird/baidu-tieba-scraper').call({forums: [{ forum: '科技吧', tabs: ['latest'], maxPostsPerTab: 30 }],});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items.map((p) => `${p.createTimeUtc} ${p.title}`));
The full endpoint reference, including synchronous runs that return the dataset in one call, is on the API tab.
Use cases
- Public opinion monitoring. Track what Tieba users say about a brand, product, show or game, with dates and IP regions.
- Fan and community research. Follow a forum's latest and highlighted threads to see which topics take off.
- Content and trend analysis. Compare views, replies and likes across threads, tabs and hot topics.
- Chinese-language NLP. Build corpora of forum posts and conversations with replies and @mentions.
- Competitor and market research. Collect user questions and complaints from product and industry forums.
How it works
- Each input becomes a list of threads: search results, a forum tab, a hot topic, a user's threads or a single post.
- Each thread is opened through Tieba's public app data, which gives the full first floor, counts, author and forum details.
- If you asked for comments, the Actor reads the thread's floors in the order you chose, then each floor's 楼中楼 replies.
- Rows are saved and charged as they come in. A post found by two inputs is saved once. A run that Apify moves to another server resumes without duplicates.
FAQ
Do I need a Baidu account, cookie or API key? No. The Actor reads public Tieba data the way a logged-out visitor sees it.
How does "popular" comment sorting work?
Tieba doesn't publish a hot ranking of floors to logged-out visitors. With popular, the Actor reads up to the first 300 floors of a thread (at least 3× your comment limit) and returns the most-liked ones first. latest starts from the newest floor and oldest follows the thread from the top.
Which tabs can I use with customTabs?
Any tab the forum shows, written exactly as on Tieba, for example 影视评论 or 吧友互助 in 电影吧. If a name doesn't match, the log lists the forum's real tab names. 热门, 最新, 精品 and 视频 also work there.
Why is ipAddress or authorLevel empty on some comments?
Tieba doesn't return the IP region or account level for 楼中楼 replies, so those fields are null on replies. The forum level (authorLevelInForum) is still there.
What's the difference between commentCount and validPostCount?
commentCount is Tieba's own reply count, which also counts 楼中楼 replies. validPostCount is the number of floors still visible in the thread.
Why does some comment text contain ***?
Tieba masks some words itself. The Actor returns the text exactly as Tieba serves it.
A post appears in two of my forum tabs. Why do I get it only once? Each post is saved and charged once per run, even when several inputs find it. The row records the first input that found it.
Which profile links work?
https://tieba.baidu.com/home/main?id=tb.1.… links (the id is the user's portrait ID) and https://tieba.baidu.com/home/main?un=<username> links. The Actor returns the threads the user started.
Can I download videos and images?
Yes. videoInfo.playUrl is a direct MP4 link and bigPic is the original image. Tieba signs these links, so download the files soon after the run.
Why did an input return nothing? The post or user was deleted or hidden, the forum or topic doesn't exist, or the link is wrong. The log lists it as "not found", and it isn't charged.
Can I schedule recurring runs? Yes. Use Apify Schedules to run hourly, daily or weekly.
Can I use it with Make, Zapier, Google Sheets or an AI agent? Yes, through Apify integrations and the Apify API. The Actor is also available to AI agents through the Apify MCP server.
Something doesn't work. What should I do? Open an issue on the Issues tab with your run link. We read every report.
Is it legal to scrape Baidu Tieba?
This Actor only collects publicly available data that any logged-out visitor can see on Tieba. It doesn't log in or access private content. Posts and comments can still include personal data, such as usernames and IP regions, which is protected by laws such as China's Personal Information Protection Law (PIPL) and the EU's GDPR. Don't scrape personal data unless you have a legitimate reason, and check Baidu's terms of service before you use the data. Posts are copyrighted by their authors, so get permission before you republish them. If you're unsure, consult a lawyer. Read more in Apify's guide: Is web scraping legal?
Related Actors
| Actor | What it does |
|---|---|
| Baidu 百度 Search Scraper | Baidu search results for any keyword, with Baidu's AI answer, news, videos and the 百度热搜 hot list |
| Toutiao 头条 Scraper | Toutiao articles, videos and 微头条 posts from links or whole profiles |
| Bilibili 哔哩哔哩 Scraper | Bilibili videos, comments, danmaku and UP主 profiles |
| Kuaishou 快手 Scraper | Kuaishou videos with MP4 links, music and creator stats |
| Sogou WeChat Article Search Scraper | WeChat Official Account articles found through Sogou's WeChat search |
| NetEase Cloud Music Scraper | NetEase Cloud Music toplists and playlists with tracks, artists and popularity |