APIs / Fotocasa / Polygons

Fotocasa: Polygons

Polygons from Fotocasa as JSON. 1 credit per successful call.

GET /v1/fotocasa/polygons

Parameters

Send parameters in the query string.

ParameterTypeRequiredAllowed values
levelstringRequiredCOUNTRY, REGION, MUNICIPALITY
codestringRequiredAny

Example request

Fotocasa
GET/v1/fotocasa/polygons?level=MUNICIPALITY&code=28079
{
  "success": true,
  "data": {
    "level": "MUNICIPALITY",
    "geometry": {
      "type": "MultiPolygon",
      "coordinates": [
        [
          [
            [
              -3.657861,
              40.511564
            ],
            [
              -3.658262029,
              40.509406854
            ],
            [
              -3.649789886,
              40.506102493
            ]
          ]
        ]
      ]
    },
    "centroid": {
      "latitude": 40.4096,
      "longitude": -3.68624
    }
  },
  "meta": {
    "duration_ms": 729,
    "endpoint_family": "polygons"
  }
}
200 OKJSONX-Credits-Used: 1
Recorded 12 Nov 2026 and shortened.

Run this endpoint in the playground with your own parameters. 1 credit per successful call; failed calls are free.

Response fields

data has these 3 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

FieldType
levelstring
geometryobject
centroidobject