gozillow

package module
v0.0.0-...-f618796 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 15 Imported by: 0

README

Zillow scraper in Go

Overview

This Go library provides functions to retrieve and parse property details from Zillow.

Features

  • Fetches property details from Zillow using a property URL or ID.
  • Parses the retrieved HTML content to extract structured property information.
  • Implemented in Go for performance and efficiency.
  • Easy to integrate with existing Go projects.

Usage

The library offers functionalities for retrieving property details using either the property URL or ID. Additionally, it supports specifying a proxy for cases where scraping restrictions might be encountered.

Installation

go get -u github.com/johnbalvin/gozillow

Ways of searching

There are 3 ways of searching, same as on the zillow page

SearchSold //for searching properties sold
SearchForRent //for searching properties to rent
SearchForSale //for searching properties for sale

Examples

Quick testing
    package gozillow
    
    import (
        "encoding/json"
        "fmt"
        "github.com/johnbalvin/gozillow"
        "log"
        "os"
    )
    
    func main() {
        //coordinates should be 2 points one from shouth and one from north(if you think it like a square
        //this presents the two points of the diagonal from this square)
        coords := gozillow.CoordinatesInput{
            Ne: gozillow.CoordinatesValues{
                Latitude: 47.76725314073866,
                Longitud: -122.15539952490977,
            },
            Sw: gozillow.CoordinatesValues{
                Latitude: 47.67128302452179,
                Longitud: -122.3442270395582,
            },
        }
        zoomValue := 2
        //pagination is for the list that you see at the right when searching
        //you don't need to iterate over all the pages because zillow sends the whole data on mapresults at once on the first page
        //however the maximum result zillow returns is 500, so if mapResults is 500
        //try playing with the zoom or moving the coordinates, pagination won't help because you will always get at maximum 500 results
        pagination := 1
        _, fullResult, err := gozillow.SearchSold(pagination, zoomValue, coords, nil)
        if err != nil {
            log.Println(err)
            return
        }
        rawJSON, _ := json.MarshalIndent(fullResult, "", "  ")
        fmt.Printf("%s", rawJSON) //in case you don't have write permisions
        if err := os.WriteFile("./fullResult.json", rawJSON, 06444); err != nil {
            log.Println(err)
            return
        }
    }
    package gozillow
    
    import (
        "encoding/json"
        "fmt"
        "github.com/johnbalvin/gozillow"
        "log"
        "os"
    )
    
    func main() {
        //coordinates should be 2 points one from shouth and one from north(if you think it like a square
        //this presents the two points of the diagonal from this square)
        coords := gozillow.CoordinatesInput{
            Ne: gozillow.CoordinatesValues{
                Latitude: 47.76725314073866,
                Longitud: -122.15539952490977,
            },
            Sw: gozillow.CoordinatesValues{
                Latitude: 47.67128302452179,
                Longitud: -122.3442270395582,
            },
        }
        zoomValue := 2
        //pagination is for the list that you see at the right when searching
        //you don't need to iterate over all the pages because zillow sends the whole data on mapresults at once on the first page
        //however the maximum result zillow returns is 500, so if mapResults is 500
        //try playing with the zoom or moving the coordinates, pagination won't help because you will always get at maximum 500 results
        pagination := 1
        _, fullResult, err := gozillow.SearchForRent(pagination, zoomValue, coords, nil)
        if err != nil {
            log.Println(err)
            return
        }
        rawJSON, _ := json.MarshalIndent(fullResult, "", "  ")
        fmt.Printf("%s", rawJSON) //in case you don't have write permisions
        if err := os.WriteFile("./fullResult.json", rawJSON, 06444); err != nil {
            log.Println(err)
            return
        }
    }
    package gozillow
    
    import (
        "encoding/json"
        "fmt"
        "log"
        "os"
        "github.com/johnbalvin/gozillow"
    )
    
    func main() {
        // Coordinates defining the search area (southwest and northeast corners)
        coords := gozillow.CoordinatesInput{
            Sw: gozillow.CoordinatesValues{
                Latitude: -1.03866277790021, // Replace with your south latitude
                Longitud: -77.53091734683608, // Replace with your south longitude
            },
            Ne: gozillow.CoordinatesValues{
                Latitude: -1.1225978433925647, // Replace with your north latitude
                Longitud: -77.59713412765507, // Replace with your north longitude
            },
        }
    
        // Zoom level (1-20) for search granularity
        zoomValue := 2
        //pagination is for the list that you see at the right when searching
        //you don't need to iterate over all the pages because zillow sends the whole data on mapresults at once on the first page
        //however the maximum result zillow returns is 500, so if mapResults is 500
        //try playing with the zoom or moving the coordinates, pagination won't help because you will always get at maximum 500 results
        pagination := 1
        // Search for properties within the specified area and zoom level
        _, fullResult, err := gozillow.SearchForSale(pagination, zoomValue, coords, nil) // Optional proxy can be passed here
        if err != nil {
            log.Println("Error:", err)
            return
        }
        rawJSON, _ := json.MarshalIndent(fullResult, "", "  ")
        fmt.Printf("%s\n", rawJSON)
        if err := os.WriteFile("./searchResultAll.json", rawJSON, 0644); err != nil {
            log.Println("Error writing file:", err)
        }
    }
Basic Data Retrieval
Get Property Details using URL

