Official SDKs
Use an official SDK to integrate Tracore into your application.
TypeScript / JavaScript
Full-featured SDK for Node.js and browser environments. Includes auto-polling, file uploads, and TypeScript types.
Go
Idiomatic Go SDK with resource groups, a one-call Extract helper, run polling, and typed errors.
Installation
# TypeScript / JavaScript
npm install @tracore/sdk
# Go
go get github.com/tracore-io/sdk-go
Quick example
import { TracoreClient } from '@tracore/sdk';
const client = new TracoreClient({
apiKey: process.env.TRACORE_API_KEY!,
});
const run = await client.extract('my-workspace', 'invoice', {
file: new Blob([buffer], { type: 'application/pdf' }),
fileName: 'invoice.pdf',
poll: true,
});
console.log(run.result);
import tracore "github.com/tracore-io/sdk-go"
client, err := tracore.New(tracore.ClientOptions{
APIKey: os.Getenv("TRACORE_API_KEY"),
})
if err != nil {
log.Fatal(err)
}
run, err := client.Extract(ctx, "my-workspace", "invoice",
tracore.ExtractInput{File: f, FileName: "invoice.pdf"},
&tracore.ExtractOptions{Poll: true})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.Status, run.ExtractedData)
See the Quickstart for a complete walkthrough.