![Tripadvisor Scraper avatar](https://images.apifyusercontent.com/orCHAEw3tpe7Rx4ip5pr8wJwPoKMRqZKMAi6GOQTccI/rs:fill:92:92/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9kYkV5TUJyaW9nOTVGdjhDVy9pcERqRHl5ZWk2OEtuM1BGeC1UcmlwYWR2aXNvcl9TY3JhcGVyLnBuZw.webp)
Pay $3.00 for 1,000 results
![Tripadvisor Scraper](https://images.apifyusercontent.com/orCHAEw3tpe7Rx4ip5pr8wJwPoKMRqZKMAi6GOQTccI/rs:fill:92:92/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9kYkV5TUJyaW9nOTVGdjhDVy9pcERqRHl5ZWk2OEtuM1BGeC1UcmlwYWR2aXNvcl9TY3JhcGVyLnBuZw.webp)
Tripadvisor Scraper
Pay $3.00 for 1,000 results
This unofficial Tripadvisor API is a data extraction tool able to get data on hotels, restaurants, things to do, vacation rentals, attractions, tours, and public trips. Get pricing, contact details, amenities, awards, ratings, and more. Download your data in Excel, JSON, CSV, and other formats.
Null fields
Closed
Is it possible to esclude "null" fields from scraping? Example, if email field is empty do not fetch that record. Thanks.
![lukas.prusa avatar](https://apify-image-uploads-prod.s3.amazonaws.com/KNRBu8ZQbXJs57TCd/gMDJPyh4HJ53yis3n-rsz_1lukas_about_small.jpg)
Hi Pasquale,
thanks a lot for opening this issue! No, this is not directly possible in this Actor alone.
We want to keep the null
fields in the output to better let users understand what the Actor should return. It also keeps the output constant and not changing constantly.
Solution for you
If you wish to have the null
fields removed, you can use an utility Actor like the Merge, Dedup & Transform Datasets to modify the finished dataset.
In the dataset transform function paste in this code to remove the null
fields:
1(items) => { 2 return JSON.parse(JSON.stringify(items), (key, value) => { 3 if (value == null) return undefined; 4 return value; 5 }); 6};
You can also connect the Actors together via an Actor to Actor integration ;)
I hope this helps, happy scraping!
- 205 monthly users
- 43 stars
- 97.3% runs succeeded
- 1.2 days response time
- Created in Nov 2019
- Modified about 9 hours ago