Skip to main content

SocialTap for Python

SocialTap is the social media scraper API for developers and AI agents. Send a public link, a handle or a search and get live data back in one schema. Failed requests are free.

The Python SDK for the SocialTap API: a method for every endpoint, typed models and errors, retries and pagination. Generated from the SocialTap catalog (version 1.602.39). Docs: https://socialtap.dev/docs/. Source: https://github.com/SocialTapDev/socialtap-python.

Install

pip install socialtap

Zero dependencies (the standard library's urllib); Python 3.10+; fully typed (py.typed, checked with mypy --strict). Models are frozen dataclasses with the API's field names; None means unknown, lists are never None.

Nothing is invented: a required member that is missing or of the wrong type raises APIDecodeError, as does a 2xx that is not the API's envelope; with fields= the data is a dict of the selected members (typed overloads). Every result keeps raw (the decoded body), members this version doesn't model included. A retry-after longer than MAX_RETRY_AFTER_S raises RetryAfterExceededError instead of retrying early. Event.data is the model of its type; job items are TypedDicts per endpoint.

Async: AsyncSocialTap has the same methods as coroutines (async for over iterate). It runs the stdlib transport in a worker thread (asyncio.to_thread), which is plenty for API calls that take about a second; pass transport= (anything with send(Request) -> Response) to bring another HTTP stack.

import asyncio
from socialtap import AsyncSocialTap

async def main() -> None:
    client = AsyncSocialTap()
    res = await client.tiktok.profile.get(handle="nasa")
    print(res.data)

asyncio.run(main())

Authenticate

The client reads your API key from SOCIALTAP_API_KEY, or takes it as an option. Requests send it in the x-api-key header. Get a key at https://socialtap.dev/signup/: every account starts with 100 free credits.

First call

TikTok Profile API (tiktok.profile). Exact follower and like counts, bio and country.

from socialtap import SocialTap

client = SocialTap()  # api_key defaults to os.environ["SOCIALTAP_API_KEY"]

res = client.tiktok.profile.get(handle="nasa")
print(res.data)
print(res.credits.charged, res.meta.request_id)

data is a Profile (example response, truncated):

{
  "approximate_fields": [],
  "avatar_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/e5143212a59c09a008bf50f487d54d1f~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=9640\u0026refresh_token=13f3c5e3\u0026x-expires=4070908800\u0026x-signature=SCRUBBED\u0026t=4d5b0474\u0026ps=13740610\u0026shp=a5d48078\u0026shcp=81f88b70\u0026idc=useast8",
  "banner_url": null,
  "bio": "Making the seemingly impossible, possible.✨",
  "category": null,
  "country_code": "JP",
  "created_at": "2026-07-20T15:55:49Z",
  "display_name": "NASA",
  "external_links": [
    {
      "title": null,
      "url": "https://go.nasa.gov/3WyvlQi"
    }
  ],
  "id": "7664638705177150477",
  "is_private": false,
  "is_verified": true,
  "location": null,
  "metrics": {
    "follower_count": 2217556,
    "following_count": 23,
    "post_count": 70,
    "total_like_count": 11877309,
    "total_view_count": null
  },
  "platform": "tiktok",
  "platform_specific": {
    "tiktok": {
      "display_name_changed_at": "2026-07-20T15:58:00Z",
      "friend_count": 17,
      "is_business_account": false,
      "is_shop_seller": false,
      "language": "en",
      "liked_post_count": null,
      "sec_uid": "MS4wLjABAAAAU9BRVzC8oCaegVnia8IbqWhPb_-dbU7s00Y3wS1_Nx8g5RUaYvyXrpejgjdxTwd6"
    }
  },
  "type": "organization",
  "unknown_fields": [],
  "url": "https://www.tiktok.com/@nasa",
  "username": "nasa"
}

Every result also carries the envelope meta (request ID, source, cache status, fetch time) and credits (charged by this request, and the balance after it when the API reports it). Failed requests and cache hits are free.

Endpoints

endpoint method cost
amazon.deal_products client.amazon.deal_products.list() 1 credit
amazon.offers client.amazon.offers.list() 1 credit
amazon.product client.amazon.product.get() 1 credit
amazon.reviews client.amazon.reviews.list() 1 credit
amazon.search_products client.amazon.search_products.list() 1 credit
amazon.seller client.amazon.seller.get() 1 credit
amazon.shop client.amazon.shop.get() 1 credit
amazon.shop_lists client.amazon.shop_lists.list() 1 credit
amazon.shop_posts client.amazon.shop_posts.list() 1 credit
amazon.top_products client.amazon.top_products.list() 1 credit
applemusic.album client.applemusic.album.get() 1 credit
applemusic.artist client.applemusic.artist.get() 1 credit
applemusic.search_albums client.applemusic.search_albums.list() 1 credit
applemusic.search_artists client.applemusic.search_artists.list() 1 credit
applemusic.search_playlists client.applemusic.search_playlists.list() 1 credit
applemusic.search_tracks client.applemusic.search_tracks.list() 1 credit
applemusic.top_albums client.applemusic.top_albums.list() 1 credit
applemusic.top_playlists client.applemusic.top_playlists.list() 1 credit
applemusic.top_tracks client.applemusic.top_tracks.list() 1 credit
applemusic.track client.applemusic.track.get() 1 credit
bluesky.comments client.bluesky.comments.list() 1 credit
bluesky.post client.bluesky.post.get() 1 credit
bluesky.posts client.bluesky.posts.list() 1 credit
bluesky.profile client.bluesky.profile.get() 1 credit
bluesky.search_posts client.bluesky.search_posts.list() 1 credit
facebook.ad client.facebook.ad.get() 1 credit
facebook.ad_transcript client.facebook.ad_transcript.get() 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)
facebook.ads client.facebook.ads.list() 1 credit
facebook.advertiser client.facebook.advertiser.get() 1 credit
facebook.comments client.facebook.comments.list() 1 credit
facebook.engagement client.facebook.engagement.get() 1 credit
facebook.event client.facebook.event.get() 1 credit
facebook.events client.facebook.events.list() 1 credit
facebook.group client.facebook.group.get() 1 credit
facebook.group_posts client.facebook.group_posts.list() 1 credit
facebook.listing client.facebook.listing.get() 1 credit
facebook.photos client.facebook.photos.list() 1 credit
facebook.place_events client.facebook.place_events.list() 1 credit
facebook.post client.facebook.post.get() 1 credit
facebook.posts client.facebook.posts.list() 1 credit
facebook.profile client.facebook.profile.get() 1 credit
facebook.reels client.facebook.reels.list() 1 credit
facebook.replies client.facebook.replies.list() 1 credit
facebook.search_ads client.facebook.search_ads.list() 1 credit
facebook.search_advertisers client.facebook.search_advertisers.list() 1 credit
facebook.search_events client.facebook.search_events.list() 1 credit
facebook.search_groups client.facebook.search_groups.list() 1 credit + 1 per result filled in (with fill=true)
facebook.search_listings client.facebook.search_listings.list() 1 credit
facebook.search_places client.facebook.search_places.list() 1 credit
facebook.search_posts client.facebook.search_posts.list() 1 credit + 1 per result filled in (with fill=true)
facebook.search_profiles client.facebook.search_profiles.list() 1 credit + 1 per result filled in (with fill=true)
facebook.transcript client.facebook.transcript.get() 1 credit (captions) or 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)
github.activity client.github.activity.list() 1 credit
github.contributions client.github.contributions.get() 1 credit
github.followers client.github.followers.list() 1 credit
github.following client.github.following.list() 1 credit
github.issue client.github.issue.get() 1 credit
github.issue_comments client.github.issue_comments.list() 1 credit
github.issues client.github.issues.list() 1 credit
github.pinned_repositories client.github.pinned_repositories.list() 1 credit
github.profile client.github.profile.get() 1 credit
github.profile_pull_requests client.github.profile_pull_requests.list() 1 credit
github.readme client.github.readme.get() 1 credit
github.releases client.github.releases.list() 1 credit
github.repositories client.github.repositories.list() 1 credit
github.repository client.github.repository.get() 1 credit
github.repository_contributors client.github.repository_contributors.list() 1 credit
github.search_issues client.github.search_issues.list() 1 credit
github.search_profiles client.github.search_profiles.list() 1 credit
github.search_repositories client.github.search_repositories.list() 1 credit
github.trending_profiles client.github.trending_profiles.list() 1 credit
github.trending_repositories client.github.trending_repositories.list() 1 credit
google.ad client.google.ad.get() 1 credit
google.ads client.google.ads.list() 1 credit
google.advertiser client.google.advertiser.get() 1 credit
google.search_ads client.google.search_ads.list() 1 credit
google.search_advertisers client.google.search_advertisers.list() 1 credit
google.search_suggestions client.google.search_suggestions.list() 1 credit
hackernews.comment client.hackernews.comment.get() 1 credit
hackernews.comments client.hackernews.comments.list() 1 credit
hackernews.feed_stories client.hackernews.feed_stories.list() 1 credit
hackernews.search_comments client.hackernews.search_comments.list() 1 credit
hackernews.search_stories client.hackernews.search_stories.list() 1 credit
hackernews.story client.hackernews.story.get() 1 credit
hackernews.user client.hackernews.user.get() 1 credit
hackernews.user_comments client.hackernews.user_comments.list() 1 credit
hackernews.user_favorites client.hackernews.user_favorites.list() 1 credit
hackernews.user_stories client.hackernews.user_stories.list() 1 credit
hackernews.whoishiring_jobs client.hackernews.whoishiring_jobs.list() 1 credit
instagram.comment client.instagram.comment.get() 1 credit
instagram.comments client.instagram.comments.list() 1 credit
instagram.embed client.instagram.embed.get() 1 credit
instagram.engagement client.instagram.engagement.get() 1 credit
instagram.hashtag client.instagram.hashtag.get() 1 credit
instagram.hashtag_posts client.instagram.hashtag_posts.list() 1 credit
instagram.highlights client.instagram.highlights.list() 1 credit
instagram.place client.instagram.place.get() 1 credit
instagram.place_posts client.instagram.place_posts.list() 1 credit
instagram.playlist_stories client.instagram.playlist_stories.list() 1 credit
instagram.popular_trends client.instagram.popular_trends.list() 1 credit
instagram.post client.instagram.post.get() 1 credit
instagram.posts client.instagram.posts.list() 1 credit
instagram.profile client.instagram.profile.get() 1 credit
instagram.reels client.instagram.reels.list() 1 credit
instagram.search_hashtags client.instagram.search_hashtags.list() 1 credit
instagram.search_places client.instagram.search_places.list() 1 credit + 1 per result filled in (with fill=true)
instagram.search_posts client.instagram.search_posts.list() 1 credit
instagram.search_profiles client.instagram.search_profiles.list() 1 credit + 1 per result filled in (with fill=true)
instagram.search_sounds client.instagram.search_sounds.list() 1 credit + 1 per result filled in (with fill=true)
instagram.search_suggestions client.instagram.search_suggestions.list() 1 credit
instagram.similar_profiles client.instagram.similar_profiles.list() 1 credit
instagram.sound client.instagram.sound.get() 1 credit
instagram.sound_posts client.instagram.sound_posts.list() 1 credit
instagram.story client.instagram.story.get() 1 credit
instagram.topic client.instagram.topic.get() 1 credit
instagram.transcript client.instagram.transcript.get() 1 credit (captions) or 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)
instagram.trending_posts client.instagram.trending_posts.list() 1 credit
instagram.username client.instagram.username.get() 1 credit
kick.post client.kick.post.get() 1 credit
kick.transcript client.kick.transcript.get() 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)
komi.page client.komi.page.get() 1 credit
kwai.post client.kwai.post.get() 1 credit
kwai.posts client.kwai.posts.list() 1 credit
kwai.profile client.kwai.profile.get() 1 credit
linkbio.profile client.linkbio.profile.get() 1 credit
linkedin.ad client.linkedin.ad.get() 1 credit
linkedin.comments client.linkedin.comments.list() 1 credit (public page) or 5 credits (data partner)
linkedin.employees client.linkedin.employees.list() 5 credits
linkedin.engagement client.linkedin.engagement.get() 1 credit (public page) or 15 credits (data partner)
linkedin.following client.linkedin.following.list() 5 credits
linkedin.job client.linkedin.job.get() 1 credit
linkedin.job_related_jobs client.linkedin.job_related_jobs.list() 1 credit
linkedin.jobs client.linkedin.jobs.list() 1 credit
linkedin.liked_posts client.linkedin.liked_posts.list() 1 credit (public page) or 10 credits (data partner)
linkedin.post client.linkedin.post.get() 1 credit
linkedin.post_reactions client.linkedin.post_reactions.list() 1 credit (public page) or 5 credits (data partner)
linkedin.post_reposts client.linkedin.post_reposts.list() 1 credit (public page) or 5 credits (data partner)
linkedin.posts client.linkedin.posts.list() 1 credit (public page) or 10 credits (data partner)
linkedin.profile client.linkedin.profile.get() 1 credit (public page or web search) or 5 credits (data partner)
linkedin.profile_comments client.linkedin.profile_comments.list() 10 credits
linkedin.profile_groups client.linkedin.profile_groups.list() 5 credits
linkedin.search_ads client.linkedin.search_ads.list() 1 credit
linkedin.search_jobs client.linkedin.search_jobs.list() 1 credit
linkedin.search_posts client.linkedin.search_posts.list() 1 credit + 1 per result filled in (with fill=true)
linkedin.search_profiles client.linkedin.search_profiles.list() 1 credit + 1 per result filled in (with fill=true)
linkedin.transcript client.linkedin.transcript.get() 1 credit (captions) or 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)
linkme.profile client.linkme.profile.get() 1 credit
linktree.profile client.linktree.profile.get() 1 credit
pillar.page client.pillar.page.get() 1 credit
pinterest.board client.pinterest.board.get() 1 credit
pinterest.board_pins client.pinterest.board_pins.list() 1 credit
pinterest.boards client.pinterest.boards.list() 1 credit
pinterest.pin client.pinterest.pin.get() 1 credit
pinterest.pins client.pinterest.pins.list() 1 credit
pinterest.profile client.pinterest.profile.get() 1 credit
pinterest.search_pins client.pinterest.search_pins.list() 1 credit
pinterest.top_trends client.pinterest.top_trends.list() 1 credit
pinterest.topic client.pinterest.topic.get() 1 credit
pinterest.web_page client.pinterest.web_page.get() 1 credit
reddit.comments client.reddit.comments.list() 1 credit
reddit.engagement client.reddit.engagement.get() 1 credit
reddit.post client.reddit.post.get() 1 credit
reddit.posts client.reddit.posts.list() 1 credit
reddit.profile client.reddit.profile.get() 1 credit
reddit.profile_comments client.reddit.profile_comments.list() 1 credit
reddit.search_comments client.reddit.search_comments.list() 1 credit
reddit.search_posts client.reddit.search_posts.list() 1 credit
reddit.search_profiles client.reddit.search_profiles.list() 1 credit
reddit.search_subreddits client.reddit.search_subreddits.list() 1 credit
reddit.subreddit client.reddit.subreddit.get() 1 credit
reddit.subreddit_posts client.reddit.subreddit_posts.list() 1 credit
reddit.transcript client.reddit.transcript.get() 1 credit (captions) or 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)
rumble.comments client.rumble.comments.list() 1 credit
rumble.engagement client.rumble.engagement.get() 1 credit
rumble.post client.rumble.post.get() 1 credit
rumble.posts client.rumble.posts.list() 1 credit
rumble.profile client.rumble.profile.get() 1 credit
rumble.search_posts client.rumble.search_posts.list() 1 credit
rumble.transcript client.rumble.transcript.get() 1 credit (captions) or 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)
snapchat.comments client.snapchat.comments.list() 1 credit
snapchat.profile client.snapchat.profile.get() 1 credit
snapchat.spotlight client.snapchat.spotlight.get() 1 credit
soundcloud.artist client.soundcloud.artist.get() 1 credit
soundcloud.track client.soundcloud.track.get() 1 credit
soundcloud.tracks client.soundcloud.tracks.list() 1 credit
spotify.album client.spotify.album.get() 1 credit
spotify.artist client.spotify.artist.get() 1 credit
spotify.playlist client.spotify.playlist.get() 1 credit
spotify.playlist_tracks client.spotify.playlist_tracks.list() 1 credit
spotify.podcast client.spotify.podcast.get() 1 credit
spotify.podcast_episodes client.spotify.podcast_episodes.list() 1 credit
spotify.search_albums client.spotify.search_albums.list() 1 credit
spotify.search_artists client.spotify.search_artists.list() 1 credit
spotify.search_playlists client.spotify.search_playlists.list() 1 credit
spotify.search_podcasts client.spotify.search_podcasts.list() 1 credit
spotify.search_tracks client.spotify.search_tracks.list() 1 credit
spotify.track client.spotify.track.get() 1 credit
telegram.channel client.telegram.channel.get() 1 credit
telegram.channel_posts client.telegram.channel_posts.list() 1 credit
telegram.post client.telegram.post.get() 1 credit
telegram.search_channels client.telegram.search_channels.list() 1 credit + 1 per result filled in (with fill=true)
threads.comments client.threads.comments.list() 1 credit
threads.post client.threads.post.get() 1 credit
threads.posts client.threads.posts.list() 1 credit
threads.profile client.threads.profile.get() 1 credit
threads.search_posts client.threads.search_posts.list() 1 credit
threads.search_profiles client.threads.search_profiles.list() 1 credit
tiktok.ad client.tiktok.ad.get() 1 credit
tiktok.comment client.tiktok.comment.get() 1 credit
tiktok.comments client.tiktok.comments.list() 1 credit
tiktok.download client.tiktok.download.get() 1 credit
tiktok.effect client.tiktok.effect.get() 1 credit
tiktok.effect_posts client.tiktok.effect_posts.list() 1 credit
tiktok.engagement client.tiktok.engagement.get() 1 credit
tiktok.followers client.tiktok.followers.list() 1 credit
tiktok.following client.tiktok.following.list() 1 credit
tiktok.hashtag client.tiktok.hashtag.get() 1 credit
tiktok.hashtag_posts client.tiktok.hashtag_posts.list() 1 credit
tiktok.liked_posts client.tiktok.liked_posts.list() 1 credit
tiktok.live client.tiktok.live.get() 1 credit
tiktok.place_posts client.tiktok.place_posts.list() 1 credit
tiktok.playlist_posts client.tiktok.playlist_posts.list() 1 credit
tiktok.playlists client.tiktok.playlists.list() 1 credit
tiktok.post client.tiktok.post.get() 1 credit
tiktok.posts client.tiktok.posts.list() 1 credit
tiktok.profile client.tiktok.profile.get() 1 credit
tiktok.replies client.tiktok.replies.list() 1 credit
tiktok.search_ads client.tiktok.search_ads.list() 1 credit
tiktok.search_hashtags client.tiktok.search_hashtags.list() 1 credit + 1 per result filled in (with fill=true)
tiktok.search_posts client.tiktok.search_posts.list() 1 credit
tiktok.search_profiles client.tiktok.search_profiles.list() 1 credit + 1 per result filled in (with fill=true)
tiktok.search_sounds client.tiktok.search_sounds.list() 1 credit + 1 per result filled in (with fill=true)
tiktok.search_suggestions client.tiktok.search_suggestions.list() 1 credit
tiktok.search_top client.tiktok.search_top.list() 1 credit + 1 per result filled in (with fill=true)
tiktok.sound client.tiktok.sound.get() 1 credit
tiktok.sound_posts client.tiktok.sound_posts.list() 1 credit
tiktok.top_ads client.tiktok.top_ads.list() 1 credit
tiktok.top_posts client.tiktok.top_posts.list() 1 credit
tiktok.transcript client.tiktok.transcript.get() 1 credit (captions) or 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)
tiktok.trending_hashtags client.tiktok.trending_hashtags.list() 1 credit
tiktok.trending_posts client.tiktok.trending_posts.list() 1 credit
tiktokshop.product client.tiktokshop.product.get() 1 credit
tiktokshop.products client.tiktokshop.products.list() 1 credit
tiktokshop.reviews client.tiktokshop.reviews.list() 1 credit
tiktokshop.search_products client.tiktokshop.search_products.list() 1 credit
truthsocial.post client.truthsocial.post.get() 1 credit
truthsocial.posts client.truthsocial.posts.list() 1 credit
truthsocial.profile client.truthsocial.profile.get() 1 credit
twitch.profile client.twitch.profile.get() 1 credit
twitch.schedule client.twitch.schedule.list() 1 credit
twitch.transcript client.twitch.transcript.get() 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)
twitch.video client.twitch.video.get() 1 credit
twitch.videos client.twitch.videos.list() 1 credit
x.comments client.x.comments.list() 1 credit
x.community client.x.community.get() 1 credit
x.community_posts client.x.community_posts.list() 1 credit
x.engagement client.x.engagement.get() 1 credit
x.friendship client.x.friendship.get() 1 credit
x.list client.x.list.get() 1 credit
x.list_followers client.x.list_followers.list() 1 credit
x.post client.x.post.get() 1 credit
x.posts client.x.posts.list() 1 credit
x.profile client.x.profile.get() 1 credit
x.profile_mentions client.x.profile_mentions.list() 1 credit
x.search_communities client.x.search_communities.list() 1 credit + 1 per result filled in (with fill=true)
x.search_hashtags client.x.search_hashtags.list() 1 credit
x.search_posts client.x.search_posts.list() 1 credit + 1 per result filled in (with fill=true)
x.search_profiles client.x.search_profiles.list() 1 credit + 1 per result filled in (with fill=true)
x.space client.x.space.get() 1 credit
x.transcript client.x.transcript.get() 1 credit (captions) or 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)
youtube.comments client.youtube.comments.list() 1 credit
youtube.engagement client.youtube.engagement.get() 1 credit
youtube.hashtag_posts client.youtube.hashtag_posts.list() 1 credit
youtube.post client.youtube.post.get() 1 credit
youtube.posts client.youtube.posts.list() 1 credit
youtube.profile client.youtube.profile.get() 1 credit
youtube.search_posts client.youtube.search_posts.list() 1 credit
youtube.search_profiles client.youtube.search_profiles.list() 1 credit
youtube.search_suggestions client.youtube.search_suggestions.list() 1 credit
youtube.transcript client.youtube.transcript.get() 1 credit (captions) or 2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true)