This example demonstrates how to retrieve property details using a Zillow property URL:

    package gozillow
    
    import (
        "encoding/json"
        "fmt"
        "github.com/johnbalvin/gozillow"
        "log"
        "os"
    )
    
    func main() {
        // Property URL (replace with your desired URL)
        propertyURL := "https://www.zillow.com/homedetails/3051-NW-207th-Ter-Miami-Gardens-FL-33056/44063708_zpid/"
    
        // Retrieve property details
        property, err := gozillow.DetailsFromPropertyURL(propertyURL, nil)
        //property, err := details.GetFromPropertyURL(propertyURL, nil)
        if err != nil {
            // Handle different error types (consider using trace.ErrorCode for more specific handling)
            fmt.Println("Error retrieving property details:", err)
            return
        }
    
        rawJSON, _ := json.MarshalIndent(property, "", "  ")
        fmt.Printf("%s", rawJSON) //in case you don't have write permisions
        if err := os.WriteFile("./details.json", rawJSON, 0644); err != nil {
            log.Println(err)
            return
        }
    }
Get Property Details using Property ID

Alternatively, you can retrieve details using the Zillow property ID (zpid) extracted from the URL:

    package gozillow
    
    import (
        "encoding/json"
        "fmt"
        "github.com/johnbalvin/gozillow"
        "log"
        "os"
    )
    
    func main() {
        propertyID:=344690910
        property, err := gozillow.DetailsFromPropertyID(propertyID, nil)
        if err != nil {
            fmt.Println("Error retrieving property details:", err)
            return
        }
    
        rawJSON, _ := json.MarshalIndent(property, "", "  ")
        fmt.Printf("%s", rawJSON) //in case you don't have write permisions
        if err := os.WriteFile("./details.json", rawJSON, 0644); err != nil {
            log.Println(err)
            return
        }
    }
Using proxy

In scenarios where Zillow might have scraping restrictions, you can utilize a proxy to anonymize your requests. Here's an example:

    package gozillow
    
    import (
        "encoding/json"
        "fmt"
        "github.com/johnbalvin/gozillow"
        "github.com/johnbalvin/gozillow/utils"
        "log"
        "os"
    )
    
    func main() {
        proxyURL, err := utils.ParseProxy("http://[IP | domain]:[port]", "username", "password")
        if err != nil {
            log.Println("test:1 -> err: ", err)
            return
        }
    
        // Property URL (replace with your desired URL)
        propertyURL := "https://www.zillow.com/homedetails/858-Shady-Grove-Ln-Harrah-OK-73045/339897685_zpid/"
    
        // Retrieve property details
        property, err := gozillow.DetailsFromPropertyURL(propertyURL, proxyURL)
        if err != nil {
            // Handle different error types (consider using trace.ErrorCode for more specific handling)
            fmt.Println("Error retrieving property details:", err)
            return
        }
    
        rawJSON, _ := json.MarshalIndent(property, "", "  ")
        fmt.Printf("%s", rawJSON) //in case you don't have write permisions
        if err := os.WriteFile("./details.json", rawJSON, 0644); err != nil {
            log.Println(err)
            return
        }
    
    }
Limitations

Currently, the library retrieves data by scraping Zillow's website. This approach might be fragile and susceptible to changes in Zillow's HTML structure.

Contributing

We welcome contributions to improve this library! Feel free to submit pull requests for bug fixes, new features, or enhancements.

License

This library is licensed under the MIT License. See the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	StreetAddress string `json:"streetAddress"`
	City          string `json:"city"`
	State         string `json:"state"`
	Zipcode       string `json:"zipcode"`
}

type Agent

type Agent struct {
	ProfileUrl string `json:"profileUrl"`
	Name       string `json:"name"`
	Photo      Photo  `json:"photo"`
}

type Association

type Association struct {
	FeeFrequency string `json:"feeFrequency"`
	Name         string `json:"name"`
	Phone        string `json:"phone"`
}

type AtAGlanceFact

type AtAGlanceFact struct {
	FactLabel string `json:"factLabel"`
	FactValue string `json:"factValue"` // Using pointer to handle null values
}

type AttributionInfo

type AttributionInfo struct {
	ListingAgreement             string          `json:"listingAgreement"`
	MlsName                      string          `json:"mlsName"`
	AgentEmail                   string          `json:"agentEmail"`
	AgentLicenseNumber           string          `json:"agentLicenseNumber"`
	AgentName                    string          `json:"agentName"`
	AgentPhoneNumber             string          `json:"agentPhoneNumber"`
	AttributionTitle             string          `json:"attributionTitle"`
	BrokerName                   string          `json:"brokerName"`
	BrokerPhoneNumber            string          `json:"brokerPhoneNumber"`
	BuyerAgentMemberStateLicense string          `json:"buyerAgentMemberStateLicense"`
	BuyerAgentName               string          `json:"buyerAgentName"`
	BuyerBrokerageName           string          `json:"buyerBrokerageName"`
	CoAgentLicenseNumber         string          `json:"coAgentLicenseNumber"`
	CoAgentName                  string          `json:"coAgentName"`
	CoAgentNumber                string          `json:"coAgentNumber"`
	LastChecked                  string          `json:"lastChecked"`
	LastUpdated                  string          `json:"lastUpdated"`
	ListingOffices               []ListingOffice `json:"listingOffices"`
	ListingAgents                []ListingAgent  `json:"listingAgents"`
	MlsDisclaimer                string          `json:"mlsDisclaimer"`
	MlsId                        string          `json:"mlsId"`
	InfoString3                  string          `json:"infoString3"`
	InfoString5                  string          `json:"infoString5"`
	InfoString10                 string          `json:"infoString10"`
	InfoString16                 string          `json:"infoString16"`
	TrueStatus                   string          `json:"trueStatus"`
}

type Building

type Building struct {
	FloorPlans []FloorPlan `json:"floorPlans"`
}

type CarouselPhoto

