Sagradafamilia APIsagradafamilia.org ↗
Get real-time ticket products, day-by-day availability calendars, and entry time slots with remaining capacity and per-buyer-type prices from sagradafamilia.org.
What is the Sagradafamilia API?
The Sagrada Família API exposes 3 endpoints covering the official ticket shop's full individual-visit inventory: products listing with base EUR prices, a monthly availability calendar by product and venue, and per-date entry time slots with remaining ticket counts via list_time_slots. All three endpoints return structured JSON tied to real product IDs and bookable venues, making it straightforward to query what's on sale, when space is available, and at what price for each buyer type.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/2570e70a-566f-4541-933d-9ea7f1fd3874/list_ticket_products' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace sagradafamilia-org-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Sagrada Família Tickets — list products, check availability, browse time slots."""
from parse_apis.sagradafamilia_org_api import SagradaFamilia, InputNotFound
client = SagradaFamilia()
# List all ticket products and show names with base prices.
for product in client.products.list(limit=10):
print(product.name, f"€{product.base_price}", product.status)
for venue in product.venues:
print(f" Venue: {venue.name} (€{venue.base_price})")
# Pick the first product and check its monthly availability calendar.
product = client.products.list(limit=1).first()
if product is not None:
try:
avail = product.availability(year=2026, month=10)
except InputNotFound:
print("Product not found on the shop")
else:
print(f"{avail.venue_name}: {avail.available_days}/{avail.total_days} days available")
for day in avail.days:
if day.available:
print(f" {day.date} — {day.status}")
# Get entry time slots and ticket prices for a specific date.
schedule = product.time_slots(date="2026-10-28")
print(f"{schedule.venue_name} on {schedule.date}: {schedule.total_slots} slots, "
f"{schedule.total_available_tickets} tickets left")
for slot in schedule.time_slots:
if not slot.sold_out:
print(f" {slot.start_time} — {slot.available_tickets} tickets (capacity {slot.capacity})")
for price in (schedule.ticket_prices or []):
print(f" {price.name}: €{price.price}")
print("exercised: products.list / product.availability / product.time_slots")
Lists the individual-visit ticket products currently sold on the official ticket shop (e.g. basic visit, guided tour, towers). One row per product with its base price in EUR, descriptions, calendar range and the bookable venues (sub-parts such as the Basilica or the Towers) each with a venue_id. Products are returned in one call (a handful of products; one extra lookup per product for venue details). product_id and venues[*].venue_id feed get_ticket_availability and list_time_slots.
No input parameters required.
{
"type": "object",
"fields": {
"total": "integer count of products",
"currency": "ISO currency code of all prices (EUR)",
"products": "array of ticket products; each has product_id (integer), name, short_name, slug, base_price (number, EUR), status, short_description, description (plain text), image URL, calendar_start/calendar_end (site datetime strings or null), needs_captcha (boolean), shop_url, and venues (array of {venue_id, name, base_price, display_order, has_limited_capacity})",
"sales_group": "string, always 'individual' (the public individual-visit sales channel)"
},
"sample": {
"data": {
"total": 4,
"currency": "EUR",
"products": [
{
"name": "Sagrada Familia",
"slug": "sagrada-familia",
"image": "https://cdn.clorian.com/img/clients/SagradaFamilia/whatsapp_image_2024-09-26_at_18.25.17.jpeg",
"status": "enabled",
"venues": [
{
"name": "Sagrada Família",
"venue_id": 1,
"base_price": 26,
"display_order": 0,
"has_limited_capacity": true
}
],
"currency": "EUR",
"shop_url": "https://tickets.sagradafamilia.org/en/1-individual/4375-sagrada-familia",
"base_price": 26,
"product_id": 4375,
"short_name": "Sagrada Familia",
"description": "Visiting the Basilica and museum for as long as you like (doesn’t include the towers or crypt). An audioguide you have to download using the official Sagrada Família app.",
"calendar_end": "2026-12-31 23:59:00",
"needs_captcha": true,
"calendar_start": "2022-01-01 00:00:00",
"short_description": "Visiting the Basilica and museum for as long as you like (doesn’t include the towers or crypt)."
},
{
"name": "Sagrada Família with Towers",
"slug": "sagrada-familia-with-towers",
"image": "https://cdn.clorian.com/img/clients/SagradaFamilia/whatsapp_image_2024-09-30_at_12.12.16.jpeg",
"status": "enabled",
"venues": [
{
"name": "Sagrada Família",
"venue_id": 1,
"base_price": 26,
"display_order": 0,
"has_limited_capacity": true
},
{
"name": "Towers",
"venue_id": 3,
"base_price": 10,
"display_order": 1,
"has_limited_capacity": true
}
],
"currency": "EUR",
"shop_url": "https://tickets.sagradafamilia.org/en/1-individual/4443-sagrada-familia-with-towers",
"base_price": 36,
"product_id": 4443,
"short_name": "Sagrada Família amb Torres",
"description": "An audioguide you have to download using the official Sagrada Família app. ... Visit to one of the towers",
"calendar_end": null,
"needs_captcha": true,
"calendar_start": null,
"short_description": "Discover the beauty of the Sagrada Família ... Get privileged views of Barcelona from one of the Basilica’s towers."
}
],
"sales_group": "individual"
},
"status": "success"
}
}About the Sagradafamilia API
Ticket Products
The list_ticket_products endpoint returns every individual-visit product currently sold on the official Sagrada Família ticket shop — basic visits, guided tours, tower access, and similar offerings. Each product record includes a product_id, name, short_name, slug, base_price in EUR, a status, and a venues array listing the bookable sub-parts of the monument (such as the Basilica or the Towers) with their own venue_id values. The sales_group field is always individual, confirming this covers only the public individual-visit channel. No group bookings or private events are included.
Monthly Availability Calendar
get_ticket_availability accepts a product_id (required) plus optional year, month (1–12), and venue_id parameters. It returns a days array sorted by date, where each entry carries a date (YYYY-MM-DD), a status of either 'availability' or 'no-availability', and a boolean available flag. The response also surfaces available_days and total_days counts so you can quickly assess how many open dates remain in a month without iterating the full array. Days the shop does not report at all — for example, dates outside the bookable window — are not included in the array.
Entry Time Slots and Pricing
list_time_slots takes a product_id (required) and optional date (YYYY-MM-DD), venue_id, and returns a time_slots array where each slot carries event_id, start_datetime and end_datetime (ISO 8601 with Europe/Madrid offset), a start_time (HH:MM), capacity, and available_tickets. The ticket_prices array on the same response breaks down prices per buyer_type — General, Student, Senior, Under 30, children, disability categories, and others — each with price in EUR and optional min_tickets / max_tickets bounds. When a date has no availability, time_slots is empty and total_available_tickets is zero. All datetime values use the Europe/Madrid timezone.
The Sagradafamilia API is a managed, monitored endpoint for sagradafamilia.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when sagradafamilia.org changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official sagradafamilia.org API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a ticket availability alert that notifies users when a sold-out date reopens, using
get_ticket_availabilitypolling. - Display a live price comparison across buyer types (General, Student, Senior, Under 30) for a chosen visit date via
ticket_pricesfromlist_time_slots. - Power a visit-planning tool that surfaces which months have the most available days using
available_daysfrom the availability calendar. - Aggregate remaining capacity across all time slots on a given date using
total_available_ticketsandtime_slots[*].available_tickets. - Build a multi-venue selector UI by pulling all bookable venues and their
venue_idvalues fromlist_ticket_productsbefore querying slots. - Track base price changes over time per product by periodically recording
base_pricefromlist_ticket_products.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does the Sagrada Família have an official public developer API?+
What does `list_time_slots` return when a date is fully sold out?+
time_slots array is empty and total_available_tickets is 0. The ticket_prices array may still be populated with the price schedule valid for that date, so you can show pricing information even when no slots are bookable.Does the availability calendar cover multiple months in a single call?+
get_ticket_availability returns data for one calendar month per call, identified by the year and month parameters. To cover a date range spanning multiple months you need one call per month. You can fork this API on Parse and revise it to add a multi-month aggregation endpoint.Does the API cover group bookings, school visits, or private event tickets?+
sales_group: 'individual' field on list_ticket_products. Group or institutional booking products are not included. You can fork the API on Parse and revise it to add an endpoint targeting those product types if they appear in the ticket shop.How specific is the venue filtering, and what happens if I omit `venue_id`?+
get_ticket_availability and list_time_slots accept an optional venue_id drawn from list_ticket_products.products[*].venues[*].venue_id. When omitted, the API queries the product's default venue and echoes the venue_id and venue_name actually used in the response, so you always know which sub-part of the monument the results refer to.