Call it
curl https://api.peume.com/v1/call/pull-tiktok-posts \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"hashtags": [
"duet"
],
"resultsPerPage": 100,
"profiles": [
"gordonramsayofficial"
],
"profileSorting": "latest",
"excludePinnedPosts": false,
"oldestPostDateUnified": null
}
}'const res = await fetch("https://api.peume.com/v1/call/pull-tiktok-posts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"hashtags": [
"duet"
],
"resultsPerPage": 100,
"profiles": [
"gordonramsayofficial"
],
"profileSorting": "latest",
"excludePinnedPosts": false,
"oldestPostDateUnified": null
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/pull-tiktok-posts",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"hashtags": [
"duet"
],
"resultsPerPage": 100,
"profiles": [
"gordonramsayofficial"
],
"profileSorting": "latest",
"excludePinnedPosts": False,
"oldestPostDateUnified": None
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: pull-tiktok-posts.
Parameters
hashtagsarrayHashtags to scrape videos from. The leading # is optional.
Example: ["duet"]
resultsPerPageintegerOptional. Maximum number of items to scrape per source (hashtag, profile, search query, URL). Leave empty for no per-source limit. Maximum number of items in total still caps the whole run.
Example: 100
profilesarrayTikTok usernames (with or without @) or numeric user IDs to scrape videos from.
Example: ["gordonramsayofficial"]
profileSortingstringOrder of posts scraped from profiles (profile URLs and profiles). Leave empty to use the default order (latest).
latest · popular
Example: latest
excludePinnedPostsbooleanSkip posts pinned to the top of the profile.
Example: false
oldestPostDateUnifiedstringOnly keep profile posts uploaded on or after this date. Accepts a date (YYYY-MM-DD) or a number of days (e.g. 30 or "30 days"). Ignored with Popular sorting.
Example: null
newestPostDatestringOnly keep profile posts uploaded on or before this date. Accepts a date (YYYY-MM-DD) or a number of days (e.g. 7 or "7 days"). Ignored with Popular sorting.
Example: null
leastDiggsintegerOnly keep profile posts with at least this many likes. Ignored when a date filter is set.
Example: 0
mostDiggsintegerOnly keep profile posts with at most this many likes. Ignored when a date filter is set.
Example: 1000000000
keywordsarraySearch keywords/terms you want to search from TikTok.
Example: ["Artificial Intelligence","podcast"]
sortTypestringSort type for search. Only works with keyword search — does not apply to startUrls or other input methods.
RELEVANCE · MOST_LIKED · DATE_POSTED
Example: RELEVANCE
dateRangestringDate range for search. It uses the standard date filtering of TikTok search.
DEFAULT · ALL_TIME · YESTERDAY · THIS_WEEK · THIS_MONTH · LAST_THREE_MONTHS · LAST_SIX_MONTHS
Example: DEFAULT
startUrlsarrayPaste the TikTok URLs, and get the results immediately. Video, Photo, User, Search, Tag, Music and Location URLs are supported.
Example: ["https://www.tiktok.com/@billieeilish/video/7050551461734042926","https://www.tiktok.com/@rabbitbrandmy/photo/7553874290735729940","https://www.tiktok.com/@gordonramsayoffici
postURLsarrayTikTok video or photo URLs to scrape directly.
Example: ["https://www.tiktok.com/@billieeilish/video/7050551461734042926"]
locationstringEnables the actor to retrieve the results from that specific region/location, given by an ISO 3166-1 alpha-2 country code.
AF · AL · DZ · AS · AD · AO · AI · AQ · AG · AR · AM · AW …
Example: US
maxItemsintegerMaximum number of items that you want as output.
Example: 1000
includeSearchKeywordsbooleanIf selected, a `keyword` field is added to each post found by keyword search, containing the search query that returned it.
Example: false
customMapFunctionstringJavaScript function to transform each output video. Use to add computed fields, modify values, or remove unnecessary data. NOT intended for filtering - filtering may result in automatic bans. Must be a single synchronous function, e.g. (object) => { return {...object} }. It runs in a sandbox with plain JavaScript only (no network or require) and about 1 second per item. Leave empty if you do not need to transform the output - an unusable function is ignored and the original items are saved instead.
Example: (object) => { return {...object} }
outputConnectorstringPick an MCP connector you authorized in Console → Settings → API & Integrations → MCP connectors (e.g. Notion, Todoist — any service whose MCP server offers non-destructive write tools works best-effort). The scraped results are written through your own connector — the Actor never sees your third-party credentials. Only non-destructive write tools are used; it can never delete or overwrite your existing data.
deliverTargetstringWhere to write into the connector — paste the URL or ID. Notion example: Leave empty for services that need no target (e.g. Todoist Inbox, Slack). For Notion, share the page or database with your connector first (Notion's ••• → Connections menu), and point at a PAGE for structured columns (the Actor builds the database for you) — an empty database receives only the title (the rest of each record goes to the row's body).
deliverModestringperPost writes one record per scraped item; summary writes a single roll-up for the run.
perPost · summary
Example: perPost
deliverMaxItemsintegerCap on how many records perPost mode writes to the connector; ignored in summary mode. Leave empty to deliver everything scraped.