type CarouselPhoto struct {
	URL string `json:"url"`
}

type Coordinates

type Coordinates struct {
	Latitude  float64
	Longitude float64
}

type Element

type Element struct {
	ID   string `json:"id"`
	Text string `json:"text"`
}

type FeesAndDues

type FeesAndDues struct {
	Type  string `json:"type"`
	Fee   string `json:"fee"`
	Name  string `json:"name"`
	Phone string `json:"phone"`
}

type Filter

type Filter struct {
	Beds      MinMax
	Bathrooms MinMax
	Price     MinMax
}

func (Filter) ForRent

func (filter Filter) ForRent(paginationN, zoomValue int, searchValue string, mapBound MapBounds, proxyURL *url.URL) ([]ListResult, []MapResult, error)

func (Filter) ForSale

func (filter Filter) ForSale(paginationN, zoomValue int, searchValue string, mapBound MapBounds, proxyURL *url.URL) ([]ListResult, []MapResult, error)

func (Filter) Sold

func (filter Filter) Sold(paginationN, zoomValue int, searchValue string, mapBound MapBounds, proxyURL *url.URL) ([]ListResult, []MapResult, error)

type FloorPlan

type FloorPlan struct {
	Zpid  string  `json:"zpid"`
	Units []Unit2 `json:"units"`
	//Videos []string `json:"videos"`
	//FloorPlanUnitPhotos []string `json:"floorPlanUnitPhotos"`
	FloorplanVRModel  *string  `json:"floorplanVRModel"`
	UnitSpecialOffers *string  `json:"unitSpecialOffers"`
	MinPrice          int      `json:"minPrice"`
	MaxPrice          int      `json:"maxPrice"`
	Beds              int      `json:"beds"`
	MaloneId          string   `json:"maloneId"`
	AvailableFrom     string   `json:"availableFrom"`
	Baths             int      `json:"baths"`
	Name              string   `json:"name"`
	Photos            []Photo  `json:"photos"`
	Sqft              int      `json:"sqft"`
	VrModels          []string `json:"vrModels"`
	AmenityDetails    []string `json:"amenityDetails"`
	LeaseTerm         string   `json:"leaseTerm"`
	DepositsAndFees   float32  `json:"depositsAndFees"`
	Description       string   `json:"description"`
}

func FromApartmentURL

func FromApartmentURL(roomURL string, proxyURL *url.URL) ([]FloorPlan, error)

func ParseBodyDetailsApartment

func ParseBodyDetailsApartment(body []byte) ([]FloorPlan, error)

type ForeclosureTypes

type ForeclosureTypes struct {
	IsBankOwned         *bool `json:"isBankOwned"`
	IsForeclosedNFS     *bool `json:"isForeclosedNFS"`
	IsPreforeclosure    *bool `json:"isPreforeclosure"`
	IsAnyForeclosure    *bool `json:"isAnyForeclosure"`
	WasNonRetailAuction *bool `json:"wasNonRetailAuction"`
	WasForeclosed       *bool `json:"wasForeclosed"`
	WasREO              *bool `json:"wasREO"`
	WasDefault          *bool `json:"wasDefault"`
}

type GDP

type GDP struct {
	Building Building `json:"building"`
}

type HDPData

type HDPData struct {
	HomeInfo HomeInfo `json:"homeInfo"`
}

type HomeInfo

type HomeInfo struct {
	Zpid                    int64           `json:"zpid"`
	PriceReduction          string          `json:"priceReduction"`
	PriceChange             float32         `json:"priceChange"`
	StreetAddress           string          `json:"streetAddress"`
	Zipcode                 string          `json:"zipcode"`
	City                    string          `json:"city"`
	State                   string          `json:"state"`
	Latitude                float64         `json:"latitude"`
	Longitude               float64         `json:"longitude"`
	Price                   float32         `json:"price"`
	Bathrooms               float32         `json:"bathrooms"`
	Bedrooms                float32         `json:"bedrooms"`
	LivingArea              float32         `json:"livingArea"`
	HomeType                string          `json:"homeType"`
	HomeStatus              string          `json:"homeStatus"`
	DaysOnZillow            int             `json:"daysOnZillow"`
	IsFeatured              bool            `json:"isFeatured"`
	ShouldHighlight         bool            `json:"shouldHighlight"`
	Zestimate               int             `json:"zestimate"`
	TaxAssessedValue        float64         `json:"taxAssessedValue"`
	RentZestimate           int             `json:"rentZestimate"`
	ListingSubType          ListingSubType2 `json:"listing_sub_type"`
	IsUnmappable            bool            `json:"isUnmappable"`
	IsPreforeclosureAuction bool            `json:"isPreforeclosureAuction"`
	HomeStatusForHDP        string          `json:"homeStatusForHDP"`
	PriceForHDP             float32         `json:"priceForHDP"`
	TimeOnZillow            int64           `json:"timeOnZillow"`
	IsNonOwnerOccupied      bool            `json:"isNonOwnerOccupied"`
	IsPremierBuilder        bool            `json:"isPremierBuilder"`
	IsZillowOwned           bool            `json:"isZillowOwned"`
	Currency                string          `json:"currency"`
	Country                 string          `json:"country"`
	LotAreaValue            float32         `json:"lotAreaValue"`
	LotAreaUnit             string          `json:"lotAreaUnit"`
	IsShowcaseListing       bool            `json:"isShowcaseListing"`
}

type HomeInsight

type HomeInsight struct {
	HomeInsights []HomeInsightValues `json:"insights"`
}

type HomeInsightValues

type HomeInsightValues struct {
	Phrases []string `json:"phrases"`
}

type Img