Endpoints newer than this package

A version has a method for every endpoint the API had when it was released. For a newer one, update the package, or send the request yourself: the raw request adds your key and retries and raises errors like a method, and returns the status, headers and body (the envelope, data and meta). Each endpoint's docs page has its path and params.

r, body = client.request("GET", "/v1/tiktok/profile", query={"handle": "nasa"})
print(r.status, body["data"])

Errors

Every API error is an APIError subclass named after its code, with status, code, retryable, remediation, request_id and credits_charged (0: errors are free). Codes this SDK version doesn't know arrive as a plain APIError with their code; no response at all is an APIConnectionError (APITimeoutError for timeouts).

from socialtap import APIError, NotFoundError

try:
    client.tiktok.profile.get(handle="nasa")
except NotFoundError:
    ...  # Check the link or ID. Do not retry.
except APIError as err:
    print(err.code, err.status, err.retryable, err.remediation, err.request_id)
code class status retried
invalid_input InvalidInputError 400 no
invalid_cursor InvalidCursorError 400 no
unauthorized UnauthorizedError 401 no
forbidden ForbiddenError 403 no
insufficient_credits InsufficientCreditsError 402 no
spend_limit_reached SpendLimitReachedError 402 no
rate_limited RateLimitedError 429 yes
request_too_large RequestTooLargeError 413 no
method_not_allowed MethodNotAllowedError 405 no
endpoint_retired EndpointRetiredError 410 no
idempotency_key_reused IdempotencyKeyReusedError 422 no
idempotency_key_in_progress IdempotencyKeyInProgressError 409 yes
job_not_found JobNotFoundError 404 no
unknown_endpoint UnknownEndpointError 404 no
not_found NotFoundError 404 no
private_or_unavailable PrivateOrUnavailableError 403 no
no_transcript NoTranscriptError 404 no
no_live NoLiveError 404 no
no_media NoMediaError 404 no
no_readme NoReadmeError 404 no
unavailable_for_legal_reasons UnavailableForLegalReasonsError 451 no
upstream_blocked UpstreamBlockedError 503 yes
upstream_error UpstreamError 502 yes
overloaded OverloadedError 503 yes
internal InternalError 500 yes

