Adsourcer Developer

SDKs

Typed clients with retries, event helpers, and full API coverage for Node and Python.

Installation

bash
npm install @adsourcer/sdkpip install adsourcer

TypeScript

typescript
import { Adsourcer } from "@adsourcer/sdk"; const client = new Adsourcer({  apiKey: process.env.ADSOURCER_API_KEY!,  baseUrl: "https://api.adsourcer.io", // optional}); const result = await client.ads.recommend({  query: userMessage,  context: { currency: "EUR", location: "NO" },  max_results: 3,});

Python

python
from adsourcer import Adsourcer client = Adsourcer(api_key=os.environ["ADSOURCER_API_KEY"]) result = client.ads.recommend(    query=user_message,    context={"currency": "EUR", "location": "NO"},    max_results=3,)

Event helpers

Both SDKs expose client.events with typed methods for impressions, clicks, and conversions. See the Events guide.

Repositories