Guides / Build with / Go SDK

Go SDK

Official zero-dependency Go client (stdlib only) with full parity across all public data namespaces, automatic retries, cursor pagination with loop protection, async batch jobs, and typed errors.

Installation

Install tikultra.com/tikultra inside a Go module directory (containing go.mod) with zero third-party dependencies (Go stdlib only) and export TIKULTRA_KEY:

go get tikultra.com/tikultraexport TIKULTRA_KEY="tku_live_..."

Quickstart & pagination

tikultra.New() automatically reads TIKULTRA_KEY or TIKULTRA_API_KEY. Every response includes Data, CreditsRemaining, and RequestID:

main.go
1package main2 3import (4	"context"5	"fmt"6	"log"7 8	"tikultra.com/tikultra"9)10 11func main() {12	client, err := tikultra.New() // reads TIKULTRA_KEY / TIKULTRA_API_KEY13	if err != nil {14		log.Fatal(err)15	}16	defer client.Close()17 18	ctx := context.Background()19 20	profile, err := client.User.Profile(ctx, "tiktok")21	if err != nil {22		log.Fatal(err)23	}24	fmt.Println(profile.Data["user"])25	if profile.CreditsRemaining != nil {26		fmt.Println("credits remaining:", *profile.CreditsRemaining)27	}28 29	// Paginate comments with automatic cursor loop guard30	pager := client.Paginate(ctx, "/v1/video/comments", "", &tikultra.PaginateOptions{31		Params:   tikultra.Params{"aweme_id": "7693184538704416031"},32		MaxPages: 5,33	})34	for pager.Next() {35		fmt.Println("page items:", pager.Page().Data["comments"])36	}37	if err := pager.Err(); err != nil {38		log.Fatal(err)39	}40}

All 13 data resource namespaces are exposed directly on client: Video, User, Feed, Search, Shop, Live, Creator, Tako, Douyin, Series, Music, Hashtag, and Jobs.

Testing & verification

go test -v -race ./...TIKULTRA_LIVE_TESTS=1 TIKULTRA_KEY=tku_live_... go test -v -run TestLiveAllEndpoints -timeout 15m ./...