type Img struct {
	URL   string `json:"url"`
	Width int    `json:"width"`
}

type InitialReduxState

type InitialReduxState struct {
	GDP GDP `json:"gdp"`
}

type LatLong

type LatLong struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type ListResult

type ListResult struct {
	Zpid                 string          `json:"zpid"`
	ID                   string          `json:"id"`
	HasImage             bool            `json:"hasImage"`
	AvailabilityCount    int             `json:"availabilityCount"`
	ImgSrc               string          `json:"imgSrc"`
	StatusText           string          `json:"statusText"`
	Address              string          `json:"address"`
	AddressStreet        string          `json:"addressStreet"`
	AddressCity          string          `json:"addressCity"`
	AddressState         string          `json:"addressState"`
	AddressZipcode       string          `json:"addressZipcode"`
	Area                 int64           `json:"area"`
	IsUndisclosedAddress bool            `json:"isUndisclosedAddress"`
	StatusType           string          `json:"statusType"`
	DetailUrl            string          `json:"detailUrl"`
	Price                string          `json:"price"`
	CountryCurrency      string          `json:"countryCurrency"`
	UnformattedPrice     int             `json:"unformattedPrice"`
	LatLong              LatLong         `json:"latLong"`
	BuildingName         string          `json:"buildingName"`
	IsZillowOwned        bool            `json:"isZillowOwned"`
	IsUserClaimingOwner  bool            `json:"isUserClaimingOwner"`
	BrokerName           string          `json:"brokerName"`
	IsUserConfirmedClaim bool            `json:"isUserConfirmedClaim"`
	Relaxed              bool            `json:"relaxed"`
	HdpData              HDPData         `json:"hdpData"`
	Units                []Unit          `json:"units"`
	LotId                int64           `json:"lotId"`
	CarouselPhotos       []CarouselPhoto `json:"carouselPhotos"`
}

type ListingAgent

type ListingAgent struct {
	AssociatedAgentType string `json:"associatedAgentType"`
	MemberFullName      string `json:"memberFullName"`
	MemberStateLicense  string `json:"memberStateLicense"`
}

type ListingOffice

type ListingOffice struct {
	AssociatedOfficeType string `json:"associatedOfficeType"`
	OfficeName           string `json:"officeName"`
}

type ListingSubType

type ListingSubType struct {
	IsFSBA        *bool `json:"isFSBA"`
	IsFSBO        *bool `json:"isFSBO"`
	IsPending     *bool `json:"isPending"`
	IsNewHome     *bool `json:"isNewHome"`
	IsForeclosure *bool `json:"isForeclosure"`
	IsBankOwned   *bool `json:"isBankOwned"`
	IsForAuction  *bool `json:"isForAuction"`
	IsOpenHouse   *bool `json:"isOpenHouse"`
	IsComingSoon  *bool `json:"isComingSoon"`
}

type ListingSubType2

type ListingSubType2 struct {
	IsFSBA        *bool `json:"is_FSBA"`
	IsFSBO        *bool `json:"is_FSBO"`
	IsPending     *bool `json:"is_pending"`
	IsNewHome     *bool `json:"is_newHome"`
	IsForeclosure *bool `json:"is_foreclosure"`
	IsBankOwned   *bool `json:"is_bankOwned"`
	IsForAuction  *bool `json:"is_forAuction"`
	IsOpenHouse   *bool `json:"is_openHouse"`
	IsComingSoon  *bool `json:"is_comingSoon"`
}

type MapBounds

type MapBounds struct {
	Ne Coordinates
	Sw Coordinates
}

type MapBoundsPage

type MapBoundsPage struct {
	East  float64 `json:"east"`
	North float64 `json:"north"`
	South float64 `json:"south"`
	West  float64 `json:"west"`
}

func GetAutocomplete2

func GetAutocomplete2(regionID int, proxyURL *url.URL) (MapBoundsPage, error)

type MapResult

type MapResult struct {
	Zpid                        string  `json:"zpid"`
	Plid                        string  `json:"plid"`
	BuildingName                string  `json:"buildingName"`
	BuildingId                  string  `json:"buildingId"`
	IsBuilding                  bool    `json:"isBuilding"`
	CanSaveBuilding             bool    `json:"canSaveBuilding"`
	RawHomeStatusCd             string  `json:"rawHomeStatusCd"`
	RentalMarketingSubType      string  `json:"rentalMarketingSubType"`
	MarketingStatusSimplifiedCd string  `json:"marketingStatusSimplifiedCd"`
	ImgSrc                      string  `json:"imgSrc"`
	LotId                       int64   `json:"lotId"`
	UnitCount                   int64   `json:"unitCount"`
	MinBeds                     float32 `json:"minBeds"`
	MinBaths                    float32 `json:"minBaths"`
	MinArea                     float32 `json:"minArea"`
	HasImage                    bool    `json:"hasImage"`
	DetailUrl                   string  `json:"detailUrl"`
	StatusType                  string  `json:"statusType"`
	StatusText                  string  `json:"statusText"`
	Price                       string  `json:"price"`
	PriceLabel                  string  `json:"priceLabel"`
	Address                     string  `json:"address"`
	Beds                        int     `json:"beds"`
	Baths                       float64 `json:"baths"`
	Area                        int     `json:"area"`
	LatLong                     LatLong `json:"latLong"`
	HDPData                     HDPData `json:"hdpData"`
	IsUserClaimingOwner         bool    `json:"isUserClaimingOwner"`
	IsUserConfirmedClaim        bool    `json:"isUserConfirmedClaim"`
	Pgapt                       string  `json:"pgapt"`
	Sgapt                       string  `json:"sgapt"`
	ShouldShowZestimateAsPrice  bool    `json:"shouldShowZestimateAsPrice"`
	Has3DModel                  bool    `json:"has3DModel"`
	HasVideo                    bool    `json:"hasVideo"`
	IsHomeRec                   bool    `json:"isHomeRec"`
	HasAdditionalAttributions   bool    `json:"hasAdditionalAttributions"`
	IsFeaturedListing           bool    `json:"isFeaturedListing"`
	IsShowcaseListing           bool    `json:"isShowcaseListing"`
	ListingType                 string  `json:"listingType"`
	IsFavorite                  bool    `json:"isFavorite"`
	Visited                     bool    `json:"visited"`
	Info3String                 string  `json:"info3String"`
	BrokerName                  string  `json:"brokerName"`
	TimeOnZillow                int64   `json:"timeOnZillow"`
}

