Spain Electricity & Gas Tariffs Scraper (CNMC) + PVPC Prices avatar

Spain Electricity & Gas Tariffs Scraper (CNMC) + PVPC Prices

Pricing

from $2.10 / 1,000 ranked offer with estimated bills

Go to Apify Store
Spain Electricity & Gas Tariffs Scraper (CNMC) + PVPC Prices

Spain Electricity & Gas Tariffs Scraper (CNMC) + PVPC Prices

Scrape every electricity and gas tariff in Spain from the official CNMC comparator: prices, bill estimates by postcode, hourly PVPC prices. JSON, CSV, Excel.

Pricing

from $2.10 / 1,000 ranked offer with estimated bills

Rating

0.0

(0)

Developer

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

15 hours ago

Last modified

Features

Limited permissions

Share

⚡ Spain Electricity & Gas Tariffs Scraper (CNMC) + PVPC Prices

Spain Electricity & Gas Tariffs Scraper extracts every electricity, natural gas and dual-fuel tariff in Spain from the official CNMC energy offers comparator (comparador.cnmc.gob.es): prices per period, ranked estimated bills for any postcode and consumption, supplier contact details, hourly PVPC prices and the regulated PVPC bill simulator. No API key, no login, no browser — clean JSON, CSV or Excel in seconds.

What is the Spain Electricity & Gas Tariffs Scraper?

The CNMC (Comisión Nacional de los Mercados y la Competencia) is Spain's energy regulator. Every electricity and gas supplier (comercializadora) must register its offers in the CNMC comparator, which makes it the only neutral, complete source of Spanish energy prices. The website, however, shows one form and one household at a time.

The Spain Electricity & Gas Tariffs Scraper turns the whole comparator into data you can analyse and automate:

  • 📊 Comparator rankings — the same ranking the CNMC shows, for as many profiles as you want: postcode × electricity (2.0TD households, 3.0TD businesses) / gas (RL.1–RL.4) / dual fuel × contracted power × consumption × period.
  • 📚 Full tariff catalogue — all ~350 active offers in Spain with power and energy prices P1–P6, discounts, flexible hours, bundled services, territory and links. Also historical catalogues back to 2021.
  • 🔔 Tariff change feed — delta mode returns only new, changed and withdrawn offers since your last run.
  • ⚡ PVPC hourly prices — the regulated electricity price for every hour, three zones, with or without taxes.
  • 🧾 PVPC bill simulator (Facturaluz) — line-by-line regulated bill with the CNMC's explanation of each amount, social bonus (bono social) and "what if I contract another power".
  • 📈 Your real consumption — upload the hourly CSV from your distributor and rankings use your real consumption per period.
  • 📄 Official reports — save the CNMC PDF and Excel report of each ranking and the PDF sheet of each offer.

What data does the Spain Electricity & Gas Tariffs Scraper extract?

Each row has a record_type, and the dataset has a table view for each one.

DataMain fields
🏆 Ranked offers (comparison)rank, offer, supplier, estimated bill 1st / 2nd year (VAT incl.), savings vs regulated PVPC / TUR, price type, green energy, permanence and penalty, additional services, bill breakdown (power, energy, electricity tax, meter, VAT), customer-service phone / e-mail / web, validity, conditions
📚 Catalogue offers (offer)offer, supplier, type, plan (fixed / indexed / flexible), power €/kW·year and energy €/kWh P1–P6, discounts, power and consumption limits, gas toll band, eligibility, provinces, sales channels, links, change type and changed fields
⚡ PVPC day (pvpc_price)date, zone, 24 hourly prices €/kWh, average, min, max, cheapest and most expensive hour, last-7-days average
🧾 PVPC bill (pvpc_bill)fixed and variable term, social bonus discount, electricity tax, meter rental, VAT, total, explanation of each line, daily consumption and cost (smart meter), alternative powers
🧮 Regulated parameters (parameter)tolls, charges, taxes, meter rental, social bonus discounts with validity dates
🗺️ Reference (province, consumption_profile)provinces and postcode prefixes, CNMC consumption profiles

How to use the Spain Electricity & Gas Tariffs Scraper

  1. Click Try for free and keep the pre-filled input: the 10 cheapest electricity offers for a Madrid household (3.45 kW, 2,600 kWh/year) and today's PVPC prices.
  2. Answer three questions in plain words: what you want (cheapest offers, all tariffs, hourly PVPC price, check a bill), your postcode, and which home or business looks like yours (small flat, average home, home with electric heating or EV, shop, medium business…). No energy knowledge needed: typical power and consumption are filled in for you.
  3. Optional: type your real contracted power and yearly consumption from your bill, say when you use most electricity (normal, nights and weekends, daytime), or paste your distributor's hourly consumption file for the most accurate result.
  4. Click Start. A typical run takes 10–60 seconds.
  5. Download the results as JSON, CSV, Excel or HTML, or connect them to Google Sheets, Make, Zapier or the Apify API.
  6. To be alerted of tariff changes, answer Yes to "Only show what changed since my last run?" and add a daily schedule.