Retries and timeouts

Retryable failures (the codes above, connection errors, timeouts) are retried 2 times by default with exponential backoff and jitter, honoring retry-after. A GET retry sends max_age set to the seconds since the first attempt: if the first response was lost in transit, the retry is served free from the cache. Timeouts are per attempt: 60 s by default, and 300 s for endpoints that may transcribe audio (facebook.ad_transcript, facebook.transcript, instagram.transcript, kick.transcript, linkedin.transcript, reddit.transcript, rumble.transcript, tiktok.transcript, twitch.transcript, x.transcript, youtube.transcript), because speech-to-text on long media takes minutes, and for create-and-wait's long-polls. Most requests answer in a few seconds. A timeout you set, on the client or on one request, applies to every endpoint, and so does maxRetries.

Pagination

List endpoints return one page (data, page.has_more, page.next_cursor). iterate() returns a Paginator (for over items, .by_page() for pages; async for on the async client) with two guards, max_pages and max_credits; afterwards pages_fetched, credits_charged, stop_reason ("end", or the guard that stopped it) and end_reason (the API's page.end_reason) say what happened. Each page is checked against its catalog price before it is fetched, and an empty page with has_more is not the end.

items = client.tiktok.posts.iterate(handle="@khaby.lame", max_pages=10, max_credits=100)
for item in items:
    print(item)
print(items.pages_fetched, items.credits_charged, items.stop_reason, items.end_reason)

Account, API keys, jobs, webhooks and events

The gateway's own routes (account, usage, credit ledger, API keys, jobs, webhook endpoints, events) are free and have methods too, named from their operation IDs (<noun>.<verb>, or <noun>.<sub>.<verb> for a sub-resource). They answer the same envelope (data, meta, credits) with their own meta; cursor-paged list routes have iterate like list endpoints. Every POST sends an idempotency-key header (yours, or a new UUID kept for the call's retries), so it is retried like a GET and a retry never repeats the work; replayed says when the API answered from an earlier request with the same key, and status is 202 when accepted work continues. Each route needs a key with the scope below (a key never gets a scope its creator lacks).

