Api

perplexity-go: a Go library for the Perplexity API

A lightweight, idiomatic Go client for Perplexity AI — chat completions, the Search API, and a few notes from the maintainer

I’ve been maintaining perplexity-go for a while now — a small Go client for the Perplexity AI API. It started as scratching my own itch (I needed a CLI to query Perplexity from scripts) and grew into a library I now reach for whenever a Go project needs real-time, cited answers from the web.

This post is a tour of what it does, why it exists, and how to use it.

Golang golang perplexity ai