type MinMax

type MinMax struct {
	Min int `json:"min,omitempty"`
	Max int `json:"max,omitempty"`
}

type MixedSources

type MixedSources struct {
	Webp []Img `json:"webp"`
	JPEG []Img `json:"jpeg"`
}

type MortgageRates

type MortgageRates struct {
	ThirtyYearFixedRate float32 `json:"thirtyYearFixedRate"`
}

type Photo

type Photo struct {
	URL string `json:"url"`
}

type PostingContact

type PostingContact struct {
	Name  string `json:"name"`
	Photo string `json:"photo"`
}

type PriceHistory

type PriceHistory struct {
	Date               string  `json:"date"`
	Time               int64   `json:"time"`
	Price              float32 `json:"price"`
	PricePerSquareFoot float32 `json:"pricePerSquareFoot"`
	PriceChangeRate    float32 `json:"priceChangeRate"`
	Event              string  `json:"event"`
	Source             string  `json:"source"`
	BuyerAgent         Agent   `json:"buyerAgent"`
	SellerAgent        Agent   `json:"sellerAgent"`
}

type PropertyInfo

type PropertyInfo struct {
	ZipID                                 int64                           `json:"zpid"`
	Country                               string                          `json:"country"`
	HdpUrl                                string                          `json:"hdpUrl"`
	Price                                 int64                           `json:"price"`
	Currency                              string                          `json:"currency"`
	Latitude                              float64                         `json:"latitude"`
	Longitude                             float64                         `json:"longitude"`
	Address                               Address                         `json:"address"`
	IsListingClaimedByCurrentSignedInUser *bool                           `json:"isListingClaimedByCurrentSignedInUser"`
	IsCurrentSignedInAgentResponsible     *bool                           `json:"isCurrentSignedInAgentResponsible"`
	HomeStatus                            string                          `json:"homeStatus"`
	Bedrooms                              int                             `json:"bedrooms"`
	Bathrooms                             float32                         `json:"bathrooms"`
	YearBuilt                             int                             `json:"yearBuilt"`
	RentZestimate                         int                             `json:"rentZestimate"`
	Zestimate                             int                             `json:"zestimate"`
	LastSoldPrice                         int                             `json:"lastSoldPrice"`
	AnnualHomeownersInsurance             float32                         `json:"annualHomeownersInsurance"`
	DaysOnZillow                          int                             `json:"daysOnZillow"`
	FavoriteCount                         int                             `json:"favoriteCount"`
	MonthlyHoaFee                         float32                         `json:"monthlyHoaFee"`
	LotSize                               int64                           `json:"lotSize"`
	LotAreaValue                          float32                         `json:"lotAreaValue"`
	LotAreaUnits                          string                          `json:"lotAreaUnits"`
	PageViewCount                         int                             `json:"pageViewCount"`
	TimeOnZillow                          string                          `json:"timeOnZillow"`
	ParcelId                              string                          `json:"parcelId"`
	PropertyTaxRate                       float32                         `json:"propertyTaxRate"`
	BrokerageName                         string                          `json:"brokerageName"`
	Description                           string                          `json:"description"`
	LivingAreaUnitsShort                  string                          `json:"livingAreaUnitsShort"`
	VirtualTourUrl                        string                          `json:"virtualTourUrl"`
	DatePostedString                      string                          `json:"datePostedString"`
	PropertyTypeDimension                 string                          `json:"propertyTypeDimension"`
	IsZillowOwned                         *bool                           `json:"isZillowOwned"`
	ForeclosureJudicialType               string                          `json:"foreclosureJudicialType"`
	AttributionInfo                       AttributionInfo                 `json:"attributionInfo"`
	ResoFacts                             ResoFacts                       `json:"resoFacts"`
	MortgageRates                         MortgageRates                   `json:"mortgageRates"`
	PostingContact                        PostingContact                  `json:"postingContact"`
	ListingSubType                        ListingSubType                  `json:"listingSubType"`
	Listing_sub_type                      ListingSubType2                 `json:"listing_sub_type"`
	ForeclosureTypes                      ForeclosureTypes                `json:"foreclosureTypes"`
	HomeInsights                          []HomeInsight                   `json:"homeInsights"`
	ListedBy                              []listedBy                      `json:"listedBy"`
	PriceHistory                          []PriceHistory                  `json:"priceHistory"`
	TaxHistory                            []TaxHistory                    `json:"taxHistory"`
	Schools                               []School                        `json:"schools"`
	ResponsivePhotosOriginalRatio         []ResponsivePhotosOriginalRatio `json:"responsivePhotosOriginalRatio"`
	ResponsivePhotos                      []ResponsivePhotosOriginalRatio `json:"responsivePhotos"`
}

func FromPropertyID

func FromPropertyID(propertyID int64, proxyURL *url.URL) (PropertyInfo, error)

