Are email addresses and phone numbers presented in Shiny Apps susceptible to scraping?

I am developing a Shiny App that presents data from multiple data providers. The tabular information presented includes email addresses and phone numbers of data providers to allow the App users to contact the data providers with specific questions. However, I do not want the data providers to be spammed by scraping bots.

Are email addresses and phone numbers presented in Shiny Apps susceptible to scraping? If so, are there recommendations for preventing scraping?

I'm not an expert, but I think that, yes, they would almost certainly be susceptible for scraping. You will probably need to be very careful about displaying users' contact information in the application as the information may be protected/require different procedures in certain jurisdictions. Are all of your data providers willing to be contacted in this manner?

If you really want the users' to be contactable, why not create some sort of form that visitors to the app can fill in which sends their question to the data provider. This may let you hide the contact information from the user, control the format of the email that is sent, and potentially combat spam/abuse if you put the email addresses in plain text in the app itself.

1 Like

If you're comfortable with blending JavaScript into your app, you could require a reCAPTCHA test to get contact info.

It's much less convenient to scrape Shiny apps vs many other web pages, because generally the page doesn't actually contain any data when it's initially rendered. Without executing JavaScript, you won't get any reactives to execute and data to be filled in. That said, if someone is specifically targeting your Shiny app for scraping, it is still possible by writing a script in something like Selenium. If that's the case then the other suggestions on this thread make sense to me.

1 Like

Thank you all for your help! I really appreciate it!