# Spain Agent Toolkit Pay-per-call utilities about Spain and the EU for AI agents. Payment: x402, USDC on eip155:8453. No signup or API key. You are only charged when the response is HTTP 200. ## GET https://es.redtapeapi.com/v1/es/electricity/pvpc ($0.002) Spain's regulated household electricity price (PVPC, peninsula) for today or tomorrow, hour by hour, with the cheapest hours and the cheapest 2h/3h windows. Use when an agent must schedule appliances/EV charging or answer 'when is electricity cheapest in Spain today/tomorrow'. Data: Preciluz (preciluz.com, CC-BY-4.0) from REE/ESIOS. Params: day, cheapest ## GET https://es.redtapeapi.com/v1/es/boe/search ($0.002) Search the daily summary of Spain's Official State Gazette (BOE) for a date by keywords and section: new laws, royal decrees, orders, grants, tenders (section 5A), public-exam calls (2B). Returns titles, issuing body and official PDF/HTML links. Use to monitor Spanish regulation or tenders. Source: BOE open data API. Params: date, q, sections, limit ## GET https://es.redtapeapi.com/v1/es/business-days ($0.002) Count Spanish business days between two dates (inclusive), excluding weekends and national plus regional public holidays. Use for legal/administrative deadlines, delivery estimates or payroll in Spain. Params: from*, to*, region ## GET https://es.redtapeapi.com/v1/es/holidays ($0.002) Spanish public holidays for a year: national ones plus those of a region (comunidad autónoma) if given. Computed offline from the date-holidays dataset (CC-BY-3.0); local (municipal) holidays are not included. Params: year*, region ## GET https://es.redtapeapi.com/v1/es/tax-id/validate ($0.002) Validate a Spanish tax ID (DNI/NIF, NIE or company CIF) by format and control character, offline. Does not look the ID up anywhere and stores nothing. Use before issuing invoices or onboarding Spanish customers. Params: id* ## GET https://es.redtapeapi.com/v1/iban/validate ($0.002) Validate an IBAN (length per country + mod-97 checksum; for Spain also the national DC check digits) offline. Stores nothing. Use before SEPA payments or invoices. Params: iban* ## GET https://es.redtapeapi.com/v1/eu/vat/validate ($0.003) Validate an EU VAT number live against the European Commission's VIES service (all EU member states plus XI, Northern Ireland), after an offline format check. Returns valid/invalid plus the registered name and address when the member state discloses them. If VIES is down for that country you get HTTP 503 and are not charged. Use before zero-rating an intra-EU invoice or onboarding an EU business customer. Countries: AT,BE,BG,CY,CZ,DE,DK,EE,EL,ES,FI,FR,HR,HU,IE,IT,LT,LU,LV,MT,NL,PL,PT,RO,SE,SI,SK,XI. Params: vat*, country ## GET|POST https://es.redtapeapi.com/v1/eu/invoice/precheck ($0.015) One-call EU B2B invoice pre-check before paying or issuing an invoice: live VIES VAT validation (name/address when available), IBAN validation for every IBAN country, VAT-country vs IBAN-country match (a common invoice-fraud signal), optional Spanish NIF/NIE/CIF check, and the due date (issue date + term) moved to the next business day using that country's public holidays, with a Late Payment Directive warning for terms over 60 days. Returns verdict ok/review/fail with reasons. If VIES is down the call still succeeds with vies.status=unavailable and verdict=review. GET with query params or POST a JSON object. Params: vatNumber*, iban*, spanishTaxId, issueDate, paymentTermDays, country, region JSON body example: {"vatNumber":"DE811569869","iban":"DE89370400440532013000","issueDate":"2026-11-02","paymentTermDays":30} ## POST https://es.redtapeapi.com/v1/eu/invoice/precheck/batch ($0.005 per item) Batch EU invoice pre-check: POST {"items":[...]} with up to 50 invoices (same fields as /v1/eu/invoice/precheck; at most 40 distinct VAT numbers, duplicates are checked once). Price is $0.005 per item, computed from the body you send (1 item = $0.005, 50 items = $0.25); the 402 challenge shows the exact total. Returns per-item verdicts plus a summary. JSON body example: {"items":[{"vatNumber":"DE811569869","iban":"DE89370400440532013000","issueDate":"2026-11-02","paymentTermDays":30},{"vatNumber":"ESB12345674","iban":"ES9121000418450200051332","spanishTaxId":"B12345674"}]} ## GET https://es.redtapeapi.com/v1/eu/electricity/day-ahead ($0.002) European wholesale day-ahead electricity prices (EUR/MWh, SDAC auction) for a bidding zone, today or tomorrow, aggregated to clock hours (Europe/Berlin time), with min/max/average, the cheapest N hours and the cheapest window of N consecutive hours. Use to schedule EV charging, batteries, heat pumps or flexible loads. Zones: AT, BE, CH, CZ, DE-LU, DK1, DK2, FR, HU, IT-North, NL, NO2, PL, SE4, SI. Tomorrow is usually published ~13:00 CET; before that you get 404 and are not charged. Data: Energy-Charts.info (Fraunhofer ISE), CC BY 4.0. For Spain's retail PVPC use /v1/es/electricity/pvpc. Params: zone*, day, cheapest, window ## Free tier (20 calls/day per client, no payment) GET https://es.redtapeapi.com/free/v1/es/electricity/pvpc (free twin of /v1/es/electricity/pvpc, same params) GET https://es.redtapeapi.com/free/v1/es/boe/search (free twin of /v1/es/boe/search, same params) Header X-Free-Remaining shows the calls left today (UTC). When it reaches 0 the free URL answers with the normal x402 402 challenge, so an x402 client can pay and retry. MCP server (Streamable HTTP): POST https://es.redtapeapi.com/mcp tools: es_pvpc_prices, es_boe_search (same free quota) Unified MCP server for all RedTape toolkits (Spain, Mexico, Colombia; same free quotas): POST https://mcp.redtapeapi.com/mcp (registry name com.redtapeapi/redtape) Free-tier status and privacy: https://es.redtapeapi.com/status/free-tier Free: GET https://es.redtapeapi.com/status/vies (VIES availability per member state) OpenAPI: https://es.redtapeapi.com/openapi.json x402 discovery manifest: https://es.redtapeapi.com/.well-known/x402 Sister APIs: Mexico Agent Toolkit (RFC / SAT 69-B): https://mx.redtapeapi.com/llms.txt; Colombia Agent Toolkit (NIT / RUES): https://co.redtapeapi.com/llms.txt