← Back to PMD

Property Market DataAPI Documentation

REST API for property market intelligence, area profiles, valuations, and content delivery.

Authentication

All API requests require authentication via an API key. Include your key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Generate API keys from the Content Delivery → API Keys section in your admin dashboard.

Rate limit: 100 requests per minute per API key.

Locations

GET /api/v1/locations

List all locations in your territory with pagination.

Parameters

pageintegerPage number (default: 1)
per_pageintegerResults per page (max: 200, default: 50)
countystringFilter by county (e.g. "Norfolk")
districtstringFilter by district

Response

{
  "success": true,
  "data": [
    {
      "id": 1, "name": "Acle", "slug": "acle",
      "postcode": "NR13 3DY", "county": "Norfolk",
      "district": "Broadland", "lat": 52.637, "lng": 1.544,
      "wp_page_id": 6699
    }
  ],
  "meta": { "total": 324, "page": 1, "per_page": 50, "total_pages": 7 }
}
GET /api/v1/locations/:slug

Get detailed data for a single location including market snapshot.

Response

{
  "success": true,
  "location": {
    "id": 1, "name": "Acle", "slug": "acle", "postcode": "NR13 3DY",
    "county": "Norfolk", "district": "Broadland"
  },
  "snapshot": {
    "avg_price": 325000, "median_price": 295000,
    "num_sales": 45, "growth_1y": 3.2,
    "sstc_pct": 62, "avg_days_on_market": 34,
    "price_per_sqft": 285
  },
  "profile": { ... },
  "market_score": { "overall": 72, "demand": 8, "growth": 6, "value": 7 }
}

Market Statistics

GET /api/v1/stats

Aggregate market statistics across all your territory locations.

Response

{
  "success": true,
  "stats": {
    "total_locations": 324,
    "avg_price": 385000,
    "total_sales_12m": 4200,
    "avg_growth_1y": 2.8,
    "avg_sstc_pct": 58
  }
}

Content & Articles

GET /api/v1/locations/:slug/content

Get the full branded area page content (HTML) for a location. This is the primary endpoint for embedding area pages on your website.

Response

{
  "success": true,
  "content": {
    "full_html": "<div class='pmd-area-page'>...</div>",
    "market_overview": "...",
    "price_analysis": "...",
    "investment_outlook": "...",
    "lifestyle_narrative": "..."
  }
}
GET /api/v1/content/articles

List generated market commentary articles (weekly and monthly).

Parameters

typestring"weekly" or "monthly" (default: "weekly")
limitintegerNumber of articles to return (default: 10)
POST /api/v1/content/articles/generate

Generate a new AI-written market commentary article.

Body

typestring"weekly" or "monthly" required
tenant_idintegerYour tenant ID

Social Cards

GET /api/v1/social-cards/:slug/location-stats

Generate a branded social media card image for a location.

Parameters

platformstring"instagram", "facebook", "linkedin", "x", or "pinterest"
formatstring"svg" or "png" (default: "svg")
tenant_idintegerYour tenant ID (for company branding)

Company Branding

GET /api/v1/branding

Get your company branding configuration.

Requires JWT authentication (admin dashboard session).

POST /api/v1/branding

Update company branding (colours, fonts, logos, delivery method).

Requires JWT authentication with company_admin or super_admin role.

Error Handling

All errors return a JSON object with an error field:

{
  "success": false,
  "error": "Description of what went wrong"
}

HTTP Status Codes

200OKRequest succeeded
400Bad RequestInvalid parameters
401UnauthorizedMissing or invalid API key
404Not FoundResource not found
429Rate LimitedToo many requests
500Server ErrorInternal error

Quick Start

# List your locations
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://propertymarketdata.co.uk/api/v1/locations

# Get area page content for embedding
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://propertymarketdata.co.uk/api/v1/locations/acle/content

# Generate a social card
curl "https://propertymarketdata.co.uk/api/v1/social-cards/acle/location-stats?platform=instagram&format=png&tenant_id=1"

© Property Market Data · propertymarketdata.co.uk