func FromPropertyURL

func FromPropertyURL(roomURL string, proxyURL *url.URL) (PropertyInfo, error)

func ParseBodyDetailsHome

func ParseBodyDetailsHome(body []byte) (PropertyInfo, error)

type RegionInfo

type RegionInfo struct {
	RegionID      int    `json:"regionId"`
	RegionType    int    `json:"regionType"`
	RegionName    string `json:"regionName"`
	DisplayName   string `json:"displayName"`
	IsPointRegion bool   `json:"isPointRegion"`
}

type RegionState

type RegionState struct {
	RegionInfo   []RegionInfo  `json:"regionInfo"`
	RegionBounds MapBoundsPage `json:"regionBounds"`
}

type ResoFacts

type ResoFacts struct {
	AccessibilityFeatures             []string        `json:"accessibilityFeatures"`
	AdditionalFeeInfo                 string          `json:"additionalFeeInfo"`
	Associations                      []Association   `json:"associations"`
	AssociationFee                    string          `json:"associationFee"`
	AssociationAmenities              []string        `json:"associationAmenities"`
	AssociationFee2                   any             `json:"associationFee2"`
	AssociationFeeIncludes            []string        `json:"associationFeeIncludes"`
	AssociationName                   string          `json:"associationName"`
	AssociationName2                  string          `json:"associationName2"`
	AssociationPhone                  string          `json:"associationPhone"`
	AssociationPhone2                 string          `json:"associationPhone2"`
	BasementYN                        *bool           `json:"basementYN"`
	BuildingName                      string          `json:"buildingName"`
	BuyerAgencyCompensation           string          `json:"buyerAgencyCompensation"`
	BuyerAgencyCompensationType       string          `json:"buyerAgencyCompensationType"`
	Appliances                        []string        `json:"appliances"`
	AtAGlanceFacts                    []AtAGlanceFact `json:"atAGlanceFacts"`
	Attic                             string          `json:"attic"`
	AvailabilityDate                  string          `json:"availabilityDate"`
	Basement                          string          `json:"basement"`
	Bathrooms                         float32         `json:"bathrooms"`
	BathroomsFull                     float32         `json:"bathroomsFull"`
	BathroomsHalf                     float32         `json:"bathroomsHalf"`
	BathroomsOneQuarter               *float32        `json:"bathroomsOneQuarter"`
	BathroomsPartial                  *float32        `json:"bathroomsPartial"`
	BathroomsFloat                    float64         `json:"bathroomsFloat"`
	BathroomsThreeQuarter             *float32        `json:"bathroomsThreeQuarter"`
	Bedrooms                          int             `json:"bedrooms"`
	BodyType                          string          `json:"bodyType"`
	CanRaiseHorses                    *bool           `json:"canRaiseHorses"`
	CarportParkingCapacity            *int            `json:"carportParkingCapacity"`
	CityRegion                        string          `json:"cityRegion"`
	CommonWalls                       string          `json:"commonWalls"`
	CommunityFeatures                 []string        `json:"communityFeatures"`
	CompensationBasedOn               string          `json:"compensationBasedOn"`
	Contingency                       string          `json:"contingency"`
	Cooling                           []string        `json:"cooling"`
	CoveredParkingCapacity            int             `json:"coveredParkingCapacity"`
	CropsIncludedYN                   *bool           `json:"cropsIncludedYN"`
	CumulativeDaysOnMarket            string          `json:"cumulativeDaysOnMarket"`
	DevelopmentStatus                 string          `json:"developmentStatus"`
	DoorFeatures                      []string        `json:"doorFeatures"`
	Electric                          []string        `json:"electric"`
	Elevation                         string          `json:"elevation"`
	ElevationUnits                    string          `json:"elevationUnits"`
	EntryLevel                        string          `json:"entryLevel"`
	EntryLocation                     string          `json:"entryLocation"`
	Exclusions                        string          `json:"exclusions"`
	FeesAndDues                       []FeesAndDues   `json:"feesAndDues"`
	Fencing                           string          `json:"fencing"`
	FireplaceFeatures                 []string        `json:"fireplaceFeatures"`
	Fireplaces                        int             `json:"fireplaces"`
	Flooring                          []string        `json:"flooring"`
	FoundationArea                    string          `json:"foundationArea"`
	Furnished                         *bool           `json:"furnished"`
	GarageParkingCapacity             int             `json:"garageParkingCapacity"`
	Gas                               string          `json:"gas"`
	GreenBuildingVerificationType     string          `json:"greenBuildingVerificationType"`
	GreenEnergyEfficient              []string        `json:"greenEnergyEfficient"`
	GreenEnergyGeneration             string          `json:"greenEnergyGeneration"`
	GreenIndoorAirQuality             string          `json:"greenIndoorAirQuality"`
	GreenSustainability               string          `json:"greenSustainability"`
	GreenWaterConservation            []string        `json:"greenWaterConservation"`
	HasAssociation                    *bool           `json:"hasAssociation"`
	HasAttachedGarage                 *bool           `json:"hasAttachedGarage"`
	HasAttachedProperty               *bool           `json:"hasAttachedProperty"`
	HasCooling                        *bool           `json:"hasCooling"`
	HasCarport                        *bool           `json:"hasCarport"`
	HasElectricOnProperty             *bool           `json:"hasElectricOnProperty"`
	HasFireplace                      *bool           `json:"hasFireplace"`
	HasGarage                         *bool           `json:"hasGarage"`
	HasHeating                        *bool           `json:"hasHeating"`
	HasLandLease                      *bool           `json:"hasLandLease"`
	HasOpenParking                    *bool           `json:"hasOpenParking"`
	HasSpa                            *bool           `json:"hasSpa"`
	HasPrivatePool                    *bool           `json:"hasPrivatePool"`
	HasView                           *bool           `json:"hasView"`
	HasWaterfrontView                 *bool           `json:"hasWaterfrontView"`
	Heating                           []string        `json:"heating"`
	HighSchool                        string          `json:"highSchool"`
	HighSchoolDistrict                string          `json:"highSchoolDistrict"`
	HoaFee                            string          `json:"hoaFee"`
	HoaFeeTotal                       string          `json:"hoaFeeTotal"`
	HomeType                          string          `json:"homeType"`
	HorseAmenities                    string          `json:"horseAmenities"`
	HorseYN                           *bool           `json:"horseYN"`
	InteriorFeatures                  []string        `json:"interiorFeatures"`
	IrrigationWaterRightsAcres        *float64        `json:"irrigationWaterRightsAcres"`
	IrrigationWaterRightsYN           *bool           `json:"irrigationWaterRightsYN"`
	IsSeniorCommunity                 *bool           `json:"isSeniorCommunity"`
	LandLeaseAmount                   *float64        `json:"landLeaseAmount"`
	LandLeaseExpirationDate           string          `json:"landLeaseExpirationDate"`
	LaundryFeatures                   []string        `json:"laundryFeatures"`
	Levels                            string          `json:"levels"`
	ListingId                         string          `json:"listingId"`
	LotFeatures                       []string        `json:"lotFeatures"`
	LotSize                           string          `json:"lotSize"`
	LivingQuarters                    []string        `json:"livingQuarters"`
	MainLevelBathrooms                *float32        `json:"mainLevelBathrooms"`
	MainLevelBedrooms                 *int            `json:"mainLevelBedrooms"`
	MarketingType                     string          `json:"marketingType"`
	MiddleOrJuniorSchool              string          `json:"middleOrJuniorSchool"`
	MiddleOrJuniorSchoolDistrict      string          `json:"middleOrJuniorSchoolDistrict"`
	Municipality                      string          `json:"municipality"`
	NumberOfUnitsInCommunity          *int            `json:"numberOfUnitsInCommunity"`
	OfferReviewDate                   string          `json:"offerReviewDate"`
	OnMarketDate                      int64           `json:"onMarketDate"`
	OpenParkingCapacity               *int            `json:"openParkingCapacity"`
	OtherEquipment                    []string        `json:"otherEquipment"`
	OtherFacts                        []string        `json:"otherFacts"`
	OtherParking                      string          `json:"otherParking"`
	OwnershipType                     string          `json:"ownershipType"`
	ParkingCapacity                   int             `json:"parkingCapacity"`
	ParkingFeatures                   []string        `json:"parkingFeatures"`
	PatioAndPorchFeatures             []string        `json:"patioAndPorchFeatures"`
	PoolFeatures                      []string        `json:"poolFeatures"`
	PricePerSquareFoot                int             `json:"pricePerSquareFoot"`
	RoadSurfaceType                   []string        `json:"roadSurfaceType"`
	RoofType                          string          `json:"roofType"`
	Rooms                             []Room          `json:"rooms"`
	SecurityFeatures                  []string        `json:"securityFeatures"`
	Sewer                             []string        `json:"sewer"`
	SpaFeatures                       []string        `json:"spaFeatures"`
	SpecialListingConditions          string          `json:"specialListingConditions"`
	Stories                           *int            `json:"stories"`
	StoriesTotal                      *int            `json:"storiesTotal"`
	SubAgencyCompensation             string          `json:"subAgencyCompensation"`
	SubAgencyCompensationType         string          `json:"subAgencyCompensationType"`
	SubdivisionName                   string          `json:"subdivisionName"`
	TotalActualRent                   *float64        `json:"totalActualRent"`
	TransactionBrokerCompensation     string          `json:"transactionBrokerCompensation"`
	TransactionBrokerCompensationType string          `json:"transactionBrokerCompensationType"`
	Utilities                         []string        `json:"utilities"`
	View                              []string        `json:"view"`
	WaterSource                       []string        `json:"waterSource"`
	WaterBodyName                     string          `json:"waterBodyName"`
	WaterfrontFeatures                []string        `json:"waterfrontFeatures"`
	WaterView                         string          `json:"waterView"`
	WaterViewYN                       *bool           `json:"waterViewYN"`
	WindowFeatures                    []string        `json:"windowFeatures"`
	YearBuilt                         int             `json:"yearBuilt"`
	Zoning                            string          `json:"zoning"`
	ZoningDescription                 string          `json:"zoningDescription"`
	AboveGradeFinishedArea            string          `json:"aboveGradeFinishedArea"`
	AdditionalParcelsDescription      string          `json:"additionalParcelsDescription"`
	ArchitecturalStyle                string          `json:"architecturalStyle"`
	BelowGradeFinishedArea            string          `json:"belowGradeFinishedArea"`
	BuilderModel                      string          `json:"builderModel"`
	BuilderName                       string          `json:"builderName"`
	BuildingArea                      string          `json:"buildingArea"`
	BuildingAreaSource                string          `json:"buildingAreaSource"`
	BuildingFeatures                  string          `json:"buildingFeatures"`
	ConstructionMaterials             []string        `json:"constructionMaterials"`
	ExteriorFeatures                  []string        `json:"exteriorFeatures"`
	FoundationDetails                 []string        `json:"foundationDetails"`
	FrontageLength                    string          `json:"frontageLength"`
	FrontageType                      string          `json:"frontageType"`
	HasAdditionalParcels              *bool           `json:"hasAdditionalParcels"`
	HasPetsAllowed                    *bool           `json:"hasPetsAllowed"`
	HasRentControl                    *bool           `json:"hasRentControl"`
	HasHomeWarranty                   *bool           `json:"hasHomeWarranty"`
	Inclusions                        []string        `json:"inclusions"`
	IncomeIncludes                    string          `json:"incomeIncludes"`
	IsNewConstruction                 *bool           `json:"isNewConstruction"`
	ListingTerms                      string          `json:"listingTerms"`
	LivingAreaRange                   string          `json:"livingAreaRange"`
	LivingAreaRangeUnits              string          `json:"livingAreaRangeUnits"`
	LivingArea                        string          `json:"livingArea"`
	LotSizeDimensions                 string          `json:"lotSizeDimensions"`
	NumberOfUnitsVacant               *int            `json:"numberOfUnitsVacant"`
	OtherStructures                   []string        `json:"otherStructures"`
	Ownership                         string          `json:"ownership"`
	ParcelNumber                      string          `json:"parcelNumber"`
	PropertyCondition                 string          `json:"propertyCondition"`
	PropertySubType                   []string        `json:"propertySubType"`
	StructureType                     string          `json:"structureType"`
	Topography                        string          `json:"topography"`
	Vegetation                        []string        `json:"vegetation"`
	WoodedArea                        string          `json:"woodedArea"`
	YearBuiltEffective                *int            `json:"yearBuiltEffective"`
	VirtualTour                       string          `json:"virtualTour"`
	ElementarySchool                  string          `json:"elementarySchool"`
	ElementarySchoolDistrict          string          `json:"elementarySchoolDistrict"`
	ListAOR                           string          `json:"listAOR"`
}

