Read time: 1–3 minutes. This guide works for complete beginners and gives experienced teams copy-pasteable patterns that are safe to take to production.
What you’ll build
You will:- Create an API key.
- Install the official SDKs.
- Call
/v1/extractto get normalized structured JSON from a real page. - Call
/v1/searchto get an answer with sources. - Understand the response envelope so you can log, monitor, and handle errors correctly.
- Authentication via
X-API-Key. - The new endpoints:
/v1/extract,/v1/search, and/v1/perform(preview). - The current envelope shape and field ordering.
1. Create an API key
Open https://uapi.nl/api/ and create an API key. Keep it in a secrets manager or password vault. Never embed it in frontend code or public repos.2. Install the official SDKs (recommended)
- Python
- TypeScript / Node.js
3. First extraction with /v1/extract
The /v1/extract endpoint turns a public URL into normalized, schema-aligned JSON.
Python (SDK)
Node.js / TypeScript (SDK)
Raw HTTPS (cURL)
If everything is wired correctly, you receive HTTP 200,
"success": true, and a data object with normalized fields (for example, price, percent_change, currency, timestamp).4. Understand the response envelope
This is a representative envelope for/v1/extract (values truncated):
(truncated)
idis stable per request: log this for debugging and billing checks.successtells you if usable structured data is present.datais the normalized object; its shape depends on the page’s schema.erroris null on success, or an object with stablecodeandmessage.requestcontains everything you need for observability.uapi_versionandschema_versionlet you pin behavior over time.
5. Ask a sourced question with /v1/search
Use /v1/search when you want a direct answer plus sources.
Python (SDK)
Node.js / TypeScript (SDK)
Raw HTTPS (cURL)
/v1/search response includes:
data.answer_text: concise, direct answer.data.sources: array of{ url, title }entries you can inspect or display.
6. Production-grade tweaks in 5 seconds
Use retries and timeouts from the SDKs instead of reinventing them.Python
Node.js
7. Common mistakes and fast fixes
401: Missing or invalid API key
401: Missing or invalid API key
Ensure
X-API-Key is set and matches a live key. In local development, echo $UAPI_API_KEY (or $Env:UAPI_API_KEY on Windows) to confirm. The envelope includes an INVALID_API style error code you can branch on.Parameter not URL-encoded
Parameter not URL-encoded
Always URL-encode
url and query values. If you see unexpected truncation or errors on certain URLs, verify encoding with your language’s standard library.No structured data in data
No structured data in data
If
success is false with NO_CONTENT, the target may be unsupported, behind auth, or not reliably extractable. Try another URL or adjust your target.Slow or flaky responses
Slow or flaky responses
Large or defensive sites can take longer. Keep a 60s timeout on first runs, use the SDK retry defaults, and move heavy calls off your hot request path.
8. Next steps
- Read the
/v1/extract,/v1/search, and/v1/performendpoint docs for exact parameters and examples. - Review the Responses and Types pages to rely on field names and normalization guarantees.
- Use the Caching page to control
x-cache-ttl(0–3600 seconds) for your own key-scoped cache. - See the Pledge and Support pages to understand how we handle stability, fairness, and incident response.
If you have run one successful
/v1/extract call and one /v1/search call with the SDKs or raw HTTP, you are ready to integrate uAPI into real workflows.