res = client.account.get()
print(res.data, res.meta.request_id)
operation method scope
account.get client.account.get() account:read
account.update client.account.update(...) admin
usage.list client.usage.list(...) account:read
usage.rate.list client.usage.rate.list(...) account:read
credit_transactions.list client.credit_transactions.list(...) account:read
billing.checkout.get client.billing.checkout.get(id) account:read
billing.subscription.get client.billing.subscription.get() account:read
billing.auto_topup.get client.billing.auto_topup.get() account:read
billing.purchases.list client.billing.purchases.list(...) account:read
billing.purchases.receipt client.billing.purchases.receipt(id) account:read
requests.list client.requests.list(...) account:read
requests.get client.requests.get(id) account:read
requests.get_response client.requests.get_response(id) account:read
api_keys.create client.api_keys.create(...) admin
api_keys.list client.api_keys.list(...) account:read
api_keys.get client.api_keys.get(id) account:read
api_keys.update client.api_keys.update(id, ...) admin
api_keys.rotate_secret client.api_keys.rotate_secret(id, ...) admin
api_keys.revoke client.api_keys.revoke(id) admin
jobs.create client.jobs.create(...) jobs
jobs.list client.jobs.list(...) jobs:read
jobs.get client.jobs.get(id, ...) jobs:read
jobs.results.list client.jobs.results.list(id, ...) jobs:read
jobs.cancel client.jobs.cancel(id) jobs
webhook_endpoints.create client.webhook_endpoints.create(...) admin
webhook_endpoints.list client.webhook_endpoints.list(...) account:read
webhook_endpoints.get client.webhook_endpoints.get(id) account:read
webhook_endpoints.update client.webhook_endpoints.update(id, ...) admin
webhook_endpoints.delete client.webhook_endpoints.delete(id) admin
webhook_endpoints.rotate_secret client.webhook_endpoints.rotate_secret(id, ...) admin
webhook_endpoints.test client.webhook_endpoints.test(id) admin
webhook_endpoints.deliveries.list client.webhook_endpoints.deliveries.list(id, ...) account:read
events.list client.events.list(...) account:read
events.get client.events.get(id) account:read
events.redeliver client.events.redeliver(id, ...) admin
notification_preferences.get client.notification_preferences.get() account:read
notification_preferences.update client.notification_preferences.update(...) admin

