> ## Documentation Index
> Fetch the complete documentation index at: https://developers.funos.es/llms.txt
> Use this file to discover all available pages before exploring further.

# Funeral Service Quote

> Get real prices for funeral services (at-need) by Spanish locality. Returns quotes from nearby funeral homes with itemized pricing.

## `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

| Parameter      | Type    | Required | Description                                            |
| -------------- | ------- | -------- | ------------------------------------------------------ |
| `locality_id`  | integer | ✅ Yes    | Spanish locality ID. See reference table below.        |
| `service_type` | string  | No       | `cremation` or `burial`. No value: returns both types. |

### Reference localities

| City      | locality\_id |
| --------- | ------------ |
| Madrid    | `24017`      |
| Barcelona | `21088`      |

<Info>
  Need the `locality_id` for another city? Query the [Knowledge Base](/en/api-reference/knowledge-base) endpoint with `"locality id [city]"`.
</Info>

***

## Request example

```bash cURL theme={null}
curl -X GET \
  "https://qegraxvwwikrltmtfamo.supabase.co/functions/v1/v1-quote-funeral-service?locality_id=24017" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```javascript JavaScript theme={null}
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`)

```json theme={null}
{
  "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

| Code  | Error                 | Description                                      |
| ----- | --------------------- | ------------------------------------------------ |
| `400` | `MISSING_LOCALITY`    | The `locality_id` parameter is required          |
| `400` | `INVALID_LOCALITY`    | The `locality_id` does not exist in the database |
| `404` | `NO_SERVICES_FOUND`   | No services available in that locality           |
| `401` | `UNAUTHORIZED`        | Invalid or missing API Key                       |
| `429` | `RATE_LIMIT_EXCEEDED` | 100 requests/hour limit exceeded                 |

```json 400 Response — locality_id missing theme={null}
{
  "data": null,
  "error": {
    "code": "MISSING_LOCALITY",
    "message": "The locality_id parameter is required."
  }
}
```

***

## Important notes

<Warning>
  **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.
</Warning>

* 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).
```
