{"openapi":"3.1.0","info":{"title":"Spain Agent Toolkit","version":"1.0.0","description":"Pay-per-call Spain and EU utilities for AI agents over x402 (USDC). No accounts, no API keys. Public open data, live official checks (EU VIES) and offline computation; nothing is stored.","x-guidance":"Use when a task involves Spain or EU business data: EU VAT number validation (VIES), a full EU B2B invoice pre-check (VAT + IBAN + country match + due date on business days, single or batch), European day-ahead wholesale electricity prices per bidding zone, Spain's PVPC electricity price, the BOE gazette, Spanish holidays and business days, Spanish tax IDs and any IBAN. GET endpoints take query strings; invoice pre-check also accepts POST JSON and the batch endpoint is POST {items:[...]} priced per item. You are only charged on HTTP 200. Sister API for Mexico (RFC / SAT 69-B): https://mx.redtapeapi.com/llms.txt"},"servers":[{"url":"https://es.redtapeapi.com"}],"paths":{"/v1/es/electricity/pvpc":{"get":{"operationId":"es_electricity_pvpc","summary":"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","description":"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.\n\nPrice: $0.002 USDC per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["Spain"],"parameters":[{"name":"day","in":"query","required":false,"description":"today (default) or tomorrow. Tomorrow is published around 20:15-20:30 Madrid time.","schema":{"type":"string"},"example":"today"},{"name":"cheapest","in":"query","required":false,"description":"How many cheapest hours to return (1-12, default 3)","schema":{"type":"integer"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"date":"2026-10-22","unit":"EUR/kWh","averageEurPerKWh":0.20774,"cheapest":[{"hour":14,"eurPerKWh":0.01314,"period":"llano"}],"cheapestWindow3h":{"startHour":14,"avgEurPerKWh":0.01349}}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}}},"/v1/es/boe/search":{"get":{"operationId":"es_boe_search","summary":"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)","description":"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.\n\nPrice: $0.002 USDC per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["Spain"],"parameters":[{"name":"date","in":"query","required":false,"description":"YYYYMMDD or YYYY-MM-DD. Defaults to today. No issue on Sundays.","schema":{"type":"string"},"example":"2026-10-21"},{"name":"q","in":"query","required":false,"description":"Keywords (Spanish works best, accent-insensitive, all terms must match)","schema":{"type":"string"},"example":"vivienda"},{"name":"sections","in":"query","required":false,"description":"Comma-separated BOE section codes: 1,2B,3,4,5A,5B,5C","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Max items (1-500, default 100)","schema":{"type":"integer"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"date":"20261021","count":1,"items":[{"id":"BOE-A-2026-21872","section":"1","department":"JEFATURA DEL ESTADO","title":"Real Decreto-ley ...","pdf":"https://www.boe.es/boe/dias/2026/10/21/pdfs/BOE-A-2026-21872.pdf"}]}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}}},"/v1/es/business-days":{"get":{"operationId":"es_business_days","summary":"Count Spanish business days between two dates (inclusive), excluding weekends and national plus regional public holidays","description":"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.\n\nPrice: $0.002 USDC per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["Spain"],"parameters":[{"name":"from","in":"query","required":true,"description":"YYYY-MM-DD","schema":{"type":"string"},"example":"2026-12-01"},{"name":"to","in":"query","required":true,"description":"YYYY-MM-DD","schema":{"type":"string"},"example":"2026-12-31"},{"name":"region","in":"query","required":false,"description":"Optional ISO 3166-2 region: ES-AN,ES-AR,ES-AS,ES-CB,ES-CE,ES-CL,ES-CM,ES-CN,ES-CT,ES-EX,ES-GA,ES-IB,ES-MC,ES-MD,ES-ML,ES-NC,ES-PV,ES-RI,ES-VC","schema":{"type":"string"},"example":"ES-CT"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"from":"2026-12-01","to":"2026-12-31","region":"ES-CT","businessDays":19,"weekendDays":8,"holidaysOnWeekdays":4}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}}},"/v1/es/holidays":{"get":{"operationId":"es_holidays","summary":"Spanish public holidays for a year: national ones plus those of a region (comunidad autónoma) if given","description":"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.\n\nPrice: $0.002 USDC per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["Spain"],"parameters":[{"name":"year","in":"query","required":true,"description":"Year, e.g. 2027","schema":{"type":"integer"},"example":"2027"},{"name":"region","in":"query","required":false,"description":"Optional ISO 3166-2 region code: ES-AN,ES-AR,ES-AS,ES-CB,ES-CE,ES-CL,ES-CM,ES-CN,ES-CT,ES-EX,ES-GA,ES-IB,ES-MC,ES-MD,ES-ML,ES-NC,ES-PV,ES-RI,ES-VC","schema":{"type":"string"},"example":"ES-MD"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"year":2027,"region":"ES-MD","holidays":[{"date":"2027-01-01","localName":"Año Nuevo","name":"New Year's Day"}]}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}}},"/v1/es/tax-id/validate":{"get":{"operationId":"es_tax_id_validate","summary":"Validate a Spanish tax ID (DNI/NIF, NIE or company CIF) by format and control character, offline","description":"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.\n\nPrice: $0.002 USDC per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["Spain"],"parameters":[{"name":"id","in":"query","required":true,"description":"The DNI, NIE or CIF","schema":{"type":"string"},"example":"B12345674"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"normalized":"B12345674","type":"CIF","valid":true}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}}},"/v1/iban/validate":{"get":{"operationId":"iban_validate","summary":"Validate an IBAN (length per country + mod-97 checksum; for Spain also the national DC check digits) offline","description":"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.\n\nPrice: $0.002 USDC per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["Spain"],"parameters":[{"name":"iban","in":"query","required":true,"description":"IBAN with or without spaces","schema":{"type":"string"},"example":"ES9121000418450200051332"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"valid":true,"country":"ES","formatted":"ES91 2100 0418 4502 0005 1332","es":{"bankCode":"2100","branchCode":"0418","nationalCheckOk":true}}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}}},"/v1/eu/vat/validate":{"get":{"operationId":"eu_vat_validate","summary":"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","description":"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.\n\nPrice: $0.003 USDC per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["EU"],"parameters":[{"name":"vat","in":"query","required":true,"description":"VAT number with country prefix, e.g. IE6388047V or ESA28015865 (spaces/dots ignored, GR accepted for EL)","schema":{"type":"string"},"example":"IE6388047V"},{"name":"country","in":"query","required":false,"description":"Optional country prefix if vat has none","schema":{"type":"string"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"normalized":"IE6388047V","countryCode":"IE","formatValid":true,"valid":true,"vies":{"status":"valid","name":"GOOGLE IRELAND LIMITED","address":"3RD FLOOR, GORDON HOUSE, BARROW STREET, DUBLIN 4","requestDate":"2026-10-26+01:00"}}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}}},"/v1/eu/invoice/precheck":{"get":{"operationId":"eu_invoice_precheck_get","summary":"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","description":"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.\n\nPrice: $0.015 USDC per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["EU"],"parameters":[{"name":"vatNumber","in":"query","required":true,"description":"EU VAT number with country prefix (VIES: EL for Greece, XI for Northern Ireland), e.g. DE811569869","schema":{"type":"string"},"example":"DE811569869"},{"name":"iban","in":"query","required":true,"description":"Supplier IBAN, spaces allowed","schema":{"type":"string"},"example":"DE89370400440532013000"},{"name":"spanishTaxId","in":"query","required":false,"description":"Optional Spanish NIF/NIE/CIF to validate (and match against an ES VAT number)","schema":{"type":"string"}},{"name":"issueDate","in":"query","required":false,"description":"Optional invoice date YYYY-MM-DD; enables the due-date calculation","schema":{"type":"string"},"example":"2026-11-02"},{"name":"paymentTermDays","in":"query","required":false,"description":"Optional payment term in calendar days (0-365, default 30 when issueDate is given)","schema":{"type":"integer"},"example":"30"},{"name":"country","in":"query","required":false,"description":"Optional ISO country whose holidays apply to the due date (default: VAT country)","schema":{"type":"string"}},{"name":"region","in":"query","required":false,"description":"Optional ISO 3166-2 region for regional holidays, e.g. DE-BY, ES-CT","schema":{"type":"string"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.015000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"verdict":"ok","issues":[],"vat":{"normalized":"DE811569869","countryCode":"DE","formatValid":true,"vies":{"status":"valid","name":null,"address":null,"requestDate":"2026-10-26+01:00"}},"iban":{"valid":true,"country":"DE","formatted":"DE89 3704 0044 0532 0130 00"},"countryMatch":{"vatCountry":"DE","ibanCountry":"DE","match":true},"dueDate":{"nominalDueDate":"2026-12-02","dueDate":"2026-12-02","adjusted":false,"skipped":[],"warnings":[]}}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}},"post":{"operationId":"eu_invoice_precheck_post","summary":"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","description":"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.\n\nPrice: $0.015 USDC per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["EU"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vatNumber":{"type":"string","description":"EU VAT number with country prefix (VIES: EL for Greece, XI for Northern Ireland), e.g. DE811569869"},"iban":{"type":"string","description":"Supplier IBAN, spaces allowed"},"spanishTaxId":{"type":"string","description":"Optional Spanish NIF/NIE/CIF to validate (and match against an ES VAT number)"},"issueDate":{"type":"string","description":"Optional invoice date YYYY-MM-DD; enables the due-date calculation"},"paymentTermDays":{"type":"integer","description":"Optional payment term in calendar days (0-365, default 30 when issueDate is given)"},"country":{"type":"string","description":"Optional ISO country whose holidays apply to the due date (default: VAT country)"},"region":{"type":"string","description":"Optional ISO 3166-2 region for regional holidays, e.g. DE-BY, ES-CT"}},"required":["vatNumber","iban"]},"example":{"vatNumber":"DE811569869","iban":"DE89370400440532013000","issueDate":"2026-11-02","paymentTermDays":30}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.015000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"verdict":"ok","issues":[],"vat":{"normalized":"DE811569869","countryCode":"DE","formatValid":true,"vies":{"status":"valid","name":null,"address":null,"requestDate":"2026-10-26+01:00"}},"iban":{"valid":true,"country":"DE","formatted":"DE89 3704 0044 0532 0130 00"},"countryMatch":{"vatCountry":"DE","ibanCountry":"DE","match":true},"dueDate":{"nominalDueDate":"2026-12-02","dueDate":"2026-12-02","adjusted":false,"skipped":[],"warnings":[]}}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}}},"/v1/eu/invoice/precheck/batch":{"post":{"operationId":"eu_invoice_precheck_batch","summary":"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)","description":"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.\n\nPrice: $0.005 USDC per item (1-50 items, so $0.005-$0.25) per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["EU"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","properties":{"vatNumber":{"type":"string","description":"EU VAT number with country prefix (VIES: EL for Greece, XI for Northern Ireland), e.g. DE811569869"},"iban":{"type":"string","description":"Supplier IBAN, spaces allowed"},"spanishTaxId":{"type":"string","description":"Optional Spanish NIF/NIE/CIF to validate (and match against an ES VAT number)"},"issueDate":{"type":"string","description":"Optional invoice date YYYY-MM-DD; enables the due-date calculation"},"paymentTermDays":{"type":"integer","description":"Optional payment term in calendar days (0-365, default 30 when issueDate is given)"},"country":{"type":"string","description":"Optional ISO country whose holidays apply to the due date (default: VAT country)"},"region":{"type":"string","description":"Optional ISO 3166-2 region for regional holidays, e.g. DE-BY, ES-CT"}},"required":["vatNumber","iban"]}}},"required":["items"]},"example":{"items":[{"vatNumber":"DE811569869","iban":"DE89370400440532013000","issueDate":"2026-11-02","paymentTermDays":30},{"vatNumber":"ESB12345674","iban":"ES9121000418450200051332","spanishTaxId":"B12345674"}]}}}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.005000","max":"0.250000","perItem":"0.005000","description":"$0.005 x body.items.length"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"count":2,"distinctVatNumbers":2,"summary":{"ok":1,"review":0,"fail":1},"results":[{"index":0,"verdict":"ok"},{"index":1,"verdict":"fail","issues":["VAT number is not registered/active in VIES (not valid for intra-EU supplies)."]}]}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}}},"/v1/eu/electricity/day-ahead":{"get":{"operationId":"eu_electricity_day_ahead","summary":"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","description":"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.\n\nPrice: $0.002 USDC per successful call via x402 (eip155:8453). Failed calls (4xx/5xx) are never charged.","tags":["EU"],"parameters":[{"name":"zone","in":"query","required":true,"description":"Bidding zone: AT, BE, CH, CZ, DE-LU, DK1, DK2, FR, HU, IT-North, NL, NO2, PL, SE4, SI","schema":{"type":"string","enum":["AT","BE","CH","CZ","DE-LU","DK1","DK2","FR","HU","IT-North","NL","NO2","PL","SE4","SI"]},"example":"DE-LU"},{"name":"day","in":"query","required":false,"description":"today (default) or tomorrow (Europe/Berlin date)","schema":{"type":"string"},"example":"today"},{"name":"cheapest","in":"query","required":false,"description":"How many cheapest single hours to return (1-24, default 3)","schema":{"type":"integer"}},{"name":"window","in":"query","required":false,"description":"Length in hours of the cheapest consecutive window (1-24, default 3)","schema":{"type":"integer"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"},"example":{"zone":"DE-LU","zoneName":"Germany-Luxembourg","date":"2026-10-26","unit":"EUR/MWh","averageEurPerMWh":98.4,"cheapest":[{"start":"2026-10-26T13:00+01:00","hour":13,"eurPerMWh":41.2,"eurPerKWh":0.0412}],"cheapestWindow":{"start":"2026-10-26T12:00+01:00","startHour":12,"hours":3,"avgEurPerMWh":45.1}}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required"}}}},"/free/v1/es/electricity/pvpc":{"get":{"operationId":"free_es_electricity_pvpc","security":[],"summary":"Free tier (20/day per client): 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","description":"Same as GET /v1/es/electricity/pvpc, free for the first 20 calls per client per UTC day (all free routes together). Response header X-Free-Remaining shows what is left. When the quota is used up this URL returns the normal x402 402 challenge for /v1/es/electricity/pvpc ($0.002 USDC), so an x402 client can pay and retry.","tags":["Spain","Free tier"],"parameters":[{"name":"day","in":"query","required":false,"description":"today (default) or tomorrow. Tomorrow is published around 20:15-20:30 Madrid time.","schema":{"type":"string"},"example":"today"},{"name":"cheapest","in":"query","required":false,"description":"How many cheapest hours to return (1-12, default 3)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response (free)","content":{"application/json":{"schema":{"type":"object"},"example":{"date":"2026-10-22","unit":"EUR/kWh","averageEurPerKWh":0.20774,"cheapest":[{"hour":14,"eurPerKWh":0.01314,"period":"llano"}],"cheapestWindow3h":{"startHour":14,"avgEurPerKWh":0.01349}}}}},"400":{"description":"Invalid input (does not use quota)"},"402":{"description":"Free quota used up: x402 Payment Required for the paid route"}}}},"/free/v1/es/boe/search":{"get":{"operationId":"free_es_boe_search","security":[],"summary":"Free tier (20/day per client): 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)","description":"Same as GET /v1/es/boe/search, free for the first 20 calls per client per UTC day (all free routes together). Response header X-Free-Remaining shows what is left. When the quota is used up this URL returns the normal x402 402 challenge for /v1/es/boe/search ($0.002 USDC), so an x402 client can pay and retry.","tags":["Spain","Free tier"],"parameters":[{"name":"date","in":"query","required":false,"description":"YYYYMMDD or YYYY-MM-DD. Defaults to today. No issue on Sundays.","schema":{"type":"string"},"example":"2026-10-21"},{"name":"q","in":"query","required":false,"description":"Keywords (Spanish works best, accent-insensitive, all terms must match)","schema":{"type":"string"},"example":"vivienda"},{"name":"sections","in":"query","required":false,"description":"Comma-separated BOE section codes: 1,2B,3,4,5A,5B,5C","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Max items (1-500, default 100)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response (free)","content":{"application/json":{"schema":{"type":"object"},"example":{"date":"20261021","count":1,"items":[{"id":"BOE-A-2026-21872","section":"1","department":"JEFATURA DEL ESTADO","title":"Real Decreto-ley ...","pdf":"https://www.boe.es/boe/dias/2026/10/21/pdfs/BOE-A-2026-21872.pdf"}]}}}},"400":{"description":"Invalid input (does not use quota)"},"402":{"description":"Free quota used up: x402 Payment Required for the paid route"}}}},"/mcp":{"post":{"operationId":"mcp","security":[],"summary":"Remote MCP server (Streamable HTTP, JSON-RPC): free-tier tools es_pvpc_prices and es_boe_search","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"JSON-RPC response"}}}},"/health":{"get":{"operationId":"health","security":[],"summary":"Free: /health","responses":{"200":{"description":"OK"}}}},"/llms.txt":{"get":{"operationId":"llmstxt","security":[],"summary":"Free: /llms.txt","responses":{"200":{"description":"OK"}}}},"/openapi.json":{"get":{"operationId":"openapijson","security":[],"summary":"Free: /openapi.json","responses":{"200":{"description":"OK"}}}},"/status/vies":{"get":{"operationId":"statusvies","security":[],"summary":"Free: /status/vies","responses":{"200":{"description":"OK"}}}},"/status/free-tier":{"get":{"operationId":"statusfreetier","security":[],"summary":"Free: /status/free-tier","responses":{"200":{"description":"OK"}}}},"/.well-known/x402":{"get":{"operationId":"wellknownx","security":[],"summary":"Free: /.well-known/x402","responses":{"200":{"description":"OK"}}}}}}