Input parameters

FieldDescription
datasetscomparison, offers_catalog, pvpc_prices, pvpc_bill, regulated_parameters, reference_data
supplyTypes, postalCodeselectricity, gas, combined × Spanish postcodes (one ranking per combination)
consumerProfile, gasUse, usagePatternPlain-language presets: small_home, average_home, large_home, all_electric_home, small_business, medium_business; gas for hot water / flat / house / large house; normal, nights & weekends or daytime use. Any number you type overrides the preset
contractedPowerKw, contractedPowerValleKw, contractedPowersKwContracted power; six powers P1–P6 for 3.0TD
annualElectricityKwh, electricityConsumptionSplitPct, annualGasKwhConsumption and optional split by period
consumptionCurveUrl / consumptionCurveCsvYour hourly consumption CSV (distributor format)
periodStart, periodEndPeriod to simulate (default: last 365 days)
household, excludeAdditionalServices, excludePermanence, priceTypes, greenEnergyOnly, companiesComparator filters
includeOfferDetails, maxOffersPerScenario, saveRankingReports, saveOfferPdfsDetail level and official reports
scenariosCustom list of profiles (any field above per scenario, up to 300)
mode, catalogOfferTypes, catalogDate, catalogDates, stateKeyCatalogue: snapshot, delta, history
pvpcDateFrom, pvpcDateTo, pvpcZones, pvpcTaxesPVPC prices
billPeriodStart … billSimulatePowersKw, socialBonusPVPC bill simulation
maxItemsRow limit and spending cap
{
"datasets": ["comparison"],
"scenarios": [
{ "id": "flat-madrid", "supply": "electricity", "postalCode": "28013", "contractedPowerKw": 4.6, "annualElectricityKwh": 3500 },
{ "id": "house-sevilla", "supply": "combined", "postalCode": "41001", "annualElectricityKwh": 4000, "annualGasKwh": 9000 },
{ "id": "shop-valencia", "supply": "electricity", "postalCode": "46001", "contractedPowersKw": [20, 20, 20, 20, 20, 25], "annualElectricityKwh": 45000, "household": false }
],
"maxOffersPerScenario": 20
}

Output example

A real comparison row (shortened):

{
"record_type": "comparison",
"scenario_id": "s001-electricity-28001",
"supply_type": "electricity", "postal_code": "28001", "province": "Madrid", "access_tariff": "2.0TD",
"contracted_power_kw": [3.45, 3.45], "period_start": "2025-11-20", "period_end": "2026-11-20",
"electricity_kwh_period": 2600, "electricity_kwh_by_period": [745, 639, 1216],
"rank": 1, "results_in_scenario": 72,
"offer_id": 7212, "offer_name": "Tarifa Fácil Plus 36 Meses", "company": "ENI PLENITUDE IBERIA, S.L.",
"offer_kind": "market_offer", "price_type": "single_price", "is_regulated": false,
"estimated_cost_first_year_eur": 669.71, "estimated_cost_second_year_eur": 669.71,
"savings_vs_regulated_eur": 3.0, "green_energy": true, "has_permanence_penalty": false,
"customer_service_phone": "900 373 763", "customer_service_email": "clientes@eniplenitude.es",
"bill_first_year_electricity_lines": [
{ "concept": "Término de potencia", "amount_eur": 283.33 },
{ "concept": "Consumo electricidad", "amount_eur": 233.98 },
{ "concept": "Impuesto sobre electricidad 5,11269632%", "amount_eur": 26.45 },
{ "concept": "Equipo de medida", "amount_eur": 9.72 }
],
"validity_period": "Oferta válida desde 01-nov-2026 hasta 15-dic-2026",
"source": "CNMC - Comparador de Ofertas de Energía (comparador.cnmc.gob.es)",
"license": "CC BY-SA 4.0 — información recabada y gestionada por la CNMC en el Comparador de Ofertas de Energía"
}

A pvpc_price row has date, zone, taxes_included, avg_price_eur_kwh, cheapest_hour, h00 … h23 and hourly_prices. A pvpc_bill row has the bill lines with the CNMC explanation, for example "P1 (Punta): 3,45 kW x 27,704413 €/kW/año x 30 días / 365 días = 7,86 €".

💰 How much does it cost to scrape Spanish electricity and gas tariffs?

The Spain Electricity & Gas Tariffs Scraper uses pay-per-event pricing: you pay per row, and the price depends on the row type. Prices below are for the Starter plan (Bronze). Free-plan users pay 15% more, and Scale and Business plans get 15–30% off.