Jobs and webhooks

Many requests (or one long list walk) run as a background job at the synchronous prices; failed items are free. The create-and-wait helper creates one, long-polls it until it ends and returns every result; one Idempotency-Key covers the create's retries, so a retry never runs a job twice. Webhook deliveries are signed per Standard Webhooks: verify the raw body with your endpoint's secret before trusting it, and deduplicate on the event ID.

out = client.jobs.create_and_wait(requests=[{"custom_id": "row-1", "endpoint": "tiktok.profile", "params": {"handle": "nasa"}}])
for r in out.results:
    print(r.custom_id, r.status, r.error.code if r.error else None)

# A webhook delivery: the raw body, the request headers, your endpoint's secret.
event = client.webhooks.verify(raw_body, request.headers, os.environ["SOCIALTAP_WEBHOOK_SECRET"])

Tools for AI agents

The SDK hands the SocialTap MCP server's tools to a model: each tool's name, description (its price and rules included) and input JSON Schema, and a call that sends one stateless MCP request with your key. A tool behaves exactly as it does for an MCP client: concise results (detail: "full" for every field), next_cursor to continue, and failures returned as the tool's output (error with retryable and remediation) so the model can act on them. Transport failures raise as for any request, and tools that may be repeated are retried.

# LangChain: pip install "socialtap[langchain]"; the default tools, or SocialTapToolkit(tools=[...] or "all").
from langchain.agents import create_agent
from socialtap.langchain import SocialTapToolkit

