/v1/external/analysis/create/buyCreate Buy Analysis
Create a new buy analysis for a property. Requires property details, location information, and purchase price.
Location Parameters (Conditional)
⚠️ Either provide both lat AND lng, OR provide fullAddress. At least one method is required.
latnumberconditionalLatitude coordinate (must be provided with lng if fullAddress is not used)(e.g., 27.7676)
lngnumberconditionalLongitude coordinate (must be provided with lat if fullAddress is not used)(e.g., -82.6403)
fullAddressstringconditionalComplete property address (can be used instead of lat/lng coordinates)(e.g., 4935 2nd Avenue North, St. Petersburg, FL 33703)
Required Parameters
purchasePriceUSDnumberrequiredPurchase price in USD(e.g., 350000)
bedroomsnumberrequiredNumber of bedrooms(e.g., 3)
bathroomsnumberrequiredNumber of bathrooms(e.g., 2)
accomodatesnumberrequiredNumber of guests the property can accommodate(e.g., 6)
Optional Parameters
monthlyRentUSDnumberoptionalExpected monthly rent in USD for long-term rental(e.g., 2500)
interestRatePercentagenumberoptionalInterest rate percentage (0-15)(e.g., 5.1)
squareFeetnumberoptionalProperty square footage(e.g., 1500)
statestringoptionalState name(e.g., Florida)
citystringoptionalCity name(e.g., St. Petersburg)
countystringoptionalCounty name(e.g., Pinellas County)
postalCodestringoptionalPostal/ZIP code(e.g., 33703)
countrystringoptionalCountry name(e.g., United States)
streetstringoptionalStreet name(e.g., 2nd Avenue North)
streetNumberstringoptionalStreet number(e.g., 4935)
unitstringoptionalUnit/apartment number if applicable
Example Request
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 requests
data = {
"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()Example Response
{
"success": true,
"data": {
"_id": "691dab391ecf3015bfba0f5f",
"url": "https://www.bnbcalc.com/analysis/4935-2nd-ave-n/691dab391ecf3015bfba0f5f",
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],
"comparables": ["..."],
"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,
}
}