Search Explore

Spain's cadastre API is SOAP from 2003, so I built a JSON wrapper (+MCP)

https://prediohq.com/

guillermofc · 4 days ago

3 comments

  • guillermofc · 4 days ago

    Spain's cadastre (the official property registry for land/buildings data) has a free public API. The catch: it's SOAP/.asmx-era XML with three different services depending on your input (reference, coordinates, or address), four different response shapes discriminated by a counters block, business errors returned as HTTP 200 with the error inside the XML, infra errors as HTTP 500 text/plain, decimal commas ("100,000000"), and no documented rate limits or SLA.

    I wrote up everything I hit while integrating it (applies even if you never use my product): https://prediohq.com/guias/consumir-api-catastro-soap-json/

    Predio is the wrapper I built on top: one JSON contract for the three inputs, typed stable errors (404/422/402 always JSON), cache with serve-stale so the upstream's availability isn't yours, and an MCP server (Streamable HTTP) so agents can call it directly. Prepaid per-call pricing, 250 calls/month free, no subscription.

    Honest caveats: Spain only (and not the Basque Country/Navarre, which run their own foral cadastres); no ownership data (that's legally protected); if you need one lookup a month, just use the official site — I wrote a comparison that includes "when not to use us": https://prediohq.com/guias/api-catastro-comparativa/

    Happy to answer anything about wrangling government SOAP into something agents can use.

    • loloquwowndueo · 4 days ago

      Wow even the HN intro comment is slop.

      Also - I’m a native Spanish speaker, it’s probably the first slop page in Spanish I’ve ever seen and it’s … painful. Do your users a favor and please go through it and do some human-driven copy editing. As is this is barely intelligible.

      • nickphx · 4 days ago

        those honest caveats though.. lol

        • loloquwowndueo · 4 days ago

          Beats the crap out of dishonest ones.

          I hate AIs that start sentences with “honestly” or “I have to be honest”. Means they’re bullshitting you the rest of the time - which we all knew about anyway.

        • mejutoco · 4 days ago

          I had to check

          > Esta guía es para cuando quieres meterla en producción

          This sounds pretty inappropriate, and a bit funny.

          • someone_old · 3 days ago

            I would also be happy if I could do that in preproduction, or testing, or QA, but I just do it in local :D

      • khalic · 4 days ago

        I still get nightmares from SOAP…

        • MarkSweep · 4 days ago

          Wake from that nightmare and wrap your angle brackets with MCP so you can start hallucinating:

          https://github.com/AustinWise/mcp2ws

          (This program is for comedy purposes only)

          • sellmesoap · 4 days ago

            Me too!

          • Waterluvian · 4 days ago

            GIS APIs using SOAP are often going to be ArcGIS Server based APIs. If I recall correctly, you can literally just check a box to expose a REST API as well. SOAP was also just a checkbox.