Answers

How much budget does a student need for social media data for a thesis?

Short answer

Less than most students expect. A typical thesis corpus of 5,000 Weibo posts and 20,000 Bilibili comments costs $3.00 on okdata, because Weibo search is $0.002 for about 10 posts and Bilibili comments are $0.002 for about 20. Run a pilot on the free trial credit first, then budget for the full pull plus one re-collection.

Most theses that study public opinion online need a few thousand posts and somewhere between 10,000 and 50,000 comments. At per-page prices that is a small line in a research budget, often smaller than the transcription or survey costs next to it.

Three common designs

Design Endpoints Calls Cost
5,000 Weibo posts on a topic Weibo post search 500 $1.00
20,000 comments under 100 Bilibili videos Bilibili video comments 1,000 $2.00
10,000 Douyin comments Douyin video comments 500 $1.00
10,000 TikTok comments for a cross-platform chapter TikTok video comments 200 $0.40

Plan the budget as pilot, full collection, then one re-collection in case a supervisor asks for another keyword or a later date range. Every new key comes with $0.10, enough for a small pilot on the cheaper endpoints to check that the data can answer your research question.

A collection script that documents itself

import csv, os, requests

URL = "https://api.okdata.online/v1/weibo/posts/search"
H = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}

def collect(query, pages, path):
    cursor = None
    with open(path, "w", newline="", encoding="utf-8") as f:
        w = csv.writer(f)
        w.writerow(["id", "published_at", "text", "likes", "reposts", "comments", "fetched_at"])
        for _ in range(pages):
            params = {"query": query, "sort": "latest", **({"cursor": cursor} if cursor else {})}
            body = requests.get(URL, headers=H, params=params, timeout=60).json()
            if body["code"] != "ok":
                raise RuntimeError(f"{body['code']}: {body['message']}")
            for p in body["data"]["items"]:
                m = p["metrics"]
                w.writerow([p["id"], p["published_at"], p["text"], m["likes"], m["reposts"], m["comments"], body["meta"]["fetched_at"]])
            if not body["page"]["has_more"]:
                break
            cursor = body["page"]["next_cursor"]

For the methods section

  • Record the exact query, sort order, collection dates and the fetched_at time of each page. Platform search results change, so the date is part of the dataset.
  • Say that only public posts visible at collection time were included, and that deleted or private content is absent.
  • Remove or hash usernames before analysis, store raw files securely, and get ethics approval if your university requires it. Public posts still contain personal information.

Cheaper or more official routes

If you are at an eligible university, TikTok's Research API is free after an application and project approval, and is the stronger choice for a TikTok-only thesis. Existing public datasets cost nothing and are worth checking first. Open-source crawlers are free too if you have time to keep them running. The word-of-mouth guide shows how to go from comments to themes.

Updated