Renfe Scraper - Spanish Train Tickets & Prices
Pricing
from $1.20 / 1,000 result scrapeds
Renfe Scraper - Spanish Train Tickets & Prices
Scrape train schedules, prices, and availability from Renfe (renfe.com), Spain's national railway. Search AVE high-speed, Alvia, Media Distancia, and Cercanias routes. No login or cookies needed.
Pricing
from $1.20 / 1,000 result scrapeds
Rating
0.0
(0)
Developer
Studio Amba
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 days ago
Last modified
Categories
Share
Renfe Scraper
Scrape train schedules, prices, and availability from Renfe, Spain's national railway operator. Extract data for AVE high-speed, Alvia, AVLO low-cost, Media Distancia, and regional train services. No login or cookies required.
How to scrape Renfe data
Renfe is Spain's national railway company, operating over 5,000 trains daily across the country. This scraper extracts structured train connection data including departure/arrival times, prices, train types, and seat classes directly from the Renfe website.
Use this actor to:
- Monitor train prices across routes and dates
- Compare fare classes (Turista, Turista Plus, Preferente)
- Track AVE high-speed availability between major Spanish cities
- Build travel datasets for research, analytics, or price comparison tools
- Automate price alerts by scheduling regular runs
Why use this actor?
- No login, no cookies, no API key needed — works out of the box
- All train types covered — AVE, AVLO, Alvia, Altaria, Euromed, Media Distancia, Regional, Cercanias
- Structured JSON output — clean, machine-readable data ready for analysis
- Runs on Apify platform — scheduling, API access, webhooks, and integrations included
- Proxy rotation — residential proxies for reliable access without blocking
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
origin | String | No | Madrid | Departure city or station name |
destination | String | No | Barcelona | Arrival city or station name |
departureDate | String | No | Tomorrow+2 | Travel date in YYYY-MM-DD format |
maxResults | Integer | No | 50 | Maximum number of connections to return |
proxyConfiguration | Object | No | Residential ES | Proxy settings for reliability |
Example input
{"origin": "Madrid","destination": "Barcelona","departureDate": "2026-07-15","maxResults": 30,"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"],"apifyProxyCountry": "ES"}}
Popular routes to try
- Madrid to Barcelona (AVE high-speed, ~2.5h)
- Madrid to Sevilla (AVE, ~2.5h)
- Madrid to Valencia (AVE, ~1.5h)
- Barcelona to Valencia (Euromed/AVE, ~3h)
- Madrid to Malaga (AVE, ~2.5h)
- Madrid to Zaragoza (AVE, ~1.25h)
Output
Each result contains:
| Field | Type | Example |
|---|---|---|
origin | String | "Madrid" |
destination | String | "Barcelona" |
departureTime | String | "08:00" |
arrivalTime | String | "10:30" |
duration | String | "2h 30min" |
trainType | String | "AVE" |
trainNumber | String | "03091" |
price | Number | 35.50 |
currency | String | "EUR" |
seatClass | String | "Turista" |
carrier | String | "Renfe" |
url | String | Link to search results |
scrapedAt | String | ISO 8601 timestamp |
You can download the dataset in various formats such as JSON, HTML, CSV, or Excel from the Output tab.
Example output
{"origin": "Madrid","destination": "Barcelona","departureTime": "08:00","arrivalTime": "10:30","duration": "2h 30min","trainType": "AVE","trainNumber": "03091","price": 35.50,"currency": "EUR","seatClass": "Turista","carrier": "Renfe","url": "https://www.renfe.com/es/en","scrapedAt": "2026-06-09T14:30:00.000Z"}
How much does it cost to scrape Renfe?
This actor is a lightweight HTTP scraper (no browser), so it runs fast and cheap. It costs $0.02 per run plus $0.002 per result, regardless of proxy type.
| Use case | Estimated cost |
|---|---|
| Single route search (50 trains) | ~$0.12 |
| Daily monitoring of 10 routes (50 trains each) | ~$1.20/day |
| Weekly price comparison (50 routes) | ~$0.50-1.00/week |
Costs may vary based on proxy usage and actor execution time.
Tips
- Use Spanish proxy — Set
apifyProxyCountrytoESfor best results. Renfe may show different availability to non-Spanish IPs. - Book dates in advance — Renfe releases tickets 60-90 days ahead. Searching too far in the future may return no results.
- Schedule runs — Set up daily or weekly runs to track price changes over time.
- Empty results? — Check the debug screenshot saved in the key-value store. Renfe's website changes frequently.
- AVLO low-cost — Renfe's low-cost AVE service (AVLO) has limited availability and may not show on all routes.
Renfe train types
| Type | Service | Speed |
|---|---|---|
| AVE | High-speed long distance | Up to 310 km/h |
| AVLO | Low-cost high-speed | Up to 310 km/h |
| Alvia | Long distance (variable gauge) | Up to 250 km/h |
| Euromed | Mediterranean corridor | Up to 220 km/h |
| Altaria | Long distance diesel | Up to 200 km/h |
| Media Distancia | Medium distance regional | Up to 160 km/h |
| Regional | Short distance | Up to 120 km/h |
| Cercanias | Suburban commuter | Up to 100 km/h |
Limitations
- Renfe's website uses heavy JavaScript rendering and may change its structure without notice
- Prices shown are indicative and may differ from final booking prices
- Some connections may not be available for online booking
- The scraper searches one route per run; use multiple runs for multiple routes
- Results depend on Renfe's website availability and may occasionally return fewer results
FAQ
Is scraping Renfe legal? This actor extracts publicly available information from Renfe's website. Always review and comply with Renfe's Terms of Service before use.
Why are there no results? Renfe's website is heavily JavaScript-based and may block automated access. Try using residential proxies with a Spanish IP. Check the debug screenshot in the key-value store for more information.
Can I search return trips? Currently the actor searches one-way connections. Run the actor twice with swapped origin/destination for return trips.
How often should I run it? For price monitoring, daily runs are recommended. Renfe prices change frequently, especially for popular routes like Madrid-Barcelona.
Support
Found a bug or need a custom solution? Open an issue in the Issues tab or contact us directly.