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/v1

JSON-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/bulk

Create up to 100 listings

GET/listings/bulk

Check API key status and usage stats

GET/analytics/pricing

Get pricing data by city/type

GET/analytics/heatmap

Get demand heatmap data

POST/webhooks/register

Register a webhook URL

DELETE/webhooks/:id

Unregister 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

StatusMeaning
200OK — Request succeeded
201Created — Listings created successfully
400Bad Request — Invalid JSON or validation failed
401Unauthorized — Missing or invalid API key
403Forbidden — Key revoked or insufficient permissions
404Not Found — Endpoint does not exist
429Too Many Requests — Rate limit exceeded (retry after 60s)
500Server Error — Contact support@makazi.io