The problem#
Choosing creators means opening the same handful of facts on each network: who they are, how big the audience is, what they posted recently. Doing it by hand does not scale past a dozen names, and each network exposes those facts differently.
Onekey returns author, audience and content fields in one schema, so the comparison table is the same code for every network.
Endpoints to call#
| Endpoint | Used for | Credits | Status |
|---|---|---|---|
youtube.channel_search | Find YouTube channels for a niche keyword. | 2 | stable may need a pack |
youtube.channel_profile | Channel name, handle, audience size and description. | 1 | stable may need a pack |
youtube.channel_videos | Latest uploads with view counts, to judge how active the channel is. | 2 | stable may need a pack |
x.user | Public X profile: followers, following, bio. | 1 | stable may need a pack |
tiktok.profile | Public TikTok profile: followers, likes, video count. | 2 | beta may need a pack |
Each endpoint name links to its reference page with every parameter, the caching window and a recorded response.
Your first call#
This is youtube.channel_profile (1 credit). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.
curl "https://api.onekey.dev/v1/youtube/channel_profile?channel_id=UC_x5XG1OV2P6uZZ5FSM9Ttw" \
-H "x-api-key: YOUR_API_KEY"A working script#
Search a niche, then pull each channel profile and its latest uploads, and look up the same creator on X.
import os
import requests
API = "https://api.onekey.dev"
HEADERS = {"x-api-key": os.environ["ONEKEY_KEY"]}
def call(path, **params):
"""GET /v1/<platform>/<endpoint>; returns the data or raises with the error code."""
r = requests.get(f"{API}/v1/{path}", params=params, headers=HEADERS, timeout=30)
body = r.json()
if not body["success"]:
raise RuntimeError(f"{path}: {body['error']['code']}")
return body["data"]
def get(item, field):
"""get(item, 'content.title'): a field of the unified schema, or None."""
for key in field.split("."):
item = (item or {}).get(key)
return item
NICHE = "home espresso"
for ch in call("youtube/channel_search", q=NICHE)[:10]:
profile = call("youtube/channel_profile", channel_id=get(ch, "author.id"))
print(get(profile, "author.displayName"), "|", get(profile, "ext.followersText"))
for v in call("youtube/channel_videos", channel_id=get(ch, "author.id"))[:3]:
print(" ", get(v, "content.title"), "|", get(v, "ext.viewsText"))
# The same creator elsewhere: one call per network, same fields back.
x = call("x/user", handle="jack")
print(get(x, "author.username"), get(x, "author.followers"))
tt = call("tiktok/profile", handle="tiktok") # beta
print(get(tt, "author.username"), get(tt, "author.followers"))What a month costs#
Illustrative volume, not a benchmark: A shortlist of 200 creators in a month: 20 niche searches, then for each creator a YouTube profile and upload list, an X profile and a TikTok profile.
| Endpoint | Calls | Credits per call | Credits |
|---|---|---|---|
youtube.channel_search | 20 | 2 | 40 |
youtube.channel_profile | 200 | 1 | 200 |
youtube.channel_videos | 200 | 2 | 400 |
x.user | 200 | 1 | 200 |
tiktok.profile beta | 200 | 2 | 400 |
| Total | 1,240 |
About 1,240 credits: the Starter pack (5,000 credits, $9) covers it, at $1.80 per 1,000 credits. Prices are in USD (regional pricing is planned); credits never expire. See pricing.
Every figure above assumes every call is a fresh fetch. These endpoints cache for 2 minutes to 30 minutes. Free when served from cache (0.2 credit for a cached response over 100 KB). Repeating a call inside that window costs nothing. Invalid, failed and not-found calls are not charged either.
Good to know#
- Some YouTube endpoints return audience and view numbers as display text (for example
ext.followersText) rather than exact integers. Parse them yourself if you need to rank by size. - TikTok endpoints are in beta. Only public profile data is returned; nothing that needs a login.
Keep reading#
- Response envelope
- Errors
- Credits and pricing
- Platform pages: YouTube, X, TikTok