# TikTok Creator Search (`devcake/tiktok-creator-apify`) Actor

Find and scrape TikTok creators by niche, keyword, topic, or brand with an influencer search tool. Discover UGC creators and collect public profile data.

- **URL**: https://apify.com/devcake/tiktok-creator-apify.md
- **Developed by:** [devcake](https://apify.com/devcake) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 23 total users, 2 monthly users, 96.7% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 🔎 TikTok influencer search by niche, keyword, or name

This **TikTok influencer search tool** helps you discover public TikTok creators by creator name, username, niche, brand, or keyword. Enter up to 10 search terms and collect matching creator profiles in a structured Apify dataset—without a TikTok login, browser, phone, or emulator.

Turn searches such as `fitness coach`, `skincare`, `OpenAI`, or a username into ranked creator profiles. Every row retains the query that found it for easier review and shortlisting.

**Recent videos are included at no extra charge.** Enable `includeRecentPosts` to attach each
creator's latest available videos, then read them in the **Recent content** and **Recent videos**
output views. Normal creator-result and optional profile-enrichment charges still apply.

### ✨ What can this TikTok influencer search tool do?

- 🔍 **Search creators your way:** Use names, usernames, niches, topics, brands, or keywords.
- 📚 **Run multiple searches together:** Submit 1–10 queries in a single run.
- 🎯 **Choose your target size:** Request 20–1,000 creators per query. TikTok may return fewer when fewer matching accounts are available.
- 👤 **Enrich public profiles:** Optionally add bios, bio links, public counters, region, and full profile images.
- 🎬 **Collect recent posts at no extra charge:** Optionally attach creators' latest videos, including captions, dates, public metrics and links.
- 📖 **Review videos comfortably:** Expand videos within a creator row or switch to a readable per-video table with dates, engagement metrics and watch links.
- 🧹 **Keep results organized:** Duplicate suggestions are removed within each query. Optional unique mode combines overlapping creators across queries and retains every matched query and rank.
- 📤 **Export creator data:** Download JSON, CSV, Excel, XML, or another Apify-supported format.
- ⚙️ **Automate repeat searches:** Run the Actor through Apify Console, the API, client libraries, schedules, or integrations.

### 🚀 How to search for influencers on TikTok

1. Add a clear niche or keyword to **Search queries**, such as `vegan recipes`, `personal finance`, or `gaming creator`.
2. Add more queries to explore several niches, brands, or known creators in one run.
3. Choose a target from 20 to 1,000 creators per query.
4. Turn on **Enrich profiles** when you need public bios, bio links, full counters, region, and larger profile images.
5. Turn on **Include recent posts** to review creators' actual recent publications. Choose the maximum number of videos per creator.
6. Click **Start**, review the ranked results, and export or connect the dataset to your next workflow.

Use specific phrases such as `London fitness coach` or `sustainable fashion creator` for more focused results. A query guides TikTok's suggestions; it is not a location or audience filter.

### 📥 Input

| Field | Required | What it controls |
|---|---:|---|
| `searchQueries` | Yes | 1–10 creator names, usernames, niches, brands, or keywords. |
| `maxCreatorsPerQuery` | No | Target number of creators for each query, from 20 to 1,000. Default: 20. |
| `outputMode` | No | `perQuery` (default) keeps separate query matches; `unique` returns one row per creator across queries. |
| `maxCreators` | No | Run-wide unique-creator output limit, 1–10,000. Default: 1,000. Used only in unique mode. |
| `enrichProfiles` | No | Adds available public profile details. Default: `false`. |
| `includeRecentPosts` | No | Includes latest videos in `recent_feed` at no extra charge. Default: `false`. |
| `maxRecentPostsPerCreator` | No | Maximum latest videos per creator, 1–500. Default: 12. Availability and request limits may produce fewer. |

#### Example search

```json
{
  "searchQueries": ["fitness coach", "sustainable fashion"],
  "maxCreatorsPerQuery": 100,
  "enrichProfiles": true
}
```

#### Unique creators across queries

```json
{
  "searchQueries": ["fitness coach", "personal trainer"],
  "outputMode": "unique",
  "maxCreatorsPerQuery": 100,
  "maxCreators": 150,
  "enrichProfiles": true
}
```

Unique mode completes discovery across the configured queries before enrichment and output.
It selects the first-discovered creators up to `maxCreators`, merges matches from the executed
searches, and enriches and writes each selected creator once. Discovery remains bounded by
`maxCreatorsPerQuery`, the unique target and the remaining charge budget, so provenance covers
only the results actually fetched. Fewer unique creators may be available than requested.

Each row retains `query` and `search_rank` for its first discovery and adds `matchedQueries`,
`queryRanks` and `queryCoverage`. Open the **Unique creators** dataset view to inspect them.
A creator matching multiple queries incurs one creator-result charge and at most one successful
profile-detail charge. The default `perQuery` mode preserves separate rows and charges for
creator-query matches; `maxCreators` has no effect in that mode.

#### Partial results, retries and resume

Discovery retries transient transport failures, HTTP 408/5xx and empty responses on the failing
page, with bounded backoff. HTTP 401/403/429, rejected API responses and malformed schemas are
reported without repeated retries. An exhausted page preserves its earlier creators, and a failed
query does not prevent later queries from running. Each query has a 100-page safety cap.

`OUTPUT.queryResults` includes `status` (`ok`, `partial`, `error`, or `running`), `stopReason`,
accepted `pages`, attempted `requests`, `retries`, and `discoveredCount`. `apiHasMore` retains the
upstream flag even when a repeated page triggers `no_new_creators`. `count` attributes saved rows
to their first query; `matchedCreatorCount` also counts unique rows matched by subsequent queries.
`OUTPUT.failedQueries` lists queries that produced no usable results after a search error.

Accepted discovery pages are checkpointed in `SEARCH_STATE`. Platform persistence/migration events
also save state. Restarting the same run/storage resumes unfinished discovery using saved creator
IDs, then reconciles `recordKey` values against the existing dataset before enrichment and writes.
Previously delivered rows are skipped. Completed partial/error queries retain their status; start
a new run to retry those queries. Use a fresh dataset and key-value store for a new search: a
checkpoint or dataset from another input/version is rejected.

Every mode checks the remaining charge budget before discovery and enrichment. Profile-enabled
runs reserve the worst-case combined creator/profile price, which can stop conservatively when
only a base row would fit. Dataset writes recheck the budget. `OUTPUT` is updated during the run
and on exit, including interrupted runs. In unique mode, dataset rows begin after discovery.

Dataset delivery and the platform's profile-detail charge are separate operations. Recovery skips
already delivered rows rather than replaying an uncertain charge. `detailsCharged` reports the
SDK charging count; per-query charge counts are `null` when they cannot be reconciled with saved
profiles. Checkpointed request metrics can omit work interrupted before the next checkpoint.

#### Search with recent videos

```json
{
  "searchQueries": ["OpenAI"],
  "maxCreatorsPerQuery": 20,
  "includeRecentPosts": true,
  "maxRecentPostsPerCreator": 12,
  "enrichProfiles": true
}
```

Only `includeRecentPosts` and `maxRecentPostsPerCreator` configure recent content.
The defaults are off and 12 videos (range 1–500), respectively. Every discovered creator is
eligible: no shortlist, follower, keyword or date filter is applied. The collector requests
the latest available videos and manages 10 workers, a page budget derived from the requested
count and session pacing internally. No media files are downloaded; permanent video-page links are returned.

Profile enrichment and recent posts share one profile request when both are enabled.
Disabling recent posts preserves the existing search/profile-enrichment behavior.
Removed experimental input fields are ignored, including when supplied through the API.

After discovery, feed-enabled results stream in completion order; sort by `query` and
`search_rank` for discovery order.
`queryResults[].recentFeedSeconds` measures the feed-and-save stage in per-query mode, including
dataset writes. Unique mode reports this combined stage in `recentFeedSecondsTotal`; per-query
timings are `null` because the shared batch can span several originating queries.
`profileEnrichmentSecondsTotal` measures separate profile-only requests; shared feed/profile work
is included in the feed timing.
There is no cross-run cache.

#### Recent-feed output and status

After a run, open **Output** and select the view that fits your task:

| View | What you can read |
|---|---|
| **Quick overview** | Creator profiles, followers, account flags and original search rank. |
| **Recent content** | One row per creator, collection status, video count and an expandable list of videos. |
| **Recent videos** | One displayed row per video: creator, caption, date, watch link, views, likes, comments, shares, saves, duration and hashtags. |

Switching views does not run another scrape or add charges. Recent posts must be enabled for
new runs to collect videos; the views do not retroactively enrich earlier results.

Posts are nested in `recent_feed.items` inside the existing creator row. The Actor does not create
separate post rows. Use **Recent content** for creator status/counts and an expandable videos field.
Switch to **Recent videos** to read one video per displayed row, with its caption, publication date,
views, likes, comments, shares, saves, duration, hashtags and clickable video links.
Creator profile links remain available in Recent content.
This view expands the nested data for reading only: it does not create or bill additional records.
Both views are static schema tabs; the video table has content only when videos were collected.
Creators with unavailable or empty feeds remain visible in Recent content. Export the original JSON
for full nested records. Each post includes `id`, `url`, `post_type`, `description`, `hashtags`, `created_at`,
`create_time`, `author`, `author_match`, `stats`, `is_pinned`, and available text-language/duration data.
Missing metrics are `null`, not invented zeroes. Video files and temporary CDN media links are not collected.

| Field | Meaning |
|---|---|
| `recent_feed_status` | `ok`, `partial`, or `unavailable` |
| `recent_post_count` | Number of returned videos after deduplication |
| `recent_feed.stop_reason` | Why collection stopped: `requested_limit`, `api_reported_end`, `page_limit`, or a specific failure |
| `recent_feed.pagination` | Requested/accepted pages and the API's `has_more` flag |
| `recent_feed.collected_at` | Time of the actual collection, also preserved for cached results |
| `recent_feed.cache_hit` | Whether this row reused a run-local result |

`ok` means the requested limit or API-reported end was reached; it is not proof of a
complete account history. A valid empty feed can contain zero posts. `partial` preserves
available records when collection stops early; `unavailable` means no trustworthy selection was
obtained. A feed failure never removes the creator's discovery row.

The collector verifies the profile against the original search candidate's stable ID/secUid and
verifies the author and date of every post. It checks chronological order, handles pinned posts
without jumping over recent items, and deduplicates pagination. It never substitutes keyword-search
hits for a profile feed. Captions/hashtags are evidence for a later relevance check, **not automatic
proof that a creator matches the searched niche**; no LLM scoring or transcription is performed here.

#### Concurrency, traffic and memory

- Workers reuse isolated HTTP sessions and sticky proxy connections. Sessions never cross worker threads.
- Submission is bounded to the configured worker count, not one queued future per discovered creator.
- Feed-enabled results stream in completion order; `search_rank` preserves discovery order.
- A run-local five-minute cache deduplicates identical creator identities across queries. It is capped
  at 128 entries and 16 MiB of serialized payload; Python object overhead adds memory beyond that cap.
  In per-query mode, rows retain their original query: cache reuse avoids HTTP calls, not
  dataset-row charges. Unique mode deduplicates before enrichment and billing.
- The remaining pay-per-event budget caps the number of eligible rows before feed work begins.
  Completed feed rows are saved immediately; saved post arrays are released from query aggregates.
  Hosted per-row write latency has not yet been
  benchmarked; the live performance figures come from local SDK storage in the actual Docker Actor.
- Each worker waits at least one second between requests. Pages stay sequential within a creator.
- A rate limit, verification request, login requirement or HTTP 403 pauses new feed requests for
  the run. Already in-flight requests may finish; other creators retain explicit unavailable/partial
  statuses. Transient errors are not retried by the feed collector, and private profiles are not accessed.

The `OUTPUT` summary includes post/status totals, combined collection time, actual feed HTTP requests,
cache hits, peak worker concurrency and any pause reason. `request_count` inside a cached feed describes
the original fetch; use `OUTPUT.recentFeedMetrics.requests` for total network requests in this run.
When both features are enabled, profile request time is part of `recentFeedSeconds`, not measured
again as a separate profile pass (`profileEnrichmentSeconds` is then `null`). Start with the default
concurrency; more workers are not always faster.

### 📤 What TikTok profile data is returned?

The Actor saves one row per discovered creator. Some counters can be empty in TikTok's suggestion response; enrichment requests more public profile fields when available.

| Data group | Available fields |
|---|---|
| Search context | Original query and result rank |
| Creator identity | TikTok user ID, secure user ID, username, nickname, profile URL, and avatar |
| Profile details | Bio, bio link, profile image, and region when enrichment succeeds |
| Audience and activity | Followers, following, total likes received, and video count when available |
| Account signals | Verified, business, private, TikTok Shop, seller, and live-status flags; `null` when unknown |
| Enrichment status | Whether profile enrichment was requested, enriched, partial, or unavailable |

Explicit zero counters remain `0`; missing or invalid counters remain `null`. Missing or
unrecognized account flags remain `null`, while an explicit negative flag remains `false`.
Profile-only enrichment verifies available stable user IDs/secUid against the discovery row before
merging. Conflicting or unverified identities retain the discovery data and set
`profile_enrichment_status: "unavailable"` with `profile_enrichment_reason` of
`profile_identity_mismatch` or `profile_identity_unverified`; these rows incur no profile-detail charge.

#### Example search output

With `enrichProfiles` set to `false`, each discovery result has the following shape. TikTok may omit counters from its suggestion response, in which case their values are `null`.

```json
{
  "query": "fitness coach",
  "id": "1234567890123456789",
  "sec_uid": "MS4wLjABAAAA-example-secure-user-id",
  "unique_id": "coachmaya",
  "nickname": "Maya | Fitness Coach",
  "url": "https://www.tiktok.com/@coachmaya",
  "avatar": "tos-useast5-avt-0068-tx/example-avatar.jpeg",
  "follower_count": null,
  "video_count": null,
  "verified": false,
  "business": true,
  "private": false,
  "shop": false,
  "live": false,
  "search_rank": 1,
  "profile_enrichment_status": "not_requested",
  "profile_source": null
}
```

#### Example enriched profile output

With `enrichProfiles` set to `true`, a successful profile lookup enriches the same discovery row. The values below are illustrative; fields that are not public or available may be `null`.

```json
{
  "query": "fitness coach",
  "id": "1234567890123456789",
  "sec_uid": "MS4wLjABAAAA-example-secure-user-id",
  "unique_id": "coachmaya",
  "nickname": "Maya | Fitness Coach",
  "url": "https://www.tiktok.com/@coachmaya",
  "avatar": "https://p16-sign-va.tiktokcdn.com/example-avatar.jpeg",
  "avatar_uri": "tos-useast5-avt-0068-tx/example-avatar.jpeg",
  "signature": "Simple strength and mobility tips",
  "bioLink": "https://example.com/coachmaya",
  "follower_count": 125400,
  "following_count": 310,
  "total_likes_received": 2300000,
  "video_count": 412,
  "profile_image_url": "https://p16-sign-va.tiktokcdn.com/example-avatar.jpeg",
  "profile_region": "US",
  "profile_source": "profile-embedded-json",
  "verified": false,
  "business": true,
  "private": false,
  "shop": false,
  "live": false,
  "search_rank": 1,
  "profile_enrichment_status": "enriched"
}
```

### 💡 Popular use cases

#### Find TikTok influencers and micro-influencers

Search topics such as skincare, gaming, food, finance, travel, or fitness to find TikTok influencers, including smaller niche accounts, then export the results for campaign qualification.

#### TikTok creator discovery for brands and agencies

Run several product, competitor, or campaign terms together. Use search rank, account flags, and optional profile details to create a first-pass creator list.

#### TikTok user search by name or username

Run a TikTok user search with a display name, full username, or partial username to find matching public accounts and profile URLs.

#### Collect TikTok profile data

Enable enrichment to add available bios, bio links, counters, region, and full avatar URLs to discovery results.

#### Create a repeatable TikTok user search API workflow

Run searches through Apify's API or schedules, then send the dataset to spreadsheets, databases, dashboards, or other integrations.

### 🔄 A focused alternative to TikTok One and influencer platforms

This Actor is a focused alternative to TikTok One's Creator Marketplace and full influencer suites for public account discovery and structured data—not campaign management.

| Existing option | Best fit | When to choose this Actor |
|---|---|---|
| TikTok app search | Interactive, one-query browsing | Run 1–10 keywords or names together and save ranked public profiles. |
| TikTok One / Creator Marketplace | Official filters, analytics, invitations, and projects | Discover creators by keyword or name without TikTok One access, then export or automate the dataset. |
| HypeAuditor, Modash, or Heepsy | Broader databases, analytics, vetting, outreach, tracking, or payments | Use a focused TikTok workflow billed per result, with API access and optional public-profile enrichment. |

Choose this Actor for batch discovery, API or scheduled runs, and structured exports. Choose a full suite when you need audience demographics, engagement analysis, contact discovery, invitations, messaging, payments, or campaign reporting.

### 💵 Pricing

This Actor uses pay-per-result pricing with no start fee. Recent posts stay nested inside creator
rows and are **included at no extra charge**, regardless of the number returned. Reading the expanded
Recent videos view is also free of additional Actor charges. Enabling collection increases run time
and proxy usage; existing creator and optional profile-enrichment charges remain:

| Result | Price |
|---|---:|
| Discovered creator | **$0.005** |
| Successful profile enrichment | **+$0.002** |
| Recent posts attached to a creator | **Included — $0 extra** |

For example, 100 regular creator results cost **$0.50**. If all 100 profiles are successfully enriched, the total is **$0.70**. A blocked, private, or unavailable profile still keeps its discovery row but does not incur the enrichment charge.

### 🔗 Related TikTok Actors

Need a different kind of TikTok data? Continue your research with these Actors:

- 🎬 **[TikTok Video & Comments Scraper](https://apify.com/devcake/tiktok-search-video-comments):** Search public TikTok videos by keyword, collect engagement metrics, and optionally extract public comments for trend, product, competitor, and audience research.
- 🛍️ **[TikTok Shop Data Scraper](https://apify.com/devcake/tiktok-shop-data-scraper):** Extract TikTok Shop product data, including prices, reviews, seller information, and categories for e-commerce research and product discovery.

### ⚠️ Important limitations

- The Actor returns **creator accounts**, with recent public posts only when requested. It does not collect comments, follower lists, audience demographics, or private contact details.
- Search results come from TikTok's creator suggestions and are not a complete TikTok influencer database.
- The requested result count is a target, not a guarantee. A search stops when TikTok returns no new matching creators.
- The current search environment uses US routing and does not provide country, language, follower-range, engagement, or audience filters.
- Profile enrichment works only when a public profile is available. Unavailable profiles remain in the dataset with an appropriate status.
- Recent feeds use an unofficial public-web endpoint. Availability and full account-history coverage are not guaranteed. Private feeds, CAPTCHA, login automation, downloads, transcripts and niche classification are not included.
- Results can change as TikTok updates profiles, recommendations, and platform behavior.

### ❓ Frequently asked questions

#### How to find a TikTok creator?

Enter a creator name, username, niche, brand, or keyword in `searchQueries`, choose a target, and run the Actor. TikTok returns matching creator suggestions in ranked order. Enable enrichment for available bios and public account counters, then export the dataset to qualify the creators.

#### Can I search TikTok users by name?

Yes. The Actor works as a TikTok username search tool for public accounts. Search a full or partial display name or username to return available usernames, nicknames, profile URLs, TikTok IDs, and result ranks without providing TikTok credentials or accessing private account data.

#### Why are some results or profile fields missing?

TikTok may return fewer suggestions than requested or omit counters. The Actor requests additional deduplicated results where possible. Turn on `enrichProfiles` for more public details; private, blocked, or unavailable profiles remain in the dataset with an enrichment status.

#### Can I export the TikTok creator list?

Yes. Download the dataset from Apify Console in JSON, CSV, Excel, XML, or another supported format, or retrieve it through the Apify API.

### 🛡️ Responsible use

This Actor collects publicly available TikTok creator information. Use it lawfully, respect privacy and intellectual-property rights, follow applicable data-protection rules, and review TikTok's terms. Review the included licensing notices before redistributing the Actor image.

# Actor input Schema

## `searchQueries` (type: `array`):

Enter creator names, usernames, niches, or keywords. Duplicate query strings are removed. Choose Unique creators to combine overlapping creator results across queries.

## `outputMode` (type: `string`):

Per query preserves the existing output. Unique mode discovers across all queries first, then enriches and saves each creator once, with all matched queries and ranks. Each emitted creator is charged once.

## `maxCreatorsPerQuery` (type: `integer`):

Choose a target of 20 to 1,000 creators for each query. Large searches use additional deduplicated requests, and TikTok may return fewer creators when fewer matching accounts are available.

## `maxCreators` (type: `integer`):

Run-wide output limit in Unique creators mode only. First-discovered creators are selected; later searches still add matching queries to those creators. Ignored in per-query mode.

## `enrichProfiles` (type: `boolean`):

Fetch public profiles to add bio, bio link, followers, following, likes, video count, region, and full avatar URL. When recent posts are also enabled, both features share the same profile request. Successful enrichment retains its existing add-on charge.

## `includeRecentPosts` (type: `boolean`):

Collect the latest available public videos for every discovered creator, with captions, dates, metrics and permanent links. Adds run time and proxy usage. Unavailable feeds retain their creator row and report a reason. Concurrency is managed automatically.

## `maxRecentPostsPerCreator` (type: `integer`):

Choose the maximum number of latest videos to collect per creator (1–500). Privacy, availability and the internal request budget can produce fewer. Used only when Include recent posts is enabled.

## Actor input object example

```json
{
  "searchQueries": [
    "OpenAI"
  ],
  "outputMode": "perQuery",
  "maxCreatorsPerQuery": 20,
  "maxCreators": 1000,
  "enrichProfiles": false,
  "includeRecentPosts": false,
  "maxRecentPostsPerCreator": 12
}
```

# Actor output Schema

## `results` (type: `string`):

Creator rows with optional recent posts. Per-query mode preserves separate query matches; unique mode combines matches into one billable row per creator.

## `summary` (type: `string`):

Saved counts, discovery status, stop reasons, retries, failed queries and budget limits. Updated during the run and on exit.

## `recentVideos` (type: `string`):

Readable video rows with creator, caption, date, views, likes, comments, shares and links. Populated when Include recent posts is enabled; no extra charge.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "OpenAI"
    ],
    "maxCreatorsPerQuery": 20,
    "maxRecentPostsPerCreator": 12
};

// Run the Actor and wait for it to finish
const run = await client.actor("devcake/tiktok-creator-apify").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["OpenAI"],
    "maxCreatorsPerQuery": 20,
    "maxRecentPostsPerCreator": 12,
}

# Run the Actor and wait for it to finish
run = client.actor("devcake/tiktok-creator-apify").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "OpenAI"
  ],
  "maxCreatorsPerQuery": 20,
  "maxRecentPostsPerCreator": 12
}' |
apify call devcake/tiktok-creator-apify --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devcake/tiktok-creator-apify"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/w4wIbrsG9E9AHKgg8/builds/CGzee5a7734TByzLq/openapi.json
