Shell go get socialtap.dev/sdk/go
Zero dependencies (net/http); Go 1.23+. The module path is socialtap.dev/sdk/go (a vanity path on our domain,
so it survives a move of the hosting repository); the package name is socialtap. Optional params are pointers
(socialtap.String("en")); nullable model fields are pointers (nil = unknown); slices are never null in responses.
Every method takes per-request Options (socialtap.WithTimeout, WithMaxRetries, …), the same ones NewClient takes.
Errors match errors.Is(err, socialtap.ErrNotFound)-style sentinels; errors.As gives the *APIError.
Nothing is invented: with Fields set, Data is left zero (Partial is true) and Raw holds the selected members
(Pager.AllRaw; All returns ErrPartialItems). Every response keeps Raw (the data as received) and Body, so members
this version doesn't model are not lost. A 2xx that is not the API's envelope is a *DecodeError; a retry-after longer than
MaxRetryAfter is a *RetryAfterError (it unwraps to the *APIError) instead of an early retry. Event.TypedData()
decodes an event's data by its type; each endpoint's Params has a method building a job item typed by that endpoint.
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/?ref=sdk : every account starts with 100 free credits.
TikTok Profile API (tiktok.profile). Exact follower and like counts, bio and country.
Go package main
import (
"context"
"fmt"
"log"
socialtap "socialtap.dev/sdk/go"
)
func main() {
ctx := context.Background()
client, err := socialtap.NewClient() // the API key defaults to $SOCIALTAP_API_KEY
if err != nil {
log.Fatal(err )
}
res, err := client.TikTok.Profile.Get(ctx, socialtap.TikTokProfileParams{Handle: "nasa" })
if err != nil {
log.Fatal(err )
}
fmt.Println(res.Data)
fmt.Println(res.Credits.Charged, res.Meta.RequestID)
}
data is a Profile (example response, truncated):
JSON {
"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.
Amazon (10) endpoint method cost amazon.deal_productsclient.Amazon.DealProducts.List()1 credit amazon.offersclient.Amazon.Offers.List()1 credit amazon.productclient.Amazon.Product.Get()1 credit amazon.reviewsclient.Amazon.Reviews.List()1 credit amazon.search_productsclient.Amazon.SearchProducts.List()1 credit amazon.sellerclient.Amazon.Seller.Get()1 credit amazon.shopclient.Amazon.Shop.Get()1 credit amazon.shop_listsclient.Amazon.ShopLists.List()1 credit amazon.shop_postsclient.Amazon.ShopPosts.List()1 credit amazon.top_productsclient.Amazon.TopProducts.List()1 credit
Apple Music (10) endpoint method cost applemusic.albumclient.AppleMusic.Album.Get()1 credit applemusic.artistclient.AppleMusic.Artist.Get()1 credit applemusic.search_albumsclient.AppleMusic.SearchAlbums.List()1 credit applemusic.search_artistsclient.AppleMusic.SearchArtists.List()1 credit applemusic.search_playlistsclient.AppleMusic.SearchPlaylists.List()1 credit applemusic.search_tracksclient.AppleMusic.SearchTracks.List()1 credit applemusic.top_albumsclient.AppleMusic.TopAlbums.List()1 credit applemusic.top_playlistsclient.AppleMusic.TopPlaylists.List()1 credit applemusic.top_tracksclient.AppleMusic.TopTracks.List()1 credit applemusic.trackclient.AppleMusic.Track.Get()1 credit
Bluesky (5) endpoint method cost bluesky.commentsclient.Bluesky.Comments.List()1 credit bluesky.postclient.Bluesky.Post.Get()1 credit bluesky.postsclient.Bluesky.Posts.List()1 credit bluesky.profileclient.Bluesky.Profile.Get()1 credit bluesky.search_postsclient.Bluesky.SearchPosts.List()1 credit
Facebook Ad Library (6) endpoint method cost facebook.adclient.Facebook.Ad.Get()1 credit facebook.ad_transcriptclient.Facebook.AdTranscript.Get()2 credits + 2 per started minute of media (speech-to-text, automatic up to 3 minutes, longer with transcribe_audio=true) facebook.adsclient.Facebook.Ads.List()1 credit facebook.advertiserclient.Facebook.Advertiser.Get()1 credit facebook.search_adsclient.Facebook.SearchAds.List()1 credit facebook.search_advertisersclient.Facebook.SearchAdvertisers.List()1 credit
Facebook (14) endpoint method cost facebook.commentsclient.Facebook.Comments.List()1 credit facebook.engagementclient.Facebook.Engagement.Get()1 credit facebook.groupclient.Facebook.Group.Get()1 credit facebook.group_postsclient.Facebook.GroupPosts.List()1 credit facebook.photosclient.Facebook.Photos.List()1 credit facebook.postclient.Facebook.Post.Get()1 credit facebook.postsclient.Facebook.Posts.List()1 credit facebook.profileclient.Facebook.Profile.Get()1 credit facebook.reelsclient.Facebook.Reels.List()1 credit facebook.repliesclient.Facebook.Replies.List()1 credit facebook.search_groupsclient.Facebook.SearchGroups.List()1 credit + 1 per result filled in (with fill=true) facebook.search_postsclient.Facebook.SearchPosts.List()1 credit + 1 per result filled in (with fill=true) facebook.search_profilesclient.Facebook.SearchProfiles.List()1 credit + 1 per result filled in (with fill=true) facebook.transcriptclient.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)
Facebook Events (4) endpoint method cost facebook.eventclient.Facebook.Event.Get()1 credit facebook.eventsclient.Facebook.Events.List()1 credit facebook.place_eventsclient.Facebook.PlaceEvents.List()1 credit facebook.search_eventsclient.Facebook.SearchEvents.List()1 credit
Facebook Marketplace (3) endpoint method cost facebook.listingclient.Facebook.Listing.Get()1 credit facebook.search_listingsclient.Facebook.SearchListings.List()1 credit facebook.search_placesclient.Facebook.SearchPlaces.List()1 credit
GitHub (20) endpoint method cost github.activityclient.GitHub.Activity.List()1 credit github.contributionsclient.GitHub.Contributions.Get()1 credit github.followersclient.GitHub.Followers.List()1 credit github.followingclient.GitHub.Following.List()1 credit github.issueclient.GitHub.Issue.Get()1 credit github.issue_commentsclient.GitHub.IssueComments.List()1 credit github.issuesclient.GitHub.Issues.List()1 credit github.pinned_repositoriesclient.GitHub.PinnedRepositories.List()1 credit github.profileclient.GitHub.Profile.Get()1 credit github.profile_pull_requestsclient.GitHub.ProfilePullRequests.List()1 credit github.readmeclient.GitHub.Readme.Get()1 credit github.releasesclient.GitHub.Releases.List()1 credit github.repositoriesclient.GitHub.Repositories.List()1 credit github.repositoryclient.GitHub.Repository.Get()1 credit github.repository_contributorsclient.GitHub.RepositoryContributors.List()1 credit github.search_issuesclient.GitHub.SearchIssues.List()1 credit github.search_profilesclient.GitHub.SearchProfiles.List()1 credit github.search_repositoriesclient.GitHub.SearchRepositories.List()1 credit github.trending_profilesclient.GitHub.TrendingProfiles.List()1 credit github.trending_repositoriesclient.GitHub.TrendingRepositories.List()1 credit
Google Ads Transparency Center (6) endpoint method cost google.adclient.Google.Ad.Get()1 credit google.adsclient.Google.Ads.List()1 credit google.advertiserclient.Google.Advertiser.Get()1 credit google.search_adsclient.Google.SearchAds.List()1 credit google.search_advertisersclient.Google.SearchAdvertisers.List()1 credit google.search_suggestionsclient.Google.SearchSuggestions.List()1 credit
Hacker News (11) endpoint method cost hackernews.commentclient.HackerNews.Comment.Get()1 credit hackernews.commentsclient.HackerNews.Comments.List()1 credit hackernews.feed_storiesclient.HackerNews.FeedStories.List()1 credit hackernews.search_commentsclient.HackerNews.SearchComments.List()1 credit hackernews.search_storiesclient.HackerNews.SearchStories.List()1 credit hackernews.storyclient.HackerNews.Story.Get()1 credit hackernews.userclient.HackerNews.User.Get()1 credit hackernews.user_commentsclient.HackerNews.UserComments.List()1 credit hackernews.user_favoritesclient.HackerNews.UserFavorites.List()1 credit hackernews.user_storiesclient.HackerNews.UserStories.List()1 credit hackernews.whoishiring_jobsclient.HackerNews.WhoishiringJobs.List()1 credit
Instagram (29) endpoint method cost instagram.commentclient.Instagram.Comment.Get()1 credit instagram.commentsclient.Instagram.Comments.List()1 credit instagram.embedclient.Instagram.Embed.Get()1 credit instagram.engagementclient.Instagram.Engagement.Get()1 credit instagram.hashtagclient.Instagram.Hashtag.Get()1 credit instagram.hashtag_postsclient.Instagram.HashtagPosts.List()1 credit instagram.highlightsclient.Instagram.Highlights.List()1 credit instagram.placeclient.Instagram.Place.Get()1 credit instagram.place_postsclient.Instagram.PlacePosts.List()1 credit instagram.playlist_storiesclient.Instagram.PlaylistStories.List()1 credit instagram.popular_trendsclient.Instagram.PopularTrends.List()1 credit instagram.postclient.Instagram.Post.Get()1 credit instagram.postsclient.Instagram.Posts.List()1 credit instagram.profileclient.Instagram.Profile.Get()1 credit instagram.reelsclient.Instagram.Reels.List()1 credit instagram.search_hashtagsclient.Instagram.SearchHashtags.List()1 credit instagram.search_placesclient.Instagram.SearchPlaces.List()1 credit + 1 per result filled in (with fill=true) instagram.search_postsclient.Instagram.SearchPosts.List()1 credit instagram.search_profilesclient.Instagram.SearchProfiles.List()1 credit + 1 per result filled in (with fill=true) instagram.search_soundsclient.Instagram.SearchSounds.List()1 credit + 1 per result filled in (with fill=true) instagram.search_suggestionsclient.Instagram.SearchSuggestions.List()1 credit instagram.similar_profilesclient.Instagram.SimilarProfiles.List()1 credit instagram.soundclient.Instagram.Sound.Get()1 credit instagram.sound_postsclient.Instagram.SoundPosts.List()1 credit instagram.storyclient.Instagram.Story.Get()1 credit instagram.topicclient.Instagram.Topic.Get()1 credit instagram.transcriptclient.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_postsclient.Instagram.TrendingPosts.List()1 credit instagram.usernameclient.Instagram.Username.Get()1 credit
Kick (2) endpoint method cost kick.postclient.Kick.Post.Get()1 credit kick.transcriptclient.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 (1) endpoint method cost komi.pageclient.Komi.Page.Get()1 credit
Kwai (3) endpoint method cost kwai.postclient.Kwai.Post.Get()1 credit kwai.postsclient.Kwai.Posts.List()1 credit kwai.profileclient.Kwai.Profile.Get()1 credit
Lnk.Bio (1) endpoint method cost linkbio.profileclient.LnkBio.Profile.Get()1 credit
LinkedIn Ad Library (2) endpoint method cost linkedin.adclient.LinkedIn.Ad.Get()1 credit linkedin.search_adsclient.LinkedIn.SearchAds.List()1 credit
LinkedIn (19) endpoint method cost linkedin.commentsclient.LinkedIn.Comments.List()1 credit (public page) or 5 credits (data partner) linkedin.employeesclient.LinkedIn.Employees.List()5 credits linkedin.engagementclient.LinkedIn.Engagement.Get()1 credit (public page) or 15 credits (data partner) linkedin.followingclient.LinkedIn.Following.List()5 credits linkedin.jobclient.LinkedIn.Job.Get()1 credit linkedin.job_related_jobsclient.LinkedIn.JobRelatedJobs.List()1 credit linkedin.jobsclient.LinkedIn.Jobs.List()1 credit linkedin.liked_postsclient.LinkedIn.LikedPosts.List()1 credit (public page) or 10 credits (data partner) linkedin.postclient.LinkedIn.Post.Get()1 credit linkedin.post_reactionsclient.LinkedIn.PostReactions.List()1 credit (public page) or 5 credits (data partner) linkedin.post_repostsclient.LinkedIn.PostReposts.List()1 credit (public page) or 5 credits (data partner) linkedin.postsclient.LinkedIn.Posts.List()1 credit (public page) or 10 credits (data partner) linkedin.profileclient.LinkedIn.Profile.Get()1 credit (public page or web search) or 5 credits (data partner) linkedin.profile_commentsclient.LinkedIn.ProfileComments.List()10 credits linkedin.profile_groupsclient.LinkedIn.ProfileGroups.List()5 credits linkedin.search_jobsclient.LinkedIn.SearchJobs.List()1 credit linkedin.search_postsclient.LinkedIn.SearchPosts.List()1 credit + 1 per result filled in (with fill=true) linkedin.search_profilesclient.LinkedIn.SearchProfiles.List()1 credit + 1 per result filled in (with fill=true) linkedin.transcriptclient.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 (1) endpoint method cost linkme.profileclient.Linkme.Profile.Get()1 credit
Linktree (1) endpoint method cost linktree.profileclient.Linktree.Profile.Get()1 credit
Pillar (1) endpoint method cost pillar.pageclient.Pillar.Page.Get()1 credit
Pinterest (10) endpoint method cost pinterest.boardclient.Pinterest.Board.Get()1 credit pinterest.board_pinsclient.Pinterest.BoardPins.List()1 credit pinterest.boardsclient.Pinterest.Boards.List()1 credit pinterest.pinclient.Pinterest.Pin.Get()1 credit pinterest.pinsclient.Pinterest.Pins.List()1 credit pinterest.profileclient.Pinterest.Profile.Get()1 credit pinterest.search_pinsclient.Pinterest.SearchPins.List()1 credit pinterest.top_trendsclient.Pinterest.TopTrends.List()1 credit pinterest.topicclient.Pinterest.Topic.Get()1 credit pinterest.web_pageclient.Pinterest.WebPage.Get()1 credit
Reddit (13) endpoint method cost reddit.commentsclient.Reddit.Comments.List()1 credit reddit.engagementclient.Reddit.Engagement.Get()1 credit reddit.postclient.Reddit.Post.Get()1 credit reddit.postsclient.Reddit.Posts.List()1 credit reddit.profileclient.Reddit.Profile.Get()1 credit reddit.profile_commentsclient.Reddit.ProfileComments.List()1 credit reddit.search_commentsclient.Reddit.SearchComments.List()1 credit reddit.search_postsclient.Reddit.SearchPosts.List()1 credit reddit.search_profilesclient.Reddit.SearchProfiles.List()1 credit reddit.search_subredditsclient.Reddit.SearchSubreddits.List()1 credit reddit.subredditclient.Reddit.Subreddit.Get()1 credit reddit.subreddit_postsclient.Reddit.SubredditPosts.List()1 credit reddit.transcriptclient.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 (7) endpoint method cost rumble.commentsclient.Rumble.Comments.List()1 credit rumble.engagementclient.Rumble.Engagement.Get()1 credit rumble.postclient.Rumble.Post.Get()1 credit rumble.postsclient.Rumble.Posts.List()1 credit rumble.profileclient.Rumble.Profile.Get()1 credit rumble.search_postsclient.Rumble.SearchPosts.List()1 credit rumble.transcriptclient.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 (3) endpoint method cost snapchat.commentsclient.Snapchat.Comments.List()1 credit snapchat.profileclient.Snapchat.Profile.Get()1 credit snapchat.spotlightclient.Snapchat.Spotlight.Get()1 credit
SoundCloud (3) endpoint method cost soundcloud.artistclient.SoundCloud.Artist.Get()1 credit soundcloud.trackclient.SoundCloud.Track.Get()1 credit soundcloud.tracksclient.SoundCloud.Tracks.List()1 credit
Spotify (12) endpoint method cost spotify.albumclient.Spotify.Album.Get()1 credit spotify.artistclient.Spotify.Artist.Get()1 credit spotify.playlistclient.Spotify.Playlist.Get()1 credit spotify.playlist_tracksclient.Spotify.PlaylistTracks.List()1 credit spotify.podcastclient.Spotify.Podcast.Get()1 credit spotify.podcast_episodesclient.Spotify.PodcastEpisodes.List()1 credit spotify.search_albumsclient.Spotify.SearchAlbums.List()1 credit spotify.search_artistsclient.Spotify.SearchArtists.List()1 credit spotify.search_playlistsclient.Spotify.SearchPlaylists.List()1 credit spotify.search_podcastsclient.Spotify.SearchPodcasts.List()1 credit spotify.search_tracksclient.Spotify.SearchTracks.List()1 credit spotify.trackclient.Spotify.Track.Get()1 credit
Telegram (4) endpoint method cost telegram.channelclient.Telegram.Channel.Get()1 credit telegram.channel_postsclient.Telegram.ChannelPosts.List()1 credit telegram.postclient.Telegram.Post.Get()1 credit telegram.search_channelsclient.Telegram.SearchChannels.List()1 credit + 1 per result filled in (with fill=true)
Threads (6) endpoint method cost threads.commentsclient.Threads.Comments.List()1 credit threads.postclient.Threads.Post.Get()1 credit threads.postsclient.Threads.Posts.List()1 credit threads.profileclient.Threads.Profile.Get()1 credit threads.search_postsclient.Threads.SearchPosts.List()1 credit threads.search_profilesclient.Threads.SearchProfiles.List()1 credit
TikTok Ad Library (3) endpoint method cost tiktok.adclient.TikTok.Ad.Get()1 credit tiktok.search_adsclient.TikTok.SearchAds.List()1 credit tiktok.top_adsclient.TikTok.TopAds.List()1 credit
TikTok (31) endpoint method cost tiktok.commentclient.TikTok.Comment.Get()1 credit tiktok.commentsclient.TikTok.Comments.List()1 credit tiktok.downloadclient.TikTok.Download.Get()1 credit tiktok.effectclient.TikTok.Effect.Get()1 credit tiktok.effect_postsclient.TikTok.EffectPosts.List()1 credit tiktok.engagementclient.TikTok.Engagement.Get()1 credit tiktok.followersclient.TikTok.Followers.List()1 credit tiktok.followingclient.TikTok.Following.List()1 credit tiktok.hashtagclient.TikTok.Hashtag.Get()1 credit tiktok.hashtag_postsclient.TikTok.HashtagPosts.List()1 credit tiktok.liked_postsclient.TikTok.LikedPosts.List()1 credit tiktok.liveclient.TikTok.Live.Get()1 credit tiktok.place_postsclient.TikTok.PlacePosts.List()1 credit tiktok.playlist_postsclient.TikTok.PlaylistPosts.List()1 credit tiktok.playlistsclient.TikTok.Playlists.List()1 credit tiktok.postclient.TikTok.Post.Get()1 credit tiktok.postsclient.TikTok.Posts.List()1 credit tiktok.profileclient.TikTok.Profile.Get()1 credit tiktok.repliesclient.TikTok.Replies.List()1 credit tiktok.search_hashtagsclient.TikTok.SearchHashtags.List()1 credit + 1 per result filled in (with fill=true) tiktok.search_postsclient.TikTok.SearchPosts.List()1 credit tiktok.search_profilesclient.TikTok.SearchProfiles.List()1 credit + 1 per result filled in (with fill=true) tiktok.search_soundsclient.TikTok.SearchSounds.List()1 credit + 1 per result filled in (with fill=true) tiktok.search_suggestionsclient.TikTok.SearchSuggestions.List()1 credit tiktok.search_topclient.TikTok.SearchTop.List()1 credit + 1 per result filled in (with fill=true) tiktok.soundclient.TikTok.Sound.Get()1 credit tiktok.sound_postsclient.TikTok.SoundPosts.List()1 credit tiktok.top_postsclient.TikTok.TopPosts.List()1 credit tiktok.transcriptclient.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_hashtagsclient.TikTok.TrendingHashtags.List()1 credit tiktok.trending_postsclient.TikTok.TrendingPosts.List()1 credit
TikTok Shop (4) endpoint method cost tiktokshop.productclient.TikTokShop.Product.Get()1 credit tiktokshop.productsclient.TikTokShop.Products.List()1 credit tiktokshop.reviewsclient.TikTokShop.Reviews.List()1 credit tiktokshop.search_productsclient.TikTokShop.SearchProducts.List()1 credit
Truth Social (3) endpoint method cost truthsocial.postclient.TruthSocial.Post.Get()1 credit truthsocial.postsclient.TruthSocial.Posts.List()1 credit truthsocial.profileclient.TruthSocial.Profile.Get()1 credit
Twitch (5) endpoint method cost twitch.profileclient.Twitch.Profile.Get()1 credit twitch.scheduleclient.Twitch.Schedule.List()1 credit twitch.transcriptclient.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.videoclient.Twitch.Video.Get()1 credit twitch.videosclient.Twitch.Videos.List()1 credit
X (17) endpoint method cost x.commentsclient.X.Comments.List()1 credit x.communityclient.X.Community.Get()1 credit x.community_postsclient.X.CommunityPosts.List()1 credit x.engagementclient.X.Engagement.Get()1 credit x.friendshipclient.X.Friendship.Get()1 credit x.listclient.X.List.Get()1 credit x.list_followersclient.X.ListFollowers.List()1 credit x.postclient.X.Post.Get()1 credit x.postsclient.X.Posts.List()1 credit x.profileclient.X.Profile.Get()1 credit x.profile_mentionsclient.X.ProfileMentions.List()1 credit x.search_communitiesclient.X.SearchCommunities.List()1 credit + 1 per result filled in (with fill=true) x.search_hashtagsclient.X.SearchHashtags.List()1 credit x.search_postsclient.X.SearchPosts.List()1 credit + 1 per result filled in (with fill=true) x.search_profilesclient.X.SearchProfiles.List()1 credit + 1 per result filled in (with fill=true) x.spaceclient.X.Space.Get()1 credit x.transcriptclient.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 (10) endpoint method cost youtube.commentsclient.YouTube.Comments.List()1 credit youtube.engagementclient.YouTube.Engagement.Get()1 credit youtube.hashtag_postsclient.YouTube.HashtagPosts.List()1 credit youtube.postclient.YouTube.Post.Get()1 credit youtube.postsclient.YouTube.Posts.List()1 credit youtube.profileclient.YouTube.Profile.Get()1 credit youtube.search_postsclient.YouTube.SearchPosts.List()1 credit youtube.search_profilesclient.YouTube.SearchProfiles.List()1 credit youtube.search_suggestionsclient.YouTube.SearchSuggestions.List()1 credit youtube.transcriptclient.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)
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.
Go res, err := client.Do(ctx, socialtap.RawRequest{Method: "GET" , Path: "/v1/tiktok/profile" , Query: url.Values{"handle" : {"nasa" }}})
if err != nil {
log.Fatal(err )
}
fmt.Println(res.StatusCode, string (res.Body))
Every API error is an *APIError with StatusCode, Code, Retryable, Remediation, RequestID and
CreditsCharged (0: errors are free), and matches its code's sentinel with errors.Is. Codes this SDK version
doesn't know keep their Code and match no sentinel; no response at all is a *ConnectionError.
Go res, err := client.TikTok.Profile.Get(ctx, socialtap.TikTokProfileParams{Handle: "nasa" })
var apiErr *socialtap.APIError
switch {
case errors.Is(err , socialtap.ErrNotFound):
// Check the link or ID. Do not retry.
case errors.As(err , &apiErr):
log.Println(apiErr.Code, apiErr.StatusCode, apiErr.Retryable, apiErr.Remediation, apiErr.RequestID)
case err != nil :
log.Fatal(err ) // a *socialtap.ConnectionError after retries, or ctx
}
code class status retried invalid_inputErrInvalidInput400 no invalid_cursorErrInvalidCursor400 no unauthorizedErrUnauthorized401 no forbiddenErrForbidden403 no insufficient_creditsErrInsufficientCredits402 no spend_limit_reachedErrSpendLimitReached402 no rate_limitedErrRateLimited429 yes request_too_largeErrRequestTooLarge413 no method_not_allowedErrMethodNotAllowed405 no endpoint_retiredErrEndpointRetired410 no idempotency_key_reusedErrIdempotencyKeyReused422 no idempotency_key_in_progressErrIdempotencyKeyInProgress409 yes job_not_foundErrJobNotFound404 no unknown_endpointErrUnknownEndpoint404 no not_foundErrNotFound404 no private_or_unavailableErrPrivateOrUnavailable403 no no_transcriptErrNoTranscript404 no no_liveErrNoLive404 no no_mediaErrNoMedia404 no no_readmeErrNoReadme404 no unavailable_for_legal_reasonsErrUnavailableForLegalReasons451 no upstream_blockedErrUpstreamBlocked503 yes upstream_errorErrUpstream502 yes overloadedErrOverloaded503 yes internalErrInternal500 yes
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.
List endpoints return one page (data, page.has_more, page.next_cursor). Iterate returns a Pager (range over All() for items, Pages() for pages) with
two guards, IterateOptions{MaxPages, MaxCredits}; afterwards PagesFetched, CreditsCharged, StopReason (StopEnd, or the guard that
stopped it) and EndReason (the API's page.end_reason) say what happened. A nil guard is no limit; socialtap.Int(0) stops at once.
Each page is checked against its catalog price before it is fetched, and an empty page with has_more is not the end.
Go pager := client.TikTok.Posts.Iterate(ctx, socialtap.TikTokPostsParams{Handle: "@khaby.lame" }, socialtap.IterateOptions{MaxPages: socialtap.Int(10 ), MaxCredits: socialtap.Int(100 )})
for item, err := range pager.All() {
if err != nil {
log.Fatal(err )
}
fmt.Println(item)
}
fmt.Println(pager.PagesFetched(), pager.CreditsCharged(), pager.StopReason(), pager.EndReason())
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).
Go res, err := client.Account.Get(ctx)
if err != nil {
log.Fatal(err )
}
fmt.Println(res.Data, res.Meta.RequestID)
operation method scope account.getclient.Account.Get(ctx)account:readaccount.updateclient.Account.Update(ctx, socialtap.AccountUpdateParams{...})adminusage.listclient.Usage.List(ctx, socialtap.UsageListParams{...})account:readusage.rate.listclient.Usage.Rate.List(ctx, socialtap.UsageRateListParams{...})account:readcredit_transactions.listclient.CreditTransactions.List(ctx, socialtap.CreditTransactionsListParams{...})account:readbilling.checkout.getclient.Billing.Checkout.Get(ctx, id)account:readbilling.subscription.getclient.Billing.Subscription.Get(ctx)account:readbilling.auto_topup.getclient.Billing.AutoTopup.Get(ctx)account:readbilling.purchases.listclient.Billing.Purchases.List(ctx, socialtap.BillingPurchasesListParams{...})account:readbilling.purchases.receiptclient.Billing.Purchases.Receipt(ctx, id)account:readrequests.listclient.Requests.List(ctx, socialtap.RequestsListParams{...})account:readrequests.getclient.Requests.Get(ctx, id)account:readrequests.get_responseclient.Requests.GetResponse(ctx, id)account:readapi_keys.createclient.APIKeys.Create(ctx, socialtap.APIKeysCreateParams{...})adminapi_keys.listclient.APIKeys.List(ctx, socialtap.APIKeysListParams{...})account:readapi_keys.getclient.APIKeys.Get(ctx, id)account:readapi_keys.updateclient.APIKeys.Update(ctx, id, socialtap.APIKeysUpdateParams{...})adminapi_keys.rotate_secretclient.APIKeys.RotateSecret(ctx, id, socialtap.APIKeysRotateSecretParams{...})adminapi_keys.revokeclient.APIKeys.Revoke(ctx, id)adminjobs.createclient.Jobs.Create(ctx, socialtap.JobsCreateParams{...})jobsjobs.listclient.Jobs.List(ctx, socialtap.JobsListParams{...})jobs:readjobs.getclient.Jobs.Get(ctx, id, socialtap.JobsGetParams{...})jobs:readjobs.results.listclient.Jobs.Results.List(ctx, id, socialtap.JobsResultsListParams{...})jobs:readjobs.cancelclient.Jobs.Cancel(ctx, id)jobswebhook_endpoints.createclient.WebhookEndpoints.Create(ctx, socialtap.WebhookEndpointsCreateParams{...})adminwebhook_endpoints.listclient.WebhookEndpoints.List(ctx, socialtap.WebhookEndpointsListParams{...})account:readwebhook_endpoints.getclient.WebhookEndpoints.Get(ctx, id)account:readwebhook_endpoints.updateclient.WebhookEndpoints.Update(ctx, id, socialtap.WebhookEndpointsUpdateParams{...})adminwebhook_endpoints.deleteclient.WebhookEndpoints.Delete(ctx, id)adminwebhook_endpoints.rotate_secretclient.WebhookEndpoints.RotateSecret(ctx, id, socialtap.WebhookEndpointsRotateSecretParams{...})adminwebhook_endpoints.testclient.WebhookEndpoints.Test(ctx, id)adminwebhook_endpoints.deliveries.listclient.WebhookEndpoints.Deliveries.List(ctx, id, socialtap.WebhookEndpointsDeliveriesListParams{...})account:readevents.listclient.Events.List(ctx, socialtap.EventsListParams{...})account:readevents.getclient.Events.Get(ctx, id)account:readevents.redeliverclient.Events.Redeliver(ctx, id, socialtap.EventsRedeliverParams{...})adminnotification_preferences.getclient.NotificationPreferences.Get(ctx)account:readnotification_preferences.updateclient.NotificationPreferences.Update(ctx, socialtap.NotificationPreferencesUpdateParams{...})admin
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.
Go out, err := client.Jobs.CreateAndWait(ctx, socialtap.JobsCreateParams{Requests: []socialtap.JobRequest{{CustomID: "row-1" , Endpoint: "tiktok.profile" , Params: map [string ]any {"handle" : "nasa" }}}})
if err != nil {
log.Fatal(err )
}
for _, r := range out.Results {
fmt.Println(r.CustomID, r.Status)
}
// A webhook delivery: the raw body, the request headers, your endpoint's secret.
event, err := socialtap.VerifyWebhook(body, req.Header, os.Getenv("SOCIALTAP_WEBHOOK_SECRET" ))
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.
Go // Hand each tool (Name, Description, InputSchema) to the model, run its calls with CallTool.
for _, t := range socialtap.Tools {
fmt.Println(t.Name, t.Description, string (t.InputSchema))
}
r, err := client.CallTool(ctx, "find_endpoint" , map [string ]any {"query" : "TikTok profile" })
if err != nil {
log.Fatal(err )
}
fmt.Println(r.IsError, string (r.Output))
tool what it does find_endpointFind an endpoint get_postPost by link list_postsPosts of a profile get_profileProfile by handle list_commentsComments of a post get_transcriptTranscript by link get_engagementEngagement by handle searchSearch by query call_endpointCall any endpoint search_docsSearch the docs read_docRead a docs page get_accountGet account balance buy_creditsBuy credits (checkout link) get_storyStory by link list_community_postsCommunity posts list_hashtag_postsHashtag posts list_liked_postsLiked posts of a profile list_place_postsPlace posts list_playlist_postsPlaylist posts list_reelsReels of a profile list_sound_postsSound posts list_top_postsTop posts list_trending_postsTrending posts list_channel_postsChannel posts of a profile list_effect_postsEffect posts list_feed_postsFeed posts list_photosPhotos of a profile list_pinsPins of a profile list_playlist_storiesPlaylist stories list_playlist_tracksPlaylist tracks list_podcast_episodesPodcast episodes list_post_repostsPost reposts list_profile_mentionsProfile mentions list_shop_postsShop posts of a profile list_tracksTracks of a profile list_user_favoritesUser favorites of a profile list_user_storiesUser stories of a profile list_videosVideos of a profile get_advertiserAdvertiser by handle get_sellerSeller by handle get_shopShop by handle list_followingFollowing of a profile list_followersFollowers of a profile list_employeesEmployees of a profile list_playlist_followersPlaylist followers list_post_reactionsPost reactions list_repository_contributorsRepository contributors list_similar_profilesSimilar profiles of a profile list_trending_profilesTrending profiles get_commentComment by link list_profile_commentsProfile comments list_repliesReplies of a post list_issue_commentsIssue comments get_ad_transcriptAd transcript by link get_adAd by link list_adsAds of a profile list_top_adsTop ads get_hashtagHashtag by link list_trending_hashtagsTrending hashtags get_communityCommunity by link get_playlistPlaylist by link get_productProduct by link get_albumAlbum by link get_soundSound by link get_topicTopic by link get_contributionsContributions by handle get_downloadDownload by link get_effectEffect by link get_embedEmbed by link get_eventEvent by link get_issueIssue by link get_job_postingJob posting by link get_liveLive by handle get_placePlace by link get_podcastPodcast by link get_readmeReadme by link get_relationshipRelationship by handle get_repositoryRepository by link get_spaceSpace by link get_usernameUsername by handle get_web_pageWeb page by link list_reviewsReviews of a product list_activityActivity of a profile list_boardsBoards of a profile list_deal_productsDeal products list_eventsEvents of a profile list_highlightsHighlights of a profile list_issuesIssues of a repository list_job_related_jobsJob related jobs list_jobsJobs of a profile list_offersOffers of a product list_pinned_repositoriesPinned repositories of a profile list_place_eventsPlace events list_playlistsPlaylists of a profile list_popular_trendsPopular trends list_productsProducts of a profile list_profile_groupsProfile groups list_profile_pull_requestsProfile pull requests list_releasesReleases of a repository list_repositoriesRepositories of a profile list_scheduleSchedule of a profile list_shop_listsShop lists of a profile list_top_albumsTop albums list_top_playlistsTop playlists list_top_productsTop products list_top_trendsTop trends list_trending_repositoriesTrending repositories list_whoishiring_jobsWhoishiring jobs create_background_jobCreate a background job get_background_jobGet a background job list_background_job_resultsList a background job's results
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 .