Cambra de la Propietat Urbana de Badalona — Developer & Agent API
Integrate Cambra's content and services into your application or AI agent. The public API exposes services, news, practical guides, and property listings in a machine-readable format.
REST API
All endpoints are read-only and require no authentication. Responses are JSON.
| Method | Endpoint | Description |
|---|---|---|
| GET | /wp-json/cambra/v1/info | Site info, contact details, API links |
| GET | /wp-json/cambra/v1/services | List services (paginated, searchable) |
| GET | /wp-json/cambra/v1/services/{id} | Single service |
| GET | /wp-json/cambra/v1/news | List news articles |
| GET | /wp-json/cambra/v1/news/{id} | Single news article |
| GET | /wp-json/cambra/v1/practical-info | List practical info guides |
| GET | /wp-json/cambra/v1/practical-info/{id} | Single guide |
| GET | /wp-json/cambra/v1/properties | List property listings (with meta) |
| GET | /wp-json/cambra/v1/properties/{id} | Single property listing |
| GET | /wp-json/cambra/v1/search?q={query} | Full-text search across all content |
Example: List services
GET https://cambrabadalona.com/wp-json/cambra/v1/services
# Response
{
"items": [
{
"id": 42,
"title": "Administració de Finques",
"excerpt": "Gestió integral de comunitats de propietaris...",
"url": "https://cambrabadalona.com/serveis/administracio-finques/",
"date": "2024-01-15T10:00:00+01:00",
"type": "servicio"
}
],
"total": 12,
"totalPages": 1
}
Example: Search
GET https://cambrabadalona.com/wp-json/cambra/v1/search?q=lloguer+habitatge
Common query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| lang | string | (all) | Language filter: ca (Catalan) or es (Spanish). Omit to return content in all languages. |
| per_page | integer | 10–20 | Number of items per page (max 100 for most endpoints). |
| page | integer | 1 | Page number for pagination. |
| search | string | — | Keyword filter applied to title and content (max 200 chars). |
Language filtering
The site is bilingual (Catalan / Spanish, managed by Polylang). Each piece of content
exists as a separate post per language. By default every collection endpoint returns
items in all languages mixed together. Use ?lang=ca or
?lang=es to restrict results to a single language. Every response item
includes a lang field so you can detect the language without filtering.
# Catalan services only
GET https://cambrabadalona.com/wp-json/cambra/v1/services?lang=ca
# Spanish news only
GET https://cambrabadalona.com/wp-json/cambra/v1/news?lang=es
# Search in Catalan
GET https://cambrabadalona.com/wp-json/cambra/v1/search?q=administracio&lang=ca
Response items include "lang": "ca" or "lang": "es",
plus a translations map with the URL of the equivalent post in the other language.
OpenAPI Specification
A machine-readable OpenAPI 3.1 specification is published at
/openapi.json.
Use it to auto-generate client SDKs, import into Postman, or let AI agents
discover the full API surface.
GET https://cambrabadalona.com/openapi.json
Compatible with Swagger UI, Redoc, Postman, and any OpenAPI 3.1 toolchain.
MCP Server (AI Agent Integration)
An MCP (Model Context Protocol) server is available at
/mcp using Streamable HTTP transport
(JSON-RPC 2.0 over HTTPS POST). Compatible with Claude, ChatGPT, and any
MCP-capable AI agent.
Available tools
get_site_info— Organization info and contact detailssearch_content— Full-text search across all contentlist_services— Services offered to property ownerslist_news— Latest news and announcementslist_practical_info— Legal and practical guideslist_properties— Property listings (Bolsa Inmobiliaria)get_property— Full details for a single property
Quick start (cURL)
# 1. Handshake
curl -X POST https://cambrabadalona.com/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","clientInfo":{"name":"my-agent","version":"1.0"}}}'
# 2. List tools
curl -X POST https://cambrabadalona.com/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
# 3. Call a tool
curl -X POST https://cambrabadalona.com/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_content","arguments":{"query":"lloguer habitatge"}}}'
Claude Desktop configuration
{
"mcpServers": {
"cambrabadalona": {
"type": "streamable-http",
"url": "https://cambrabadalona.com/mcp"
}
}
}
Resource Index
- 📄 /llms.txt — LLM-friendly site manifest
- 📋 /openapi.json — OpenAPI 3.1 specification
- 🤖 /mcp — MCP server (POST, JSON-RPC 2.0)
- 🔗 /wp-json/cambra/v1/info — API entry point
- 🗺️ /wp-sitemap.xml — XML sitemap
- 📰 RSS Feed — Latest content
Questions & Support
For API questions or integration support, contact cambra@cambrabadalona.com.