For agencies & developers

Put the grade on your own listings.

A free badge showing any municipality’s A→G location grade, computed from official open data. One image tag, no script, no tracking, and it stays correct on its own — we recompute the grades, you do not have to touch the embed.

Terragrado location grade for Madrid
Default — ?theme=light
Terragrado location grade for Madrid
For dark backgrounds — ?theme=dark

Live, not a mock-up: that is Madrid’s actual current grade, served from the same endpoint your page would call.

The embed code

Copy this into your listing template, replacing 28079 with the code of the municipality you are showing.

<a href="https://terragrado.com/concello/28079">
  <img src="https://terragrado.com/badge/28079.svg"
       alt="Terragrado location grade for Madrid" loading="lazy">
</a>

The image sizes itself; give it a max-width:100% if your column is narrow. Do not set a height — the badge grows horizontally with the length of the town’s name.

Options

ParameterValuesWhat it does
{code} The municipality code The national statistics code (INE in Spain, INSEE in France, ISTAT in Italy, INE in Portugal). It is the last part of the URL of every municipality page on this site — /concello/28079 is Madrid.
?theme= light (default), dark Card colours. The grade chip keeps its own colour in both — it is the meaning, not the styling.

What the badge says — and what it does not

  • It shows one letter: the overall grade of the municipality, on the same A→G ladder as the rest of this site. Not the building, not the street, not the view.
  • It shows nothing else. No score out of 100, no pillar breakdown, no indicator values. Those live on the town’s own page, where they can be shown with their sources and their vintages next to them, which is the only honest way to show them.
  • There is no per-pillar badge, deliberately. The A→G ladder is calibrated on the overall score; applied to a single pillar it would hand out an “A” to roughly half of Europe and mean something entirely different from the “A” on the town’s page. We would rather publish one letter that means one thing.
  • A partial grade says so on its face. Where a municipality is missing one of the five pillars, the badge reads provisional with the percentage of data behind it, in amber. It is not quietly rounded up to a clean letter.
  • An ungraded municipality has no badge. The endpoint returns 404 rather than a grey “not rated” card — a placeholder is a claim about a place we have not measured, and it would sit on your page for years.

How every grade is computed, from which source, of which vintage, and where we refuse to publish one at all: the methodology page. That is the page to link if anyone asks you where the letter comes from.

Terms — short version

  • Free to embed, on commercial listing pages included. No account, no key, no fee.
  • Keep the link. The badge is only meaningful next to a way of checking it, so embed it wrapped in the link to that municipality’s page, as in the snippet above. That link is the one thing we ask for in return.
  • Do not alter the image or re-draw the grade yourself — including removing the provisional marker, which exists precisely so a partial grade cannot be presented as a full one.
  • The grade can change. It is recomputed as the underlying open data is republished. Serve the badge from this endpoint rather than saving a copy, and it stays current by itself; a saved copy becomes a claim you are making, not one we are.
  • It is not advice. A location grade is a summary of published statistics about a municipality, not a valuation, a survey or a recommendation to buy — see the terms.

Technical notes

  • Plain SVG. No script, no external font, no stylesheet — it renders identically inside an <img>, which is the only way we recommend embedding it.
  • No cookies are set and no session is created, so it neither tracks your visitors nor makes your page uncacheable.
  • Cached for 24 hours and revalidated with an ETag, so a busy listing page costs us — and you — almost nothing.
  • Rate-limited per address. If you are generating pages in bulk, cache the image on your side within those 24 hours rather than fetching it per render.