ZADS ESSENTIAL - DEMO Public REST API
A stable, versioned, read-only REST API for listings, categories and pages — built to be called by third-party apps and, eventually, an MCP server on top of this platform.
https://demo-ng.zads.fr/api/v1
OpenAPI spec
Overview
The public API lives under https://demo-ng.zads.fr/api/v1 and is completely separate from the internal endpoints the website's own front-end uses. It never relies on login sessions or cookies — every call is authenticated with an App ID + App Secret pair ("App identification"), so it can safely be called from a server, a script, or an MCP server without a human logging in first.
- Read-only in v1: search and fetch listings, categories, and static pages.
- Every call is versioned, authenticated, and logged.
- A machine-readable OpenAPI 3.0 spec describes every endpoint — a natural starting point for generating an MCP server's tool definitions.
Authentication procedure
- An administrator creates an application from Admin → API Apps (name, description, scopes, rate limit).
- The panel issues an
App ID(public identifier) and anApp Secret(shown exactly once — store it in your own secrets manager, it cannot be retrieved again, only regenerated). - Every request to
/api/v1/*(except/statuset/openapi.json) must include both credentials as request headers:
X-App-Id: app_5f3e9c2a1b7d4e6f9a8c7d6e
X-App-Secret: sk_7c1a9e4f6b2d8e0a3c5f7b9d1e3a5c7f9b1d3e5f7a9c1e3b5d7f9a1c3e5b7d9
Alternatively, a single bearer token in the form app_id.secret is also accepted, for clients that only support one Authorization header:
Authorization: Bearer app_5f3e9c2a1b7d4e6f9a8c7d6e.sk_7c1a9e4f6b2d8e0a3c5f7b9d1e3a5c7f9b1d3e5f7a9c1e3b5d7f9a1c3e5b7d9
Versioning
The API is versioned in the URL path: https://demo-ng.zads.fr/api/v1/.... The current version is v1. A future v2 will be introduced as a new path prefix (https://demo-ng.zads.fr/api/v2/...) alongside v1, which will keep working for a documented deprecation period — existing integrations are never broken silently by a version bump.
Making a request
curl "https://demo-ng.zads.fr/api/v1/ads?q=iphone&per_page=5" \
-H "X-App-Id: app_5f3e9c2a1b7d4e6f9a8c7d6e" \
-H "X-App-Secret: sk_7c1a9e4f6b2d8e0a3c5f7b9d1e3a5c7f9b1d3e5f7a9c1e3b5d7f9a1c3e5b7d9"
Response format
Every endpoint returns the same JSON envelope:
{
"success": true,
"message": "OK",
"data": { ... }
}
Errors
{
"success": false,
"message": "Invalid App ID or App Secret."
}
| Statut | Meaning |
|---|---|
401 | Missing or invalid App ID / App Secret |
403 | Application suspended/revoked, or missing scope |
404 | Unknown endpoint or resource not found |
405 | HTTP method not allowed on this endpoint |
422 | Validation error |
500 | Server error |
Rate limits
Each application has a configurable requests-per-minute limit (default 60/min), set from Admin → API Apps. Every call is recorded in Admin → API Logs, where administrators can see per-application volume and error rates.
Reusing this API for an MCP server
This API was designed to be the backend for an MCP (Model Context Protocol) server:
- Stable, versioned URLs and a uniform JSON envelope are easy to wrap as MCP tools.
- The openapi.json spec at this base URL can be fed directly to an OpenAPI-to-MCP-tools generator, or used as the contract when hand-writing tool definitions.
- Create a dedicated application (e.g. "MCP Server") from Admin → API Apps so its usage is tracked separately in API Logs.
Endpoints
/status
no credentials required
Health check and version info.
/ads
Search / list active listings.
| Param | Type | Description |
|---|---|---|
q | string | Full-text search across title and description |
category_id | int | — |
min_price / max_price | number | — |
city | string | — |
country | string | ISO 3166-1 alpha-2 |
sort | string | newest | price_asc | price_desc | featured |
page / per_page | int | per_page capped at 50 |
/ads/{id}
A single active listing, with its images. Contact details and internal fields are never exposed on this public endpoint.
/categories
Full category tree (and flat list), each with its active ad count.
/pages
Published static pages (About, Terms, Privacy, ...).
/pages/{slug}
A single published static page, with its full HTML content.
API changelog
- v1 — Initial release: App ID/Secret authentication, read-only Ads / Categories / Pages endpoints, OpenAPI spec, call logging.
Questions or need an application created? Contact sales@zads.fr.