Welcome to Torziva Sync
Torziva Sync turns any website into a REST API using a lightweight JavaScript SDK. This documentation covers everything from initial setup to advanced webhook configuration.
API Reference
Full technical breakdown of v1 endpoints and response formats.
SDK Guides
How the SDK works on standard and SPA-driven websites.
Up and running in 5 minutes
curl https://api.torziva-sync.site/v1/contents \
-H "x-api-key: pk_live_xxxx" \
-H "x-api-secret: sk_live_xxxx"Installing the SDK
Paste this into your <head> tag. Replace YOUR_PUBLIC_KEY with your project's public key from the dashboard.
<script
async
src="https://torziva-sync.site/sdk.js?key=pk_live_xxxx">
</script>The SDK loads asynchronously — it will never block your page render or affect core web vitals.
Auto Detection
By default, Torziva Sync uses smart heuristics to identify product names, prices, and descriptions. It follows schema.org, JSON-LD, and major OpenGraph standards.
Manual Selectors
If auto-detection misses a field, you can override it in your dashboard by providing a CSS selector.
Field: Price
Selector: main section div.current-price
Attribute: textContent (default)SPA / React Support
Our SDK uses a `MutationObserver` to watch for DOM changes. It works out of the box with React, Next.js, and Vue applications.
Authenticating API Requests
All `/v1/` endpoints require two headers for authentication. Your secret key is shown only once when generated.
const res = await fetch(
'https://api.torziva-sync.site/v1/contents',
{
headers: {
'x-api-key': process.env.TORZIVA_PUBLIC_KEY,
'x-api-secret': process.env.TORZIVA_SECRET_KEY,
}
}
);GET /v1/contents
List all synchronized and enabled content items for your account or project.
Error Codes
| Code | Description |
|---|---|
| 401 | Unauthorized - Missing or invalid API keys |
| 403 | Forbidden - Key does not have access to this resource |
| 404 | Not Found - Resource (project or item) does not exist |
| 429 | Rate Limit Exceeded |
Rate Limits
| Plan | Calls/Day | Reset |
|---|---|---|
| Free | 1,000 | Midnight UTC |
| Pro | 100,000 | Midnight UTC |
| Enterprise | Unlimited | — |
Webhooks
Torziva Sync can notify your own system in real-time when new data is discovered. Add a Webhook URL in your project dashboard settings.
Payload Format
{
"event": "content.synced",
"project_id": "xxx",
"data": {
"title": "Nike Air Zoom",
"price": "$129.00"
}
}