<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Guillecasas1</title>
    <description>The latest articles on DEV Community by Guillecasas1 (@guillecasas1).</description>
    <link>https://dev.to/guillecasas1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F851194%2F19667ef8-993d-4acf-ba54-9d9dad98e9ec.png</url>
      <title>DEV Community: Guillecasas1</title>
      <link>https://dev.to/guillecasas1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/guillecasas1"/>
    <language>en</language>
    <item>
      <title>Spain's "free" cadastre API: what it actually costs to consume (SOAP JSON)</title>
      <dc:creator>Guillecasas1</dc:creator>
      <pubDate>Sun, 05 Jul 2026 11:32:27 +0000</pubDate>
      <link>https://dev.to/guillecasas1/spains-free-cadastre-api-what-it-actually-costs-to-consume-soap-json-572i</link>
      <guid>https://dev.to/guillecasas1/spains-free-cadastre-api-what-it-actually-costs-to-consume-soap-json-572i</guid>
      <description>&lt;p&gt;Spain's cadastre has a genuinely free, no-registration public API (the OVC). For a&lt;br&gt;
one-off lookup it's fine. This post documents what you'll hit when you put it in&lt;br&gt;
production — verified against the live service.&lt;/p&gt;

&lt;h2&gt;
  
  
  It's not one API, it's three ASMX services
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;By cadastral reference&lt;/strong&gt;: &lt;code&gt;Consulta_DNPRC&lt;/code&gt; (OVCCallejero.asmx)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By coordinates&lt;/strong&gt;: &lt;code&gt;Consulta_RCCOOR&lt;/code&gt; (OVCCoordenadas.asmx) — with its own SRS/axis-order handling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By address&lt;/strong&gt;: &lt;code&gt;Consulta_DNPLOC&lt;/code&gt; — province/municipality by UPPERCASE NAME, not code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All XML. GET works, which is the last easy part.&lt;/p&gt;

&lt;h2&gt;
  
  
  The teeth
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Required parameters even when empty.&lt;/strong&gt; Omit &lt;code&gt;Provincia&lt;/code&gt; (instead of sending it&lt;br&gt;
empty) and you get HTTP 500 &lt;code&gt;text/plain&lt;/code&gt;: &lt;code&gt;Missing parameter: Provincia.&lt;/code&gt; — not XML.&lt;br&gt;
And the reference parameter is &lt;code&gt;RC&lt;/code&gt;, not &lt;code&gt;RefCat&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Four response shapes on one endpoint.&lt;/strong&gt; Urban single (&lt;code&gt;&amp;lt;bico&amp;gt;&lt;/code&gt; + &lt;code&gt;&amp;lt;lcons&amp;gt;&lt;/code&gt;&lt;br&gt;
construction breakdown), rustic single (no &lt;code&gt;&amp;lt;lcons&amp;gt;&lt;/code&gt;; location in &lt;code&gt;&amp;lt;lorus&amp;gt;&lt;/code&gt;, crops in&lt;br&gt;
&lt;code&gt;&amp;lt;lspr&amp;gt;&lt;/code&gt;, no build year), multi-property (a 14-char reference with several units&lt;br&gt;
returns &lt;code&gt;&amp;lt;lrcdnp&amp;gt;&lt;/code&gt; — a list, different structure, you must re-query with the 20-char&lt;br&gt;
ref), and business error (&lt;code&gt;&amp;lt;lerr&amp;gt;&lt;/code&gt;). Your parser needs all four branches; with one&lt;br&gt;
test reference you'll only ever see one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Don't trust the HTTP status.&lt;/strong&gt; "Reference doesn't exist" and "malformed&lt;br&gt;
reference" arrive as &lt;strong&gt;HTTP 200&lt;/strong&gt; with the error inside the XML. Infra failures are&lt;br&gt;
500 text/plain. Map "200 = success" and you'll ship errors as data; retry every&lt;br&gt;
failure and you'll retry malformed references forever. Classify by channel: infra&lt;br&gt;
(retryable) vs business (not) vs multi (it's data, not an error).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. es-ES locale all the way down.&lt;/strong&gt; Decimal commas (&lt;code&gt;100,000000&lt;/code&gt;), uppercase&lt;br&gt;
accented literals (&lt;code&gt;LABRADÍO&lt;/code&gt;), default XML namespaces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. The reference has its own grammar.&lt;/strong&gt; 14 chars = parcel, 20 = specific property&lt;br&gt;
(last 2 are verifiable check digits — validate before calling, it catches the most&lt;br&gt;
common transcription error).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Operationally: no SLA, undocumented rate limits.&lt;/strong&gt; Government service: variable&lt;br&gt;
latency, unannounced maintenance. Budget timeouts + backoff + your own cache. Coverage&lt;br&gt;
excludes the Basque Country and Navarre (separate foral cadastres).&lt;/p&gt;

&lt;h2&gt;
  
  
  If you still want to DIY
&lt;/h2&gt;

&lt;p&gt;Totally reasonable for low volume: &lt;a href="https://pypi.org/project/pycatastro/" rel="noopener noreferrer"&gt;pycatastro&lt;/a&gt;&lt;br&gt;
(Python) and &lt;a href="https://ropenspain.github.io/CatastRo/" rel="noopener noreferrer"&gt;CatastRo&lt;/a&gt; (R) wrap the transport.&lt;br&gt;
The fine parsing and error classification stay yours.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shortcut
&lt;/h2&gt;

&lt;p&gt;I built &lt;a href="https://prediohq.com" rel="noopener noreferrer"&gt;Predio&lt;/a&gt; because I'd already paid this toll: the three&lt;br&gt;
inputs behind one stable JSON contract, typed errors, serve-stale cache, and an MCP&lt;br&gt;
server so AI agents can call it directly. 250 free calls/month, prepaid per-call after&lt;br&gt;
that. And if you're comparing options, here's an honest comparison that includes when&lt;br&gt;
NOT to use it: &lt;a href="https://prediohq.com/guias/api-catastro-comparativa/" rel="noopener noreferrer"&gt;https://prediohq.com/guias/api-catastro-comparativa/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>webdev</category>
      <category>opendata</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
