{"uid":"cap_uGILLsWGWcU4YxVZjDL8P","slug":"spain-pvpc-electricity-price-api-5c387f55","name":"Spain PVPC Electricity Price API","description":"Hourly regulated electricity price in Spain (PVPC 2.0TD, mainland) for today, tomorrow (published ~20:30) or any date: every hour in EUR/kWh, daily average, cheapest and most expensive hours and best 3-hour window. Red Electrica de Espana data.","url":"https://api.vextorium.com/precio-luz-espana-pago?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":[],"properties":{"fecha":{"type":"string","description":"YYYY-MM-DD, hoy or mañana (default today)"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":["object","null"],"properties":{"nota":{"type":["string","null"]},"zona":{"type":["string","null"]},"fecha":{"type":["string","null"]},"horas":{"type":["array","null"],"items":{"type":["null","object"],"properties":{"hora":{"type":["null","string"]},"eur_kwh":{"type":["null","number"]},"eur_mwh":{"type":["null","number"]}}}},"mas_caras":{"type":["array","null"],"items":{"type":["null","object"],"properties":{"hora":{"type":["null","string"]},"eur_kwh":{"type":["null","number"]},"eur_mwh":{"type":["null","number"]}}}},"mas_baratas":{"type":["array","null"],"items":{"type":["null","object"],"properties":{"hora":{"type":["null","string"]},"eur_kwh":{"type":["null","number"]},"eur_mwh":{"type":["null","number"]}}}},"media_eur_kwh":{"type":["number","null"]},"mejor_franja_3h":{"type":["object","null"],"properties":{"desde":{"type":["string","null"]},"media_eur_kwh":{"type":["number","null"]}}}}}}}}},"responseSchema":{"type":"json","example":{"nota":"Término de energía del PVPC con peajes y cargos, sin impuestos. Fuente: Red Eléctrica de España (REE).","zona":"Península","fecha":"2026-10-02","horas":[{"hora":"00:00","eur_kwh":0.1609,"eur_mwh":160.9},{"hora":"01:00","eur_kwh":0.14965,"eur_mwh":149.65},{"hora":"02:00","eur_kwh":0.14555,"eur_mwh":145.55},{"hora":"03:00","eur_kwh":0.1453,"eur_mwh":145.3},{"hora":"04:00","eur_kwh":0.15241,"eur_mwh":152.41},{"hora":"05:00","eur_kwh":0.17789,"eur_mwh":177.89},{"hora":"06:00","eur_kwh":0.2226,"eur_mwh":222.6},{"hora":"07:00","eur_kwh":0.27434,"eur_mwh":274.34},{"hora":"08:00","eur_kwh":0.3229,"eur_mwh":322.9},{"hora":"09:00","eur_kwh":0.24509,"eur_mwh":245.09},{"hora":"10:00","eur_kwh":0.24068,"eur_mwh":240.68},{"hora":"11:00","eur_kwh":0.204,"eur_mwh":204},{"hora":"12:00","eur_kwh":0.20125,"eur_mwh":201.25},{"hora":"13:00","eur_kwh":0.19891,"eur_mwh":198.91},{"hora":"14:00","eur_kwh":0.1297,"eur_mwh":129.7},{"hora":"15:00","eur_kwh":0.13736,"eur_mwh":137.36},{"hora":"16:00","eur_kwh":0.14452,"eur_mwh":144.52},{"hora":"17:00","eur_kwh":0.16911,"eur_mwh":169.11},{"hora":"18:00","eur_kwh":0.31029,"eur_mwh":310.29},{"hora":"19:00","eur_kwh":0.35435,"eur_mwh":354.35},{"hora":"20:00","eur_kwh":0.37978,"eur_mwh":379.78},{"hora":"21:00","eur_kwh":0.34402,"eur_mwh":344.02},{"hora":"22:00","eur_kwh":0.2559,"eur_mwh":255.9},{"hora":"23:00","eur_kwh":0.22908,"eur_mwh":229.08}],"mas_caras":[{"hora":"20:00","eur_kwh":0.37978,"eur_mwh":379.78},{"hora":"19:00","eur_kwh":0.35435,"eur_mwh":354.35},{"hora":"21:00","eur_kwh":0.34402,"eur_mwh":344.02}],"mas_baratas":[{"hora":"14:00","eur_kwh":0.1297,"eur_mwh":129.7},{"hora":"15:00","eur_kwh":0.13736,"eur_mwh":137.36},{"hora":"16:00","eur_kwh":0.14452,"eur_mwh":144.52}],"media_eur_kwh":0.22065,"mejor_franja_3h":{"desde":"14:00","media_eur_kwh":0.13719}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1Tm-WBKannGXPyHY-Mcm2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns hourly PVPC 2.0TD regulated electricity prices for mainland Spain for any date, including daily average, cheapest/most expensive hours, and best 3-hour window.","exampleAgentPrompt":"What are the electricity prices in Spain for tomorrow? Give me the cheapest hours, the most expensive ones, and the best 3-hour window to run heavy appliances.","exampleUseCases":[{"title":"Schedule EV charging during cheap hours","prompt":"I want to charge my electric car overnight in Spain — what are the cheapest hours for electricity tomorrow so I can set my charger timer?"},{"title":"Avoid peak electricity costs today","prompt":"Can you tell me the most expensive hours for electricity in Spain today so I know when NOT to use my washing machine or oven?"},{"title":"Historical electricity price lookup","prompt":"What were the electricity prices in Spain on 2025-03-15? I want to see the full hourly breakdown and the daily average."}],"resultDescription":"A JSON object containing: the geographic zone (Península), the queried date, a 24-entry array of hourly prices in both EUR/kWh and EUR/MWh, an array of the most expensive hours, an array of the cheapest hours, the daily average price in EUR/kWh, and the best consecutive 3-hour window (start time and average price). Also includes a source note referencing REE.","failureModes":["Tomorrow's prices not yet published (REE publishes ~20:30 CET) — returns error or empty data if queried too early","Invalid date format causes request failure","Dates far in the past may not be available","Network or upstream REE data outage may return null values"],"whenToPreferThis":"Use this endpoint when you need official PVPC regulated electricity tariff data for mainland Spain, including optimized scheduling advice (cheapest hours, best 3-hour window). Prefer it over generic energy APIs when you specifically need Spain's regulated market prices from REE, broken down by hour with pre-computed analytics.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T18:45:09.867Z","isFirstParty":false,"canonicalSlug":"spain-pvpc-electricity-price-api-5c387f55"}