/v1/external/analysis/create/buyUtwórz analizę zakupu
Utwórz nową analizę zakupu nieruchomości. Wymaga szczegółów dotyczących nieruchomości, informacji o lokalizacji oraz ceny zakupu.
AI requests are slower than standard calls. Allow up to 90 seconds and set your client timeout to at least 300 seconds. AI work is time-bounded, so a request always returns a usable analysis rather than hanging.
AI-selected comparables are available for United States properties and require at least 8 usable listing photos for the address. Listing photos are gathered in the background when an analysis is created, so calling enhance shortly afterwards is faster than requesting comparables during creation.
When an AI step cannot complete, the response still returns 200 with the valid analysis and a warnings array explaining what was skipped. Check warnings rather than assuming AI results are always present.
Each AI function that completes adds $0.10 to the call. AI steps that fail or time out are never charged, and /enhance is billed only for the AI functions that completed — it carries no base call fee.
Parametry Lokalizacji (Warunkowe)
⚠️ Podaj lat I lng, LUB podaj fullAddress. Wymagana jest co najmniej jedna metoda.
latnumberwarunkoweWspółrzędna szerokości geograficznej (musi być podana z lng, jeśli fullAddress nie jest używany)(e.g., 27.7676)
lngnumberwarunkoweWspółrzędna długości geograficznej (musi być podana z lat, jeśli fullAddress nie jest używany)(e.g., -82.6403)
fullAddressstringwarunkowePełny adres nieruchomości (może być używany zamiast współrzędnych lat/lng)(e.g., 4935 2nd Avenue North, St. Petersburg, FL 33703)
Parametry Wymagane
purchasePriceUSDnumberwymaganeCena zakupu w USD(e.g., 350000)
bedroomsnumberwymaganeLiczba sypialni(e.g., 3)
bathroomsnumberwymaganeLiczba łazienek(e.g., 2)
accomodatesnumberwymaganeLiczba gości, których nieruchomość może pomieścić(e.g., 6)
Parametry Opcjonalne
monthlyRentUSDnumberopcjonalneOczekiwany miesięczny czynsz w USD za wynajem długoterminowy(e.g., 2500)
interestRatePercentagenumberopcjonalneOprocentowanie w procentach (0-15)(e.g., 5.1)
squareFeetnumberopcjonalnePowierzchnia nieruchomości w stopach kwadratowych(e.g., 1500)
statestringopcjonalneNazwa stanu(e.g., Florida)
citystringopcjonalneNazwa miasta(e.g., St. Petersburg)
countystringopcjonalneNazwa hrabstwa(e.g., Pinellas County)
postalCodestringopcjonalneKod pocztowy(e.g., 33703)
countrystringopcjonalneNazwa kraju(e.g., United States)
streetstringopcjonalneNazwa ulicy(e.g., 2nd Avenue North)
streetNumberstringopcjonalneNumer domu(e.g., 4935)
unitstringopcjonalneNumer jednostki/mieszkania, jeżeli dotyczy
addAICompsbooleanopcjonalneSelect comparables with AI and apply the resulting revenue benchmark. US properties only, and requires at least 8 usable listing photos for the address.(e.g., true)
addAIExpenseEstimatesbooleanopcjonalneEstimate operating expenses with AI instead of using category defaults(e.g., true)
Przykładowe zapytanie
curl -X POST \
https://atlas.bnbcalc.com/v1/external/analysis/create/buy \
-H "x-bnbcalc-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lat": 27.7676,
"lng": -82.6403,
"bedrooms": 3,
"bathrooms": 2,
"accomodates": 6,
"purchasePriceUSD": 400000
}'const response = await fetch(
'https://atlas.bnbcalc.com/v1/external/analysis/create/buy',
{
method: 'POST',
headers: {
'x-bnbcalc-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"lat": 27.7676,
"lng": -82.6403,
"bedrooms": 3,
"bathrooms": 2,
"accomodates": 6,
"purchasePriceUSD": 400000
})
}
);
const data = await response.json();import json
import requests
data = json.loads(r'''{
"lat": 27.7676,
"lng": -82.6403,
"bedrooms": 3,
"bathrooms": 2,
"accomodates": 6,
"purchasePriceUSD": 400000
}''')
response = requests.post(
'https://atlas.bnbcalc.com/v1/external/analysis/create/buy',
headers={
'x-bnbcalc-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json=data
)
data = response.json()Przykładowa odpowiedź
{
"success": true,
"data": {
"_id": "000000000000000000000000",
"url": "https://www.bnbcalc.com/analysis/example-property/000000000000000000000000",
"currency": "USD",
"ratePerNightUSD": 364.73770491803276,
"occupancyRatePercentage": 48,
"bedrooms": 4,
"bathrooms": 4,
"commonSpaces": 1,
"accomodates": 12,
"fullAddress": "4935 2nd Avenue North, St. Petersburg, FL 33703",
"location": {
"type": "Point",
"coordinates": [
-82.6403,
27.7676
]
},
"revenue": {
"p25": 48210,
"p50": 58440,
"p75": 63944.76398163934,
"p90": 74280,
"avg": 60310
},
"adr": {
"p25": 214,
"p50": 288,
"p75": 364.73770491803276,
"p90": 431,
"avg": 318
},
"occupancy": {
"p25": 0.38,
"p50": 0.44,
"p75": 0.48,
"p90": 0.56,
"avg": 0.46
},
"quartiles": {
"25th_percentile": {
"average_daily_rate": 214,
"occupancy_rate": 38,
"revenue": 48210
},
"50th_percentile": {
"average_daily_rate": 288,
"occupancy_rate": 44,
"revenue": 58440
},
"75th_percentile": {
"average_daily_rate": 364.73770491803276,
"occupancy_rate": 48,
"revenue": 63944.76398163934
},
"90th_percentile": {
"average_daily_rate": 431,
"occupancy_rate": 56,
"revenue": 74280
}
},
"comparables": [
{
"airbnbId": "12345678",
"name": "Modern 4BR near downtown",
"listingUrl": "https://www.airbnb.com/rooms/12345678",
"bedrooms": 4,
"bathrooms": 3,
"accommodates": 10,
"annualRevenueUSD": 68420,
"occupancyRatePercentage": 52,
"averageDailyRateUSD": 361,
"distanceMiles": 0.4,
"photo_urls": [
"https://a0.muscache.com/im/pictures/example/cover.jpg",
"https://a0.muscache.com/im/pictures/example/living-room.jpg",
"https://a0.muscache.com/im/pictures/example/kitchen.jpg"
]
}
],
"downPaymentPercentage": 20,
"mortgageLength": 30,
"yearsRemainingOnMortgage": 30,
"interestRatePercentage": 4,
"propertyTaxPercentage": 0.75,
"monthlyRevenueUSD": 5328.730331803278,
"monthlyExpensesUSD": 1474.1603364983607,
"monthlyTaxesUSD": 250,
"yearOneRevenueUSD": 63944.76398163934,
"yearOneOperatingIncomeUSD": 46254.83994365901,
"yearOneMorgageAndTaxesUSD": 21324,
"yearOneCashFlowUSD": 24930.83994365901,
"yearOneCashOnCashPercentage": 24.86817214984141,
"yearOneCapRatePercentage": 11.563709985914752,
"yearOneReturnOnInvestmentPercentage": 63.78402823049849,
"yearOnePrincipalPaydownUSD": 85635.31658640636,
"yearOneAppreciationUSD": 12000,
"totalCashInvestment": 100252,
"ltrPerMonthUSD": 1500,
"ltrMonthlyExpensesPercentage": 10
}
}