Public API v1 ZADS ESSENTIAL - DEMO v1.2.0

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

  1. An administrator creates an application from Admin → API Apps (name, description, scopes, rate limit).
  2. The panel issues an App ID (public identifier) and an App Secret (shown exactly once — store it in your own secrets manager, it cannot be retrieved again, only regenerated).
  3. Every request to /api/v1/* (except /status et /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
The App Secret is stored server-side as a one-way hash — the plaintext value is never recoverable. Treat it like a password: keep it server-side, never ship it inside a browser app or a public repository.

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."
}
StatutMeaning
401Missing or invalid App ID / App Secret
403Application suspended/revoked, or missing scope
404Unknown endpoint or resource not found
405HTTP method not allowed on this endpoint
422Validation error
500Server 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

GET /status no credentials required

Health check and version info.

GET /ads

Search / list active listings.

ParamTypeDescription
qstringFull-text search across title and description
category_idint
min_price / max_pricenumber
citystring
countrystringISO 3166-1 alpha-2
sortstringnewest | price_asc | price_desc | featured
page / per_pageintper_page capped at 50
GET /ads/{id}

A single active listing, with its images. Contact details and internal fields are never exposed on this public endpoint.

GET /categories

Full category tree (and flat list), each with its active ad count.

GET /pages

Published static pages (About, Terms, Privacy, ...).

GET /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.