Repository navigation
Home
socialkit-go is a typed, standard-library-only Go client for the SocialKit REST API. It groups endpoints into focused services, accepts context.Context for every request, returns response metadata alongside decoded data, and exposes typed errors that work with Go’s errors.Is and errors.As patterns. The module supports Go 1.21 and later. 1 2
Scope. This Wiki documents the Go SDK. SocialKit’s endpoint-level contract, availability, charges, and platform-specific restrictions are maintained in the live SocialKit API reference and may evolve independently of an SDK release. 3
Install the package and make a first authenticated request in Getting Started. Then review Client Configuration before using the library in a service or production workload. The Service Reference is the compact index of all SDK operations, while the focused guides provide copy-ready patterns for common tasks.
| If you want to… | Read this page |
|---|---|
| Install the SDK and fetch a first transcript | Getting Started |
| Set timeouts, custom transports, or authentication behavior | Client Configuration |
| Understand request types, metadata, caching, and summary extensions | Core Concepts |
| Find a method, its route, request type, and return type | Service Reference |
| Extract transcripts or generate structured summaries | Transcripts and Summaries |
| Iterate through comments, feeds, and searches | Pagination and Listings |
| Download short content or manage long-running jobs | Downloads |
| Handle failures, retry safely, and inspect headers | Errors, Retries, and Observability |
| Use experimental multi-request endpoints | Bulk Operations |
| Resolve common integration questions | FAQ and Troubleshooting |
A Client exposes services as fields. Methods consistently return a decoded result, *ResponseMeta, and error; the experimental bulk methods return raw JSON instead of a strongly typed result. 1 4
| Service field | Main purpose | API route family |
|---|---|---|
client.Status |
Check the public service status | /status |
client.Credits |
Inspect the authenticated project credit balance | /credits |
client.YouTube |
Work with YouTube videos, channels, search, downloads, and bulk calls | /youtube/* |
client.TikTok |
Work with TikTok videos, profiles, search, downloads, and bulk calls | /tiktok/* |
client.Instagram |
Work with Instagram posts, profiles, reels, and bulk calls | /instagram/* |
client.Facebook |
Work with Facebook content and profiles | /facebook/* |
client.Twitter |
Retrieve X/Twitter profiles, tweets, threads, and transcripts | /twitter/* |
client.LinkedIn |
Retrieve LinkedIn profiles, company data, posts, and transcripts | /linkedin/* |
client.Video |
Process a direct video-file URL | /video/* |
client.Downloads |
Start, poll, and wait for v2 asynchronous download jobs | /v2/* |
The SDK sends the access key using the x-access-key header by default and redacts credential-like values from caller-visible errors and response metadata. Automatic retries are deliberately disabled by default, which avoids repeating potentially billable POST requests until the application explicitly opts in. 2 5
The implementation is designed to make application code predictable: use Go contexts for cancellation, inspect the returned metadata when credit or rate-limit information is relevant, and branch on typed errors rather than matching error strings. Those concepts are explained in Core Concepts and Errors, Retries, and Observability.
package main
import (
"context"
"fmt"
"log"
"os"
socialkit "github.com/tigusigalpa/socialkit-go"
)
func main() {
client := socialkit.NewClient(os.Getenv("SOCIALKIT_ACCESS_KEY"))
transcript, meta, err := client.YouTube.Transcript(context.Background(), &socialkit.FetchRequest{
URL: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(transcript.Transcript)
if meta.CreditsUsed != nil {
fmt.Printf("credits used: %.0f\n", *meta.CreditsUsed)
}
}Use only URLs that you are authorised to process. This example follows the SDK’s documented construction and method pattern. 1