Changelog

Go SDK

go.ideal-postcodes.co.uk/sdk is our Go SDK for the Ideal Postcodes API. It has one typed method for every API operation, uses only the standard library and runs on Go 1.26 or later.

Details

  • Every operation: Postcode lookup, address search and autocomplete, UPRN lookup, address cleanse, places, email and phone validation, plus key, licensee and configuration management
  • No dependencies: Requests go through net/http and encoding/json. Pass your own *http.Client with WithHTTPClient to control timeouts and transport
  • Typed responses: Every response is a struct generated from the OpenAPI spec. A field that holds one of several shapes has As<Variant>() accessors, and each dataset's native record has its own type, from PafAddress to UspsAddress
  • Context first: Every method takes a context.Context, for deadlines and cancellation
  • Clear errors: An HTTP error returns *idealpostcodes.APIError with the HTTP status and the API's error code and message
  • No hidden retries: A billable lookup repeats only when your code repeats it
  • Agent skill: npx skills add ideal-postcodes/skills gives coding agents the ideal-postcodes-go-sdk skill

Install with go get go.ideal-postcodes.co.uk/sdk, then start with the Go SDK documentation.