type ResponsivePhotosOriginalRatio

type ResponsivePhotosOriginalRatio struct {
	MixedSources MixedSources `json:"mixedSources"`
}

type Result

type Result struct {
	ID        string   `json:"id,omitempty"`
	RegionId  int      `json:"regionId,omitempty"`
	SubType   string   `json:"subType,omitempty"`
	RegionIds []string `json:"regionIds,omitempty"`
}

func GetAutocomplete1

func GetAutocomplete1(query string, proxyURL *url.URL) ([]Result, error)

type Room

type Room struct {
	Aea                   string `json:"area"`
	Description           string `json:"description"`
	Dimensions            string `json:"dimensions"`
	Level                 string `json:"level"`
	Features              string `json:"features"`
	RoomArea              string `json:"roomArea"`
	RoomAreaSource        string `json:"roomAreaSource"`
	RoomAreaUnits         string `json:"roomAreaUnits"`
	RoomDescription       string `json:"roomDescription"`
	RoomDimensions        string `json:"roomDimensions"`
	RoomFeatures          string `json:"roomFeatures"`
	RoomLength            string `json:"roomLength"`
	RoomLengthWidthSource string `json:"roomLengthWidthSource"`
	RoomLengthWidthUnits  string `json:"roomLengthWidthUnits"`
	RoomLevel             string `json:"roomLevel"`
	RoomType              string `json:"roomType"`
	RoomWidth             string `json:"roomWidth"`
}

