Dành cho AI

TikTok API: video, bình luận, tài khoản, LIVE, quảng cáo, Shop

25 TikTok endpoints covering videos, accounts, ads, comments, hashtags, live streams, Creative Center and shop, from $0.002 a call. No TikTok account or cookie needed.

Bắt đầu miễn phí Try Tìm kiếm video TikTok
Kết nối AI của bạn

Dán câu này vào agent của bạn

Đọc https://okdata.online/agents.md và thiết lập okdata cho tôi; khóa của tôi nằm trong biến môi trường OKDATA_API_KEY.

Claude Code, Cursor, Codex và các agent khác có thể mở liên kết sẽ tự thiết lập từ đó.

MCP serverhttps://api.okdata.online/mcp

Ask about TikTok from Claude, Cursor and other agents: the TikTok MCP page

Endpoint
25 endpoint
Trong 8 nhóm, một định dạng phản hồi
Giá thấp nhất
Từ $0.002
Một lệnh gọi, trả từ số dư trả trước
Độ mới
Live
Các bảng là snapshot dùng chung, cũ tối đa 5 phút
Phí hằng tháng
$0
Không cần gói đăng ký hay mức chi tối thiểu

Mọi endpoint TikTok

Mỗi endpoint một dòng: request, dữ liệu trả về và giá một lượt gọi.

Video

6

Tài khoản

4

Quảng cáo

1

Bình luận

1

Hashtag

1

Live stream

3

Creative Center

2Về nhóm này

Giá tính theo lượt gọi trừ khi ghi /item. Lượt gọi đã tới nền tảng vẫn bị tính phí ngay cả khi trả về rỗng hoặc thất bại.

Mọi người làm gì với dữ liệu TikTok

Mỗi tác vụ có trang riêng với các endpoint nó dùng, một lần chạy mẫu và chi phí.

Bắt đầu trong ba bước

The example is Tìm kiếm video TikTok; every TikTok endpoint is called the same way and answers in the same shape.

  1. Lấy key

    Tạo tài khoản và khóa trong console. Khóa mới đi kèm $0.20 để dùng thử, không cần thẻ.

    Mở console

  2. Kết nối AI của bạn, hoặc tự gọi API

    Dán câu này vào Claude Code, Cursor, Codex hoặc agent khác có thể mở link, và nó sẽ tự thiết lập. Hoặc gửi request bên dưới với key của bạn trong header Authorization.

    Hãy thiết lập okdata cho tôi theo https://okdata.online/agents.md. Đây là API key okdata của tôi: okd_…. Hãy giữ an toàn và dùng nó cho mọi lệnh gọi okdata.

    Thay phần giữ chỗ bằng key của bạn, hoặc đăng nhập và sao chép bản đã điền sẵn key.

  3. Thực hiện lượt gọi đầu tiên

    Các mục nằm trong data.items (một đối tượng trong data.item), trang tiếp theo trong page.next_cursor và số tiền bị tính trong meta.billing.amount.

    cURL

    curl -G "https://api.okdata.online/v1/tiktok/videos/search" \
      -H "Authorization: Bearer $OKDATA_API_KEY" \
      --data-urlencode 'query=ai agents'

    Python

    import os
    import requests
    
    resp = requests.get(
        "https://api.okdata.online/v1/tiktok/videos/search",
        headers={"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"},
        params={"query": "ai agents"},
        timeout=60,
    )
    body = resp.json()
    if body["code"] != "ok":
        raise RuntimeError(f"{body['code']}: {body['message']} (charged: {body['charged']})")
    
    for row in body["data"]["items"]:
        print(row["id"], row["metrics"]["likes"], row["text"][:60])
    print("cost: $" + body["meta"]["billing"]["amount"])

    TypeScript

    const url = new URL('https://api.okdata.online/v1/tiktok/videos/search');
    url.searchParams.set('query', "ai agents");
    
    const res = await fetch(url, {
      headers: {
        Authorization: `Bearer ${process.env.OKDATA_API_KEY}`,
      },
    });
    const body = await res.json();
    if (body.code !== 'ok') throw new Error(`${body.code}: ${body.message}`);
    
    for (const row of body.data.items) {
      console.log(row.id, row.metrics.likes, row.text.slice(0, 60));
    }
    console.log('cost: $' + body.meta.billing.amount);

    MCPtools/call

    {
      "name": "call",
      "arguments": {
        "capability": "tiktok.videos.search",
        "query": "ai agents"
      }
    }

Câu hỏi về TikTok API

TikTok API giá bao nhiêu?

Each of the 25 endpoints has its own price, from $0.002 to $0.044 a call; the cheapest is Phản hồi bình luận TikTok at $0.002. You pay per call from a prepaid balance, with no subscription. A call that reaches the platform is charged even when it comes back empty, not found or failed; one stopped before that, such as for bad parameters, is free.

Tôi có cần tài khoản hoặc cookie TikTok không?

No. You call https://api.okdata.online with one okdata key and get public TikTok data back; you never use your own TikTok account, cookie or QR login.

Dữ liệu mới đến mức nào?

A request reads TikTok when you call, unless the same request was answered a short while ago: then the answer can come from the result cache, with meta.cached: true and meta.fetched_at saying when it was read (lists and searches up to 30 minutes old, one post or product up to 1 hour, profiles up to 6 hours). Hot lists come from a shared snapshot that is at most 5 minutes old.

AI agent của tôi có dùng được API TikTok không?

Có. Kết nối MCP server tại https://api.okdata.online/mcp: công cụ find liệt kê 25 endpoint này kèm giá, và công cụ call chạy chúng bằng key của bạn.

Tôi có thể dùng thử miễn phí không?

New accounts get $0.20 of trial credit with no card: enough for 100 calls to Phản hồi bình luận TikTok.

Kết nối một lần, sau đó chỉ cần hỏi.

Mỗi khóa mới đi kèm $0.20 để dùng thử. Một câu là kết nối được agent của bạn.

Bắt đầu miễn phí
Kết nối AI của bạn

Dán câu này vào agent của bạn

Đọc https://okdata.online/agents.md và thiết lập okdata cho tôi; khóa của tôi nằm trong biến môi trường OKDATA_API_KEY.

Claude Code, Cursor, Codex và các agent khác có thể mở liên kết sẽ tự thiết lập từ đó.

MCP serverhttps://api.okdata.online/mcp