Official client libraries for TypeScript, Python, and .NET
Three official Zyfy client libraries are now available — one each for TypeScript/Node.js, Python, and .NET. Each one handles the parts of API integration that aren't interesting: authenticating requests, retrying when enrichment is still running, backing off on rate limits, and parsing quota headers. You write the logic; the library handles the plumbing.
TypeScript / Node.js
npm install @zyfy-uk/zyfy
Requires Node.js 20+. Full TypeScript definitions included — no separate @types package needed.
import { Zyfy } from '@zyfy-uk/zyfy'
const client = new Zyfy() // reads ZYFY_API_KEY from env
const vehicle = await client.vehicle.lookup('AB12CDE')
console.log(vehicle.summary?.buyRecommendation) // "good" | "consider" | "caution" | "avoid"
console.log(vehicle.signals?.motExpiryDate)
console.log(vehicle.quota.remaining) // requests left this month
const postcode = await client.postcode.lookup('SW1A 2AA')
console.log(postcode.summary?.liveabilityLevel) // "low" | "medium" | "high"
console.log(postcode.signals?.crime?.rateBand)
Python
pip install zyfy
Requires Python 3.9+. Supports both synchronous and asynchronous usage.
from zyfy import Zyfy
with Zyfy() as client: # reads ZYFY_API_KEY from env
vehicle = client.vehicle.lookup('AB12CDE')
print(vehicle.summary.buy_recommendation)
print(vehicle.signals.mot_expiry_date)
postcode = client.postcode.lookup('SW1A 2AA')
print(postcode.summary.liveability_level)
print(postcode.signals.crime.rate_band if postcode.signals and postcode.signals.crime else None)
Prefer async? Use AsyncZyfy with the same interface:
import asyncio
from zyfy import AsyncZyfy
async def main():
async with AsyncZyfy() as client:
vehicle = await client.vehicle.lookup('AB12CDE')
print(vehicle.summary.buy_recommendation)
asyncio.run(main())
.NET
dotnet add package Zyfy
Targets netstandard2.0 — compatible with .NET 6+, .NET Framework 4.6.1+, and VB.NET. Every method has both async and sync variants.
using Zyfy;
var client = new ZyfyClient(); // reads ZYFY_API_KEY from env
var vehicle = await client.Vehicle.LookupAsync("AB12CDE");
Console.WriteLine(vehicle.Summary?.BuyRecommendation);
Console.WriteLine(vehicle.Signals?.MotExpiryDate);
Console.WriteLine(vehicle.Quota?.Remaining);
var postcode = await client.Postcode.LookupAsync("SW1A 2AA");
Console.WriteLine(postcode.Summary?.LiveabilityLevel);
Console.WriteLine(postcode.Signals?.Crime?.RateBand);
// Sync variant when you need it
var result = client.Vehicle.Lookup("AB12CDE");
What each library handles automatically
Enrichment retries. Vehicle lookups sometimes return enrichmentPending: true on first call — the vehicle was just seen for the first time and background enrichment is running. All three libraries retry automatically (up to 10 times by default, waiting the Retry-After interval between each attempt). You get the enriched result back without writing any retry logic yourself. Set maxEnrichmentRetries: 0 to disable and handle it manually.
Rate limit backoff. If you hit the per-minute rate limit, the library raises a typed exception with the retryAfter value so you can back off and retry cleanly.
Quota tracking. Every successful response includes a quota object populated from the response headers — limit, used, remaining, resets. Read remaining after each call if you need to pace high-volume processing.
Bulk and async bulk. All three libraries support synchronous bulk lookups (bulkLookup) and the async job pattern (submitBulk → getJob → deleteJob) for larger batches.
Getting started
Get a free API key at zyfy.uk/signup — 100 requests/month on the free tier, no card required. Full API reference and signal documentation at zyfy.uk/docs.