agent = create_agent(model, tools=SocialTapToolkit().get_tools())  # any LangChain chat model

# Any other tool-calling API: hand TOOLS (name, description, input_schema) to the model, run its calls with call_tool.
from socialtap import SocialTap
from socialtap.tools import TOOLS, call_tool

r = call_tool(SocialTap(), "find_endpoint", {"query": "TikTok profile"})  # acall_tool with AsyncSocialTap
print(r.is_error, r.output)
tool what it does
find_endpoint Find an endpoint
get_post Post by link
list_posts Posts of a profile
get_profile Profile by handle
list_comments Comments of a post
get_transcript Transcript by link
get_engagement Engagement by handle
search Search by query
call_endpoint Call any endpoint
search_docs Search the docs
read_doc Read a docs page
get_account Get account balance
buy_credits Buy credits (checkout link)
get_story Story by link
list_community_posts Community posts
list_hashtag_posts Hashtag posts
list_liked_posts Liked posts of a profile
list_place_posts Place posts
list_playlist_posts Playlist posts
list_reels Reels of a profile
list_sound_posts Sound posts
list_top_posts Top posts
list_trending_posts Trending posts
list_channel_posts Channel posts of a profile
list_effect_posts Effect posts
list_feed_posts Feed posts
list_photos Photos of a profile
list_pins Pins of a profile
list_playlist_stories Playlist stories
list_playlist_tracks Playlist tracks
list_podcast_episodes Podcast episodes
list_post_reposts Post reposts
list_profile_mentions Profile mentions
list_shop_posts Shop posts of a profile
list_tracks Tracks of a profile
list_user_favorites User favorites of a profile
list_user_stories User stories of a profile
list_videos Videos of a profile
get_advertiser Advertiser by handle
get_seller Seller by handle
get_shop Shop by handle
list_following Following of a profile
list_followers Followers of a profile
list_employees Employees of a profile
list_playlist_followers Playlist followers
list_post_reactions Post reactions
list_repository_contributors Repository contributors
list_similar_profiles Similar profiles of a profile
list_trending_profiles Trending profiles
get_comment Comment by link
list_profile_comments Profile comments
list_replies Replies of a post
list_issue_comments Issue comments
get_ad_transcript Ad transcript by link
get_ad Ad by link
list_ads Ads of a profile
list_top_ads Top ads
get_hashtag Hashtag by link
list_trending_hashtags Trending hashtags
get_community Community by link
get_playlist Playlist by link
get_product Product by link
get_album Album by link
get_sound Sound by link
get_topic Topic by link
get_contributions Contributions by handle
get_download Download by link
get_effect Effect by link
get_embed Embed by link
get_event Event by link
get_issue Issue by link
get_job_posting Job posting by link
get_live Live by handle
get_place Place by link
get_podcast Podcast by link
get_readme Readme by link
get_relationship Relationship by handle
get_repository Repository by link
get_space Space by link
get_username Username by handle
get_web_page Web page by link
list_reviews Reviews of a product
list_activity Activity of a profile
list_boards Boards of a profile
list_deal_products Deal products
list_events Events of a profile
list_highlights Highlights of a profile
list_issues Issues of a repository
list_job_related_jobs Job related jobs
list_jobs Jobs of a profile
list_offers Offers of a product
list_pinned_repositories Pinned repositories of a profile
list_place_events Place events
list_playlists Playlists of a profile
list_popular_trends Popular trends
list_products Products of a profile
list_profile_groups Profile groups
list_profile_pull_requests Profile pull requests
list_releases Releases of a repository
list_repositories Repositories of a profile
list_schedule Schedule of a profile
list_shop_lists Shop lists of a profile
list_top_albums Top albums
list_top_playlists Top playlists
list_top_products Top products
list_top_trends Top trends
list_trending_repositories Trending repositories
list_whoishiring_jobs Whoishiring jobs
create_background_job Create a background job
get_background_job Get a background job
list_background_job_results List a background job's results

