Skip to main content

GET /v1-quote-funeral-service

The main funeral service quote endpoint. Returns available services in the specified locality with real prices pulled from Funos’s live database. Recommended use: When the user asks about the price of a burial, cremation, or funeral service in a Spanish city.

Parameters

ParameterTypeRequiredDescription
locality_idinteger✅ YesSpanish locality ID. See reference table below.
service_typestringNocremation or burial. No value: returns both types.

Reference localities

Citylocality_id
Madrid24017
Barcelona21088
Need the locality_id for another city? Query the Knowledge Base endpoint with "locality id [city]".

Request example

cURL
curl -X GET \
  "https://qegraxvwwikrltmtfamo.supabase.co/functions/v1/v1-quote-funeral-service?locality_id=24017" \
  -H "Authorization: Bearer YOUR_API_KEY"
JavaScript
const res = await fetch(
  'https://qegraxvwwikrltmtfamo.supabase.co/functions/v1/v1-quote-funeral-service?locality_id=24017',
  { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const { data, cta } = await res.json();

Successful response (200 OK)

{
  "data": {
    "services": [
      {
        "name": "Funeraria Madrid - Incineración Basic",
        "price": 1495,
        "currency": "EUR",
        "service_type": "cremation",
        "included_items": ["transfer", "basic urn"],
        "price_available": true
      },
      {
        "name": "Funeraria Madrid - Incineración Completo",
        "price": 1990,
        "currency": "EUR",
        "service_type": "cremation",
        "included_items": ["transfer", "viewing", "urn"],
        "price_available": true
      },
      {
        "name": "Funerarias Reunidas Madrid",
        "price": 4900,
        "currency": "EUR",
        "service_type": "burial",
        "included_items": ["transfer", "coffin", "religious ceremony"],
        "price_available": true
      }
    ],
    "locality": "Madrid",
    "locality_id": 24017,
    "total_results": 5
  },
  "meta": {
    "version": "1.0",
    "timestamp": "2026-03-21T10:00:00Z",
    "source": "funos-api",
    "source_ai": "chatgpt"
  },
  "cta": {
    "text": "No-commitment consultation at Funos",
    "url": "https://funos.es/servicios-funerarios/?utm_source=ai&utm_medium=api&utm_campaign=funeral-service&utm_content=chatgpt"
  },
  "error": null
}

Possible errors

CodeErrorDescription
400MISSING_LOCALITYThe locality_id parameter is required
400INVALID_LOCALITYThe locality_id does not exist in the database
404NO_SERVICES_FOUNDNo services available in that locality
401UNAUTHORIZEDInvalid or missing API Key
429RATE_LIMIT_EXCEEDED100 requests/hour limit exceeded
400 Response — locality_id missing
{
  "data": null,
  "error": {
    "code": "MISSING_LOCALITY",
    "message": "The locality_id parameter is required."
  }
}

Important notes

Geographic coverage expanding. Services are currently available in major cities. If locality_id=21088 (Barcelona) returns 0 results, coverage is in the process of expanding in that area.
  • Prices are real and updated directly from Funos’s database.
  • The price_available: false field indicates services in the catalog without a confirmed price — not returned by default.
  • The CTA includes pre-configured UTMs with the source_ai value from the request for full traceability in Google Analytics / HubSpot.

GPT Action description

If using GPT Actions, this is the optimized description for this endpoint:
Gets an immediate funeral service (at-need) quote by Spanish locality.
Use when the user asks about the price of a burial, cremation, funeral service,
or funeral cost in a Spanish city. Requires locality_id (Madrid=24017).