Documentation
¶
Overview ¶
Package tiktok is Crawlora's TikTok API client for 90 endpoints, covering video, user, and hashtag search; profiles and posts; comments; trends; Creative Center; and Top Ads data. API documentation: https://crawlora.net/docs?utm_source=pkg.go.dev&utm_medium=referral&utm_campaign=platform-clients&utm_content=tiktok-go-api-docs
Index ¶
- Constants
- func OperationIDs() []string
- type Client
- func (c *Client) Call(ctx context.Context, operationID string, params Params) (any, error)
- func (c *Client) Category(ctx context.Context, params Params) (any, error)
- func (c *Client) Challenge(ctx context.Context, params Params) (any, error)
- func (c *Client) ChallengeList(ctx context.Context, params Params) (any, error)
- func (c *Client) Close() error
- func (c *Client) CreativeCenterFilters(ctx context.Context, params Params) (any, error)
- func (c *Client) CreativeCenterHashtags(ctx context.Context, params Params) (any, error)
- func (c *Client) CreativeCenterTopContent(ctx context.Context, params Params) (any, error)
- func (c *Client) CreativeCenterVideos(ctx context.Context, params Params) (any, error)
- func (c *Client) Explore(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileAnchorList(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileCollectionDetail(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileCollectionList(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileCollectionVideos(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileCommentReplies(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileComments(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileFeed(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileFeedOffline(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileFeedPost(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileHashtag(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileHashtagPosts(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileHashtags(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileLiveEffects(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileLiveGifts(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileLiveHashtags(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileLiveRoom(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileLiveRoomByUser(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileLiveSearch(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileLiveTabs(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMusicBeats(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMusicChart(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMusicChoices(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMusicCollectionList(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMusicCollections(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMusicDetail(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMusicPick(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMusicPosts(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMusicRelated(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMusicTrending(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileMvVideos(ctx context.Context, params Params) (any, error)
- func (c *Client) MobilePlaceDetail(ctx context.Context, params Params) (any, error)
- func (c *Client) MobilePlaceInfo(ctx context.Context, params Params) (any, error)
- func (c *Client) MobilePlaceMedia(ctx context.Context, params Params) (any, error)
- func (c *Client) MobilePlacePhotos(ctx context.Context, params Params) (any, error)
- func (c *Client) MobilePlaceReviews(ctx context.Context, params Params) (any, error)
- func (c *Client) MobilePlaceVideos(ctx context.Context, params Params) (any, error)
- func (c *Client) MobilePlaylistDetail(ctx context.Context, params Params) (any, error)
- func (c *Client) MobilePlaylistList(ctx context.Context, params Params) (any, error)
- func (c *Client) MobilePlaylistVideos(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearch(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchEffects(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchHashtags(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchMusic(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchPhotos(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchPlace(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchPreInfo(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchStream(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchSug(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchTabs(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchUser(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileSearchVideos(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileTranslationDescription(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileTrendingCategories(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileTrendingEffects(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileUserFollowers(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileUserFollowing(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileUserOriginalEffects(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileUserOriginalMusic(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileUserPosts(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileUserProfile(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileUserRecommendations(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileVideoDetail(ctx context.Context, params Params) (any, error)
- func (c *Client) MobileVideoSubtitles(ctx context.Context, params Params) (any, error)
- func (c *Client) PopularTrendCountryIndustryMeta(ctx context.Context, params Params) (any, error)
- func (c *Client) Post(ctx context.Context, params Params) (any, error)
- func (c *Client) Profile(ctx context.Context, params Params) (any, error)
- func (c *Client) ProfilePost(ctx context.Context, params Params) (any, error)
- func (c *Client) Search(ctx context.Context, params Params) (any, error)
- func (c *Client) SearchHashtag(ctx context.Context, params Params) (any, error)
- func (c *Client) SearchUser(ctx context.Context, params Params) (any, error)
- func (c *Client) TopAdsAnalysis(ctx context.Context, params Params) (any, error)
- func (c *Client) TopAdsDetail(ctx context.Context, params Params) (any, error)
- func (c *Client) TopAdsFilters(ctx context.Context, params Params) (any, error)
- func (c *Client) TopAdsList(ctx context.Context, params Params) (any, error)
- func (c *Client) TopAdsLocationInfo(ctx context.Context, params Params) (any, error)
- func (c *Client) TopAdsLocations(ctx context.Context, params Params) (any, error)
- func (c *Client) TopAdsRecommend(ctx context.Context, params Params) (any, error)
- func (c *Client) TopAdsSafety(ctx context.Context, params Params) (any, error)
- func (c *Client) TopAdsSpotlight(ctx context.Context, params Params) (any, error)
- func (c *Client) TopAdsSuggestions(ctx context.Context, params Params) (any, error)
- func (c *Client) Trending(ctx context.Context, params Params) (any, error)
- func (c *Client) VideoComments(ctx context.Context, params Params) (any, error)
- type Params
Examples ¶
Constants ¶
const ( DefaultBaseURL = "https://api.crawlora.net/api/v1" Version = "0.5.0" )
const OperationCount = 90
OperationCount reports how many selected-platform operations this module exposes.
Variables ¶
This section is empty.
Functions ¶
func OperationIDs ¶
func OperationIDs() []string
OperationIDs returns the selected operation IDs in stable sorted order.
Types ¶
type Client ¶
Client calls only the operation IDs included in this platform module.
func NewClient ¶
NewClient creates a client using the supplied API key, or CRAWLORA_API_KEY when empty.
func (*Client) Call ¶
Call executes a selected platform operation by operation ID.
Example ¶
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"ok":true}`))
}))
defer server.Close()
client := NewClient("your-crawlora-api-key")
client.BaseURL = server.URL + "/api/v1"
client.HTTPClient = server.Client()
result, err := client.Call(context.Background(), "tiktok-category", Params{})
if err != nil {
panic(err)
}
fmt.Println(result.(map[string]any)["ok"])
Output: true
func (*Client) ChallengeList ¶
ChallengeList calls the tiktok-challenge-list operation.
func (*Client) CreativeCenterFilters ¶ added in v0.3.0
CreativeCenterFilters calls the tiktok-creative-center-filters operation.
func (*Client) CreativeCenterHashtags ¶
CreativeCenterHashtags calls the tiktok-creative-center-hashtags operation.
func (*Client) CreativeCenterTopContent ¶ added in v0.3.0
CreativeCenterTopContent calls the tiktok-creative-center-top-content operation.
func (*Client) CreativeCenterVideos ¶
CreativeCenterVideos calls the tiktok-creative-center-videos operation.
func (*Client) MobileAnchorList ¶ added in v0.4.0
MobileAnchorList calls the tiktok-mobile-anchor-list operation.
func (*Client) MobileCollectionDetail ¶ added in v0.5.0
MobileCollectionDetail calls the tiktok-mobile-collection-detail operation.
func (*Client) MobileCollectionList ¶ added in v0.5.0
MobileCollectionList calls the tiktok-mobile-collection-list operation.
func (*Client) MobileCollectionVideos ¶ added in v0.5.0
MobileCollectionVideos calls the tiktok-mobile-collection-videos operation.
func (*Client) MobileCommentReplies ¶ added in v0.4.0
MobileCommentReplies calls the tiktok-mobile-comment-replies operation.
func (*Client) MobileComments ¶ added in v0.4.0
MobileComments calls the tiktok-mobile-comments operation.
func (*Client) MobileFeed ¶ added in v0.3.0
MobileFeed calls the tiktok-mobile-feed operation.
func (*Client) MobileFeedOffline ¶ added in v0.5.0
MobileFeedOffline calls the tiktok-mobile-feed-offline operation.
func (*Client) MobileFeedPost ¶ added in v0.4.0
MobileFeedPost calls the tiktok-mobile-feed-post operation.
func (*Client) MobileHashtag ¶ added in v0.4.0
MobileHashtag calls the tiktok-mobile-hashtag operation.
func (*Client) MobileHashtagPosts ¶ added in v0.4.0
MobileHashtagPosts calls the tiktok-mobile-hashtag-posts operation.
func (*Client) MobileHashtags ¶ added in v0.4.0
MobileHashtags calls the tiktok-mobile-hashtags operation.
func (*Client) MobileLiveEffects ¶ added in v0.4.0
MobileLiveEffects calls the tiktok-mobile-live-effects operation.
func (*Client) MobileLiveGifts ¶ added in v0.4.0
MobileLiveGifts calls the tiktok-mobile-live-gifts operation.
func (*Client) MobileLiveHashtags ¶ added in v0.5.0
MobileLiveHashtags calls the tiktok-mobile-live-hashtags operation.
func (*Client) MobileLiveRoom ¶ added in v0.5.0
MobileLiveRoom calls the tiktok-mobile-live-room operation.
func (*Client) MobileLiveRoomByUser ¶ added in v0.5.0
MobileLiveRoomByUser calls the tiktok-mobile-live-room-by-user operation.
func (*Client) MobileLiveSearch ¶ added in v0.4.0
MobileLiveSearch calls the tiktok-mobile-live-search operation.
func (*Client) MobileLiveTabs ¶ added in v0.5.0
MobileLiveTabs calls the tiktok-mobile-live-tabs operation.
func (*Client) MobileMusicBeats ¶ added in v0.4.0
MobileMusicBeats calls the tiktok-mobile-music-beats operation.
func (*Client) MobileMusicChart ¶ added in v0.5.0
MobileMusicChart calls the tiktok-mobile-music-chart operation.
func (*Client) MobileMusicChoices ¶ added in v0.5.0
MobileMusicChoices calls the tiktok-mobile-music-choices operation.
func (*Client) MobileMusicCollectionList ¶ added in v0.5.0
MobileMusicCollectionList calls the tiktok-mobile-music-collection-list operation.
func (*Client) MobileMusicCollections ¶ added in v0.4.0
MobileMusicCollections calls the tiktok-mobile-music-collections operation.
func (*Client) MobileMusicDetail ¶ added in v0.5.0
MobileMusicDetail calls the tiktok-mobile-music-detail operation.
func (*Client) MobileMusicPick ¶ added in v0.4.0
MobileMusicPick calls the tiktok-mobile-music-pick operation.
func (*Client) MobileMusicPosts ¶ added in v0.4.0
MobileMusicPosts calls the tiktok-mobile-music-posts operation.
func (*Client) MobileMusicRelated ¶ added in v0.4.0
MobileMusicRelated calls the tiktok-mobile-music-related operation.
func (*Client) MobileMusicTrending ¶ added in v0.4.0
MobileMusicTrending calls the tiktok-mobile-music-trending operation.
func (*Client) MobileMvVideos ¶ added in v0.5.0
MobileMvVideos calls the tiktok-mobile-mv-videos operation.
func (*Client) MobilePlaceDetail ¶ added in v0.5.0
MobilePlaceDetail calls the tiktok-mobile-place-detail operation.
func (*Client) MobilePlaceInfo ¶ added in v0.5.0
MobilePlaceInfo calls the tiktok-mobile-place-info operation.
func (*Client) MobilePlaceMedia ¶ added in v0.5.0
MobilePlaceMedia calls the tiktok-mobile-place-media operation.
func (*Client) MobilePlacePhotos ¶ added in v0.5.0
MobilePlacePhotos calls the tiktok-mobile-place-photos operation.
func (*Client) MobilePlaceReviews ¶ added in v0.5.0
MobilePlaceReviews calls the tiktok-mobile-place-reviews operation.
func (*Client) MobilePlaceVideos ¶ added in v0.5.0
MobilePlaceVideos calls the tiktok-mobile-place-videos operation.
func (*Client) MobilePlaylistDetail ¶ added in v0.5.0
MobilePlaylistDetail calls the tiktok-mobile-playlist-detail operation.
func (*Client) MobilePlaylistList ¶ added in v0.5.0
MobilePlaylistList calls the tiktok-mobile-playlist-list operation.
func (*Client) MobilePlaylistVideos ¶ added in v0.5.0
MobilePlaylistVideos calls the tiktok-mobile-playlist-videos operation.
func (*Client) MobileSearch ¶ added in v0.4.0
MobileSearch calls the tiktok-mobile-search operation.
func (*Client) MobileSearchEffects ¶ added in v0.5.0
MobileSearchEffects calls the tiktok-mobile-search-effects operation.
func (*Client) MobileSearchHashtags ¶ added in v0.5.0
MobileSearchHashtags calls the tiktok-mobile-search-hashtags operation.
func (*Client) MobileSearchMusic ¶ added in v0.4.0
MobileSearchMusic calls the tiktok-mobile-search-music operation.
func (*Client) MobileSearchPhotos ¶ added in v0.5.0
MobileSearchPhotos calls the tiktok-mobile-search-photos operation.
func (*Client) MobileSearchPlace ¶ added in v0.4.0
MobileSearchPlace calls the tiktok-mobile-search-place operation.
func (*Client) MobileSearchPreInfo ¶ added in v0.4.0
MobileSearchPreInfo calls the tiktok-mobile-search-pre-info operation.
func (*Client) MobileSearchStream ¶ added in v0.5.0
MobileSearchStream calls the tiktok-mobile-search-stream operation.
func (*Client) MobileSearchSug ¶ added in v0.4.0
MobileSearchSug calls the tiktok-mobile-search-sug operation.
func (*Client) MobileSearchTabs ¶ added in v0.4.0
MobileSearchTabs calls the tiktok-mobile-search-tabs operation.
func (*Client) MobileSearchUser ¶ added in v0.4.0
MobileSearchUser calls the tiktok-mobile-search-user operation.
func (*Client) MobileSearchVideos ¶ added in v0.5.0
MobileSearchVideos calls the tiktok-mobile-search-videos operation.
func (*Client) MobileTranslationDescription ¶ added in v0.5.0
MobileTranslationDescription calls the tiktok-mobile-translation-description operation.
func (*Client) MobileTrendingCategories ¶ added in v0.4.0
MobileTrendingCategories calls the tiktok-mobile-trending-categories operation.
func (*Client) MobileTrendingEffects ¶ added in v0.4.0
MobileTrendingEffects calls the tiktok-mobile-trending-effects operation.
func (*Client) MobileUserFollowers ¶ added in v0.5.0
MobileUserFollowers calls the tiktok-mobile-user-followers operation.
func (*Client) MobileUserFollowing ¶ added in v0.5.0
MobileUserFollowing calls the tiktok-mobile-user-following operation.
func (*Client) MobileUserOriginalEffects ¶ added in v0.5.0
MobileUserOriginalEffects calls the tiktok-mobile-user-original-effects operation.
func (*Client) MobileUserOriginalMusic ¶ added in v0.5.0
MobileUserOriginalMusic calls the tiktok-mobile-user-original-music operation.
func (*Client) MobileUserPosts ¶ added in v0.5.0
MobileUserPosts calls the tiktok-mobile-user-posts operation.
func (*Client) MobileUserProfile ¶ added in v0.5.0
MobileUserProfile calls the tiktok-mobile-user-profile operation.
func (*Client) MobileUserRecommendations ¶ added in v0.5.0
MobileUserRecommendations calls the tiktok-mobile-user-recommendations operation.
func (*Client) MobileVideoDetail ¶ added in v0.5.0
MobileVideoDetail calls the tiktok-mobile-video-detail operation.
func (*Client) MobileVideoSubtitles ¶ added in v0.5.0
MobileVideoSubtitles calls the tiktok-mobile-video-subtitles operation.
func (*Client) PopularTrendCountryIndustryMeta ¶
PopularTrendCountryIndustryMeta calls the tiktok-popular-trend-country-industry-meta operation.
func (*Client) ProfilePost ¶
ProfilePost calls the tiktok-profile-post operation.
func (*Client) SearchHashtag ¶
SearchHashtag calls the tiktok-search-hashtag operation.
func (*Client) SearchUser ¶
SearchUser calls the tiktok-search-user operation.
func (*Client) TopAdsAnalysis ¶
TopAdsAnalysis calls the tiktok-top-ads-analysis operation.
func (*Client) TopAdsDetail ¶
TopAdsDetail calls the tiktok-top-ads-detail operation.
func (*Client) TopAdsFilters ¶
TopAdsFilters calls the tiktok-top-ads-filters operation.
func (*Client) TopAdsList ¶
TopAdsList calls the tiktok-top-ads-list operation.
func (*Client) TopAdsLocationInfo ¶
TopAdsLocationInfo calls the tiktok-top-ads-location-info operation.
func (*Client) TopAdsLocations ¶
TopAdsLocations calls the tiktok-top-ads-locations operation.
func (*Client) TopAdsRecommend ¶
TopAdsRecommend calls the tiktok-top-ads-recommend operation.
func (*Client) TopAdsSafety ¶
TopAdsSafety calls the tiktok-top-ads-safety operation.
func (*Client) TopAdsSpotlight ¶
TopAdsSpotlight calls the tiktok-top-ads-spotlight operation.
func (*Client) TopAdsSuggestions ¶
TopAdsSuggestions calls the tiktok-top-ads-suggestions operation.