Go SDK

Getting started with the People Data Labs Go Helper Library, which is our open-source SDK that lets you write Go code to make HTTP requests to the People Data Labs API

The People Data Labs Go Helper Library

The People Data Labs Go Helper Library makes it easy to interact with the People Data Labs API from your Go application. You can find the most recent version of the library on Go Packages.

Install the library

This library is available as a Go package, and you can install it by doing the following:

go get github.com/peopledatalabs/peopledatalabs-go

Using the library

package main

import "fmt"

import (
    pdl "github.com/peopledatalabs/peopledatalabs-go"
    pdlmodel "github.com/peopledatalabs/peopledatalabs-go/model"
)

func main() {
    apiKey := "API_KEY"
    // Set API KEY as env variable
    // apiKey := os.Getenv("API_KEY")

    client := pdl.New(apiKey)
    
    params := pdlmodel.EnrichPersonParams {
        PersonParams: pdlmodel.PersonParams {
            Phone: []string{"4155688415"},
        },
    }

    result, err := client.Person.Enrich(params)

    if err == nil {
        fmt.Printf("Status: %d, FullName: %s\n", result.Status, result.Data.FullName)
    }  
}

More Information, Pull Requests, Feature Suggestions and Bug Reports

We've open-sourced the library, which is available on GitHub. Head there to view more information and submit pull requests, feature suggestions or bug reports.


Did this page help you?