EventPrice
Ranked offer with estimated bill$0.003
Catalogue offer$0.001
Catalogue change (delta mode)$0.003
PVPC prices for one day$0.002
PVPC bill simulation$0.01
Regulated parameter / reference row$0.0005
Actor start$0.01 per run

What typical runs cost:

  • Top 10 offers for one household: about $0.04.
  • Full catalogue of ~350 offers: about $0.36. In delta mode, later runs charge only offers that changed; unchanged offers are free.
  • One year of PVPC hourly prices: about $0.74.
  • 50 postcodes × 3 supply types, top 20 offers each: about $9.

With the $5 free credit you can get roughly 1,400 ranked offers. Use Max rows as a spending cap.

FAQ

Is it legal to scrape the CNMC comparator? Yes. The CNMC publishes this data openly under CC BY-SA 4.0. If you republish it, mention that it is "información recabada y gestionada por la CNMC en el Comparador de Ofertas de Energía"; every row carries source and license for that. The Actor makes polite requests to public endpoints only. It is not affiliated with the CNMC.

Do I need a CNMC API key? No. The Spain Electricity & Gas Tariffs Scraper works without an account, key or proxy.

Who uses it? Energy comparison sites and switching services, suppliers' pricing teams (competitive intelligence), energy brokers and consultants quoting SMEs, analysts and journalists tracking fixed vs indexed prices, smart-home and EV-charging apps scheduling consumption by PVPC price, and social services simulating bills with bono social.

How accurate are the estimated bills? They are the CNMC's own calculation for the consumption and period you give, taxes included. The second-year figure also comes from the CNMC; for some offers whose price period lasts 12 months it can be incomplete.

Can I compare offers for a business above 15 kW? Yes. Set contractedPowerKw above 15 or give six powers in contractedPowersKw, and the CNMC switches to the 3.0TD tariff.

Is my consumption file safe? The CSV is sent only to the CNMC to calculate the ranking and the bill. The CUPS (supply point ID) never appears in the output.

Why do some catalogue offers have no supplier? The public catalogue has no supplier field. The Actor fills it by matching offer names with comparator rankings and web domains (about 80% of offers). Offers the CNMC never shows in a ranking keep company: null and company_domain.

What is not available? "Entiende tu factura", comparison from a bill QR code and the flexible-offers CSV need the QR token of a real bill. The gas-cap adjustment calculator and the toll-only bill have been switched off by the CNMC.

Something is missing or broken? Open an issue in the Issues tab and we will reply quickly.


🇪🇸 Versión en español

Resumen en español del README anterior.

¿Qué es el Spain Electricity & Gas Tariffs Scraper?

Es un scraper del Comparador de Ofertas de Energía de la CNMC que te da en un solo dataset todas las tarifas de luz y gas de España: el ranking de ofertas con la factura estimada para cualquier código postal, potencia y consumo, el catálogo completo de ofertas con sus precios por periodo, los precios PVPC hora a hora y el simulador de factura PVPC (Facturaluz). Sin API key ni registro.

¿Qué datos extrae?

DatoCampos
Ranking de ofertasposición, oferta, comercializadora, factura estimada 1er y 2º año, ahorro frente a PVPC/TUR, energía verde, permanencia, desglose de la factura, teléfono y e-mail de atención al cliente
Catálogo de ofertasprecios de potencia y energía P1–P6, descuentos, horas flexibles, servicios, provincias, enlaces; altas, cambios y bajas en modo delta
PVPC24 precios horarios por día y zona, media, mínimo, máximo, hora más barata
Factura PVPCtérmino fijo y variable, bono social, impuesto eléctrico, contador, IVA, total y explicación de cada línea
Parámetros reguladospeajes, cargos, impuestos, alquiler del contador, descuentos del bono social

¿Cómo se usa?

  1. Deja el input precargado (hogar en Madrid, 3,45 kW, 2.600 kWh/año) y pulsa Start.
  2. Elige luz, gas o ambos, tu código postal y el perfil que más se parezca a ti (piso pequeño, hogar medio, casa con calefacción eléctrica o coche eléctrico, tienda, negocio mediano…). No hace falta saber de energía: potencia y consumo se rellenan solos, y si los conoces (están en tu factura) puedes escribirlos.
  3. Si tienes el CSV horario de tu distribuidora, pégalo o pon su URL para comparar con tu consumo real.
  4. Para seguir los cambios de tarifas, activa el modo Delta y prográmalo a diario.
  5. Descarga los resultados en JSON, CSV o Excel.

¿Cuánto cuesta?

Pago por evento: 0,003 $ por oferta del ranking, 0,001 $ por oferta del catálogo, 0,003 $ por cambio detectado, 0,002 $ por día de PVPC, 0,01 $ por simulación de factura y 0,01 $ por ejecución. Las 10 mejores ofertas para un hogar cuestan unos 0,04 $ y el catálogo completo unos 0,36 $. En modo delta solo pagas las ofertas que han cambiado.