Endpoints
POST/api/neighborhood-dataBasic
Devuelve el perfil completo de un barrio: precio/m², tendencia, demanda, oferta, habitabilidad, disponibilidad y métricas de inversión.
Parámetros
| Nombre | Tipo | Requerido | Descripción |
|---|
slug | string | Sí | Identificador único del barrio (ej: eixample-barcelona) |
name | string | No | Nombre del barrio (fallback opcional) |
Ejemplo de llamada (cURL)
curl -X POST https://inquilinos.me/api/neighborhood-data \
-H "Authorization: Bearer {tu_jwt_token}" \
-H "Content-Type: application/json" \
-d '{"slug": "eixample-barcelona"}'
Ejemplo de respuesta
{
"name": "Eixample",
"city": "barcelona",
"slug": "eixample-barcelona",
"pricePerSqm": 19.8,
"trend": "rising",
"trendPct": 4.2,
"demandLevel": "very_high",
"avgSize": 62,
"avgRent": 1228,
"grossYieldPct": 4.1,
"paybackYears": 24.3,
"investmentGrade": "B",
"marketSignals": {
"demandScore": 91,
"supplyScore": 38,
"occupancyPct": 94
},
"habitability": {
"transitScore": 95,
"greenScore": 62,
"nightlifeScore": 88,
"schoolScore": 74,
"shoppingScore": 90,
"healthScore": 80,
"totalScore": 489,
"hasData": true
},
"priceHistory": [
{ "quarter": "2022-Q1", "price": 18.5 },
{ "quarter": "2024-Q1", "price": 19.8 }
],
"pros": [
{ "text": "Alta demanda: zona muy buscada por inquilinos", "weight": "strong" }
],
"cons": [
{ "text": "Precio 35% por encima de la media de la ciudad", "weight": "strong" }
],
"dataMeta": { "sourceTags": ["MITMA", "INE", "OSM"], "methodology": "statistical" }
}
POST/api/cashflowPro
Calcula el cash-flow neto, yield neto, ROE (con financiación) e impacto IRPF de una inversión inmobiliaria.
Parámetros
| Nombre | Tipo | Requerido | Descripción |
|---|
purchasePrice | number | Sí | Precio de compra del activo (€). Rango: 1 - 50.000.000 |
monthlyRent | number | Sí | Alquiler mensual bruto (€). Rango: 1 - 500.000 |
sqm | number | Sí | Superficie en m². Rango: 1 - 10.000 |
ibi | number | No | IBI anual (€). Default: 0.35% del precio de compra |
insurance | number | No | Seguro hogar anual (€). Default: 250 |
communityFees | number | No | Comunidad de propietarios mensual (€). Default: 65 |
vacancyRate | number | No | Vacancia esperada (0-1). Default: 0.04 |
maintenanceCost | number | No | Mantenimiento anual (€). Default: 5€/m²/año |
downPayment | number | No | Entrada hipotecaria (€). Activa cálculo ROE si se incluye junto con interestRate y termYears |
interestRate | number | No | Tipo de interés anual (%). Rango: 0.1 - 25 |
termYears | number | No | Plazo hipoteca en años. Rango: 1 - 40 |
irpfParams | object | No | Parámetros IRPF opcionales: { otherAnnualIncome, reductionType, constructionPct, yearOfRepayment } |
Ejemplo de llamada (cURL)
curl -X POST https://inquilinos.me/api/cashflow \
-H "Authorization: Bearer {tu_jwt_token}" \
-H "Content-Type: application/json" \
-d '{
"purchasePrice": 280000,
"monthlyRent": 1200,
"sqm": 75,
"downPayment": 56000,
"interestRate": 3.5,
"termYears": 25
}'
Ejemplo de respuesta
{
"loanAmount": 224000,
"monthlyMortgage": 1121.4,
"annualMortgagePayment": 13456.8,
"totalInvestment": 61600,
"cashFlowAfterMortgage": 944.2,
"roe": 1.53,
"ltv": 80,
"breakEvenYear": 3,
"leverageEffect": -2.89,
"cashFlow": {
"grossRentAnnual": 14400,
"grossYieldPct": 5.14,
"costs": {
"ibi": 980,
"insurance": 250,
"communityFees": 780,
"vacancyLoss": 576,
"maintenance": 375,
"total": 2961
},
"netRentAnnual": 11439,
"netYieldPct": 4.08,
"monthlyCashFlow": 953.25,
"breakEvenMonthlyRent": 246.75
},
"irpf": {
"grossRentAnnual": 14400,
"deductibleExpenses": 5614.5,
"reductionPct": 50,
"taxableBase": 4392.75,
"irpfDue": 1097
}
}
GET/api/capture-leadEnterprise
Devuelve los últimos 100 leads capturados en la plataforma. Sólo accesible con tier Enterprise.
Parámetros
| Nombre | Tipo | Requerido | Descripción |
|---|
- | - | No | Sin parámetros. Requiere header Authorization con JWT de tier Enterprise. |
Ejemplo de llamada (cURL)
curl -X GET https://inquilinos.me/api/capture-lead \
-H "Authorization: Bearer {tu_jwt_enterprise_token}"
Ejemplo de respuesta
{
"leads": [
{
"email": "cto@proptech.es",
"source": "demo_request",
"metadata": "{\"name\":\"Carlos\",\"company\":\"PropTech SL\"}",
"created_at": "2026-04-15T10:23:00.000Z"
},
{
"email": "inversor@example.com",
"source": "soft_gate",
"metadata": null,
"created_at": "2026-04-14T08:10:00.000Z"
}
]
}