Versioning

The version is derived from the API contract: major = API version, minor = the contract's revision (it grows with every additive change, a new endpoint included), patch = the SDK generator's revision. Questions and bug reports: support@socialtap.dev.

Metadata

Release files for socialtap 1.602.39

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for socialtap 1.602.39
File Size Uploaded Provenance Actions
socialtap-1.602.39.tar.gz 730.4 kB Without provenance Details for socialtap-1.602.39.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for socialtap 1.602.39
File Interpreter ABI Platform Actions
socialtap-1.602.39-py3-none-any.whl Python 3 none any Details for socialtap-1.602.39-py3-none-any.whl

Total release size: 1.3 MB

Release files / socialtap-1.602.39.tar.gz

Download URL socialtap-1.602.39.tar.gz
Size 730.4 kB
Tags Source
SHA-256 checksum
How to use checksums
babc0e3fb7678cb4718f8af5f843515d4d69bcfcc6eb6fed4728420252dff6de
BLAKE2b-256 checksum
How to use checksums
19a4202e59782f92a323063d20f39d16186b9bdc171a493a00c9cbac6b9a22c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / socialtap-1.602.39-py3-none-any.whl

Download URL socialtap-1.602.39-py3-none-any.whl
Size 610.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f875a4b826cb11b4189b7b18d360cc2a38df417b7f49a7b207891deba83fa5b
BLAKE2b-256 checksum
How to use checksums
97fb1d357f072af8b79720d6cfbcdf96e0fc78bd6e541d09b5ce40f8a201ae73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for socialtap 1.602.39

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.602.39 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page