Back to Developer Hub
REST API
API ya REST
Standard JSON REST interface. Compatible with any programming language or HTTP client. Use cURL, Node.js, Python, Go, or any tool that speaks HTTP.
Base URL
https://makazi.io/api/v1JSON-First
Request and response bodies are always JSON
HTTPS Only
All traffic encrypted with TLS 1.3
Low Latency
Edge-deployed on Vercel for sub-100ms responses
CORS Enabled
Configured for browser-based API calls
Versioned
API v1 guaranteed stable. Breaking changes only in v2+
cURL Friendly
Every endpoint is testable with cURL
Endpoints
POST
/listings/bulkCreate up to 100 listings
GET
/listings/bulkCheck API key status and usage stats
GET
/analytics/pricingGet pricing data by city/type
GET
/analytics/heatmapGet demand heatmap data
POST
/webhooks/registerRegister a webhook URL
DELETE
/webhooks/:idUnregister a webhook
Code Examples
$cURL
bash
# Authentication
curl https://makazi.io/api/v1/listings/bulk \
-H "X-API-Key: mkz_live_YOUR_KEY"
# Create listing
curl -X POST https://makazi.io/api/v1/listings/bulk \
-H "Content-Type: application/json" \
-H "X-API-Key: mkz_live_YOUR_KEY" \
-d '{"listings": [{"title": "Test", "property_type": "apartment", "price": 1000000}]}'JSNode.js
javascript
import axios from 'axios';
const api = axios.create({
baseURL: 'https://makazi.io/api/v1',
headers: { 'X-API-Key': process.env.MAKAZI_API_KEY }
});
// Create listings
const { data } = await api.post('/listings/bulk', {
listings: [
{ title: 'Modern Apartment', property_type: 'apartment', price: 2000000 }
]
});
// Check usage
const stats = await api.get('/listings/bulk');
console.log(stats.data);PYPython
python
import requests
BASE = "https://makazi.io/api/v1"
HEADERS = {"X-API-Key": "mkz_live_YOUR_KEY"}
# Create listings
resp = requests.post(f"{BASE}/listings/bulk",
headers=HEADERS,
json={"listings": [
{"title": "Modern Apartment", "property_type": "apartment", "price": 2000000}
]}
)
print(resp.json())
# Check usage
stats = requests.get(f"{BASE}/listings/bulk", headers=HEADERS)
print(stats.json())Error Codes
| Status | Meaning |
|---|---|
| 200 | OK — Request succeeded |
| 201 | Created — Listings created successfully |
| 400 | Bad Request — Invalid JSON or validation failed |
| 401 | Unauthorized — Missing or invalid API key |
| 403 | Forbidden — Key revoked or insufficient permissions |
| 404 | Not Found — Endpoint does not exist |
| 429 | Too Many Requests — Rate limit exceeded (retry after 60s) |
| 500 | Server Error — Contact support@makazi.io |