type School

type School struct {
	Distance           float32 `json:"distance"`
	Name               string  `json:"name"`
	Rating             int     `json:"rating"`
	Level              string  `json:"level"`
	StudentsPerTeacher string  `json:"studentsPerTeacher"`
	Assigned           string  `json:"assigned"`
	Grades             string  `json:"grades"`
	Link               string  `json:"link"`
	Type               string  `json:"type"`
	Size               string  `json:"size"`
	TotalCount         string  `json:"totalCount"`
	IsAssigned         string  `json:"isAssigned"`
}

type SearchPageSeoObject

type SearchPageSeoObject struct {
	BaseURL         string `json:"baseUrl"`
	WindowTitle     string `json:"windowTitle"`
	MetaDescription string `json:"metaDescription"`
}

type SearchRentalFilters

type SearchRentalFilters struct {
	MonthlyPayment         *MinMax     `json:"monthlyPayment"`
	PetsAllowed            interface{} `json:"petsAllowed"`
	RentalAvailabilityDate interface{} `json:"rentalAvailabilityDate"`
}

type TaxHistory

type TaxHistory struct {
	Time              int64   `json:"time"`
	TaxPaid           float32 `json:"taxPaid"`
	TaxIncreaseRate   float32 `json:"taxIncreaseRate"`
	Value             float32 `json:"value"`
	ValueIncreaseRate float32 `json:"valueIncreaseRate"`
}

type Unit

type Unit struct {
	Price   string `json:"price"`
	Beds    string `json:"beds"`
	ForRent bool   `json:"roomForRent"`
}

type Unit2

type Unit2 struct {
	UnitNumber                       string  `json:"unitNumber"`
	Zpid                             string  `json:"zpid"`
	HousingConnector                 bool    `json:"housingConnector"`
	HousingConnectorExclusive        bool    `json:"housingConnectorExclusive"`
	Beds                             int     `json:"beds"`
	VrModel                          *string `json:"vrModel"`
	AvailableFrom                    string  `json:"availableFrom"`
	HasApprovedThirdPartyVirtualTour bool    `json:"hasApprovedThirdPartyVirtualTour"`
	Price                            int     `json:"price"`
	MinPrice                         int     `json:"minPrice"`
	MaxPrice                         int     `json:"maxPrice"`
	//ThirdPartyVirtualTour            *string `json:"thirdPartyVirtualTour"`
	UnitVRModel *string `json:"unitVRModel"`
	Sqft        int     `json:"sqft"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL