{"uid":"cap_P6mzR0XvIZf-iXAwaOhZ_","slug":"spain-pvpc-electricity-price-api-3a4aac68","name":"Spain PVPC Electricity Price API","description":"Pay-per-call Spain utilities for AI agents over x402 (USDC). No accounts, no API keys. Public open data and offline computation only; nothing is stored.","url":"https://spain-agent-toolkit.spain-agent-toolkit.workers.dev/v1/es/electricity/pvpc?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"day":{"type":"string","description":"today (default) or tomorrow. Tomorrow is published around 20:15-20:30 Madrid time."},"cheapest":{"type":"integer","description":"How many cheapest hours to return (1-12, default 3)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"date":"2026-10-22","unit":"EUR/kWh","cheapest":[{"hour":14,"period":"llano","eurPerKWh":0.01314}],"averageEurPerKWh":0.20774,"cheapestWindow3h":{"startHour":14,"avgEurPerKWh":0.01349}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cnNeK93wQngeSDqeJXeNk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns Spain's regulated PVPC electricity prices for today or tomorrow, including cheapest hours and cheapest 3-hour window.","exampleAgentPrompt":"What are the 5 cheapest electricity hours in Spain tomorrow according to the PVPC tariff?","exampleUseCases":[{"title":"Schedule home appliance during cheapest hours","prompt":"When are the 4 cheapest electricity hours in Spain today? I want to know the best time to run my washing machine."},{"title":"Check tomorrow's electricity price forecast","prompt":"Can you get tomorrow's PVPC electricity prices for Spain and tell me the cheapest 3-hour window to run high-consumption devices?"},{"title":"Daily energy cost monitoring","prompt":"What is the average PVPC electricity price in Spain today, and which hours are the cheapest?"}],"resultDescription":"Returns a JSON object with the date, price unit (EUR/kWh), a list of the N cheapest hours with their time-of-use period and price, the daily average price, and the cheapest consecutive 3-hour window with its start hour and average price.","failureModes":["Tomorrow's prices not yet published (available after ~20:15-20:30 Madrid time) — may return error or empty data","Invalid 'day' parameter value — only 'today' or 'tomorrow' accepted","Invalid 'cheapest' value outside 1-12 range","Upstream REE data unavailable or delayed — service may return stale or error response","Payment failure via x402 protocol — request rejected before data is returned"],"whenToPreferThis":"Use this endpoint when you need Spain-specific regulated PVPC electricity hourly pricing without requiring an account or API key. Ideal for energy optimization agents, smart home automation, or any workflow that needs to schedule tasks during cheap electricity windows in Spain. Prefer this over generic energy APIs when you need the official Spanish regulated tariff (PVPC) specifically, with pay-per-call USDC micropayment and no subscription required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T00:32:44.435Z","isFirstParty":false,"canonicalSlug":"spain-pvpc-electricity-price-api-3a4aac68"}