cermak-petr / actor-zillow-api-scraper

Apify actor for extracting data about homes from Zillow.com using it's internal API.
https://apify.com/petr_cermak/zillow-api-scraper
Apache License 2.0
46 stars 40 forks source link

Zestimate #16

Closed Hprg closed 2 years ago

Hprg commented 3 years ago

How do we get the output of Zestimate?

zpelechova commented 3 years ago

Hi, just add:

async ({ item, data }) => {
  item.zestimate = data.zestimate; // add new array data
  return item; // need to return the item here, otherwise your dataset will be empty
}

to Extend output function.

Hprg commented 3 years ago

I have added them to the extended output but returning error.

(data) => { return {}; }async ({ item, data }) => { item.zestimate = data.zestimate; // add new array data return item; // need to return the item here, otherwise your dataset will be empty }

Hprg commented 3 years ago

I just need to extract the zesitmate and Parcel number. Thank you

zpelechova commented 3 years ago

I have it like this and it works... It should be similar with the parcel number

image

pocesar commented 3 years ago

note that this new format requires beta version

Hprg commented 3 years ago

Thank you for your help I have put the estimate in and its working but when I do the parcel number nothing comes up. This is what I am entering

async ({ item, data }) => { item.zestimate = data.zestimate; // add new array data return item; // need to return the item here, otherwise your dataset will be empty }; async ({ item, data }) => { item.parcelnumber = data.parcelnumber; // add new array data return item; // need to return the item here, otherwise your dataset will be empty }

pocesar commented 3 years ago

@Hprg that's not valid code, you need to use:

async ({ item, data }) => {
  item.zestimate = data.zestimate; // add new array data
  item.parcelnumber = data.parcelNumber;

  return item; // need to return the item here, otherwise your dataset will be empty
}