SDKs & libraries
Official SDKs
Forge maintains official client libraries for JavaScript/TypeScript, Python, and Go. Each SDK handles auth headers, JSON parsing, and surfaces rate-limit and error information as first-class objects so you don't have to parse envelopes by hand.
If your language isn't listed, Forge is a plain JSON REST API — any HTTP client works fine. See authentication for the header format.
JavaScript / TypeScript
npm install @forge-api/sdk
import Forge from '@forge-api/sdk';
const forge = new Forge('fg_live_xxxxxxxx');
const wx = await forge.weather({ lat: 51.51, lon: -0.13, units: 'metric' });
console.log(wx.data.current.temp, wx.data.current.condition.text);
const geo = await forge.geocode({ q: 'springfield', limit: 5 });
console.log(geo.data.results);
The JS SDK works in Node.js and modern browsers, though for browser usage we strongly recommend proxying requests through your own backend so your fg_live_ key is never shipped to the client.
Python
pip install forge-api
from forge_api import Forge
forge = Forge('fg_live_xxxxxxxx')
wx = forge.weather(lat=51.51, lon=-0.13)
print(wx['data']['current']['temp'])
geo = forge.geocode(q='springfield', limit=5)
print(geo['data']['results'])
The Python SDK targets Python 3.8+ and ships type hints for editor autocomplete.
Go
go get github.com/forge-api/forge-go
package main
import (
"context"
"fmt"
forge "github.com/forge-api/forge-go"
)
func main() {
client := forge.New("fg_live_xxxxxxxx")
wx, err := client.Weather(context.Background(), forge.WeatherParams{
Lat: 51.51,
Lon: -0.13,
Units: "metric",
})
if err != nil {
panic(err)
}
fmt.Println(wx.Data.Current.Temp)
}
Choosing between raw HTTP and an SDK
- Use an SDK if you want typed responses, automatic retry-after handling on
429, and helpers for pagination-like parameters such aslimit. - Use raw
curl/fetchcalls for quick scripts, one-off debugging, or languages without an official client — the API surface is small enough that this is rarely a burden.
Versioning
All SDKs target the /v1 API exclusively; none of them support the deprecated /v0 endpoints. If you're maintaining an older integration on /v0, see migrating from v0.
Next steps
- Follow the quickstart if you haven't created a key yet.
- Check the weather and geocode references for full parameter and field documentation.