Skip to content
Scrappa Get API key
Tecnocasa API 1 credit/request

Tecnocasa Locations API Documentation

GET https://scrappa.co/api/tecnocasa/v1/locations

Tecnocasa Locations API turns a place name into provinces, cities, districts and quarters. Every city carries city_id, province and region, every district carries its city_id, so a result can go straight into the search route.

Notes: A name without any match returns empty groups and is a successful, billable response. Prices, areas and counts are numbers and the original text is kept in raw or label fields. A hidden price (for example Informazioni in agenzia) is null, never 0. A valid empty result is a successful, billable response; failed requests are never billed.

Tecnocasa Locations API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/tecnocasa/v1/locations
Auth header
x-api-key
Cost
1 credit/request
q = coffee shops
Response preview
200 OK
{
    "data": {
        "query": "mila",
        "total": 3,
        "country": "it",
        "locations": {
            "cities": [
                {
                    "id": 13800324507779,
                    "name": "milano",
                    "type": "city",
                    "label": "Milano (MI)",
                    "region": "lom",
                    "city_id": 13800324507779,
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

1 optional filter available.

q string Required

Place name, at least 2 characters. Example: mila.

Example value coffee shops
country string Optional

it (default) or es. Example: es.

Example value US

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "query": "mila",
        "total": 3,
        "country": "it",
        "locations": {
            "cities": [
                {
                    "id": 13800324507779,
                    "name": "milano",
                    "type": "city",
                    "label": "Milano (MI)",
                    "region": "lom",
                    "city_id": 13800324507779,
                    "province": "MI",
                    "has_districts": true
                }
            ],
            "precise": [],
            "quarters": [],
            "districts": [
                {
                    "id": 10057,
                    "name": "navigli",
                    "type": "districts",
                    "label": "Milano - Navigli",
                    "region": "lom",
                    "city_id": 13800324507779,
                    "province": "MI"
                }
            ],
            "provinces": [
                {
                    "id": "MI",
                    "name": "milano",
                    "type": "province",
                    "label": "Milano",
                    "region": "lom",
                    "province": "MI"
                }
            ]
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "locations"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required parameter or a value is invalid. This response is not billable.

{
    "errors": {
        "field": [
            "The field is invalid."
        ]
    },
    "message": "The request validation failed"
}
404

Not Found

The requested page does not exist. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "locations"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested resource was not found."
    },
    "success": false
}
503

Upstream Unavailable

Tecnocasa could not be reached. This response is not billable and is retryable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "locations"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "Tecnocasa could not be reached. Please retry shortly."
    },
    "success": false
}
503

Unexpected Upstream Data

Tecnocasa returned data in an unexpected shape. This response is not billable and is retryable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "locations"
    },
    "error": {
        "code": "INVALID_UPSTREAM_SHAPE",
        "message": "Tecnocasa returned data in an unexpected shape. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.