Requirements
A screenshot API
First of all, you need access to any screenshot API, but I will use the ScreenshotOne API as an example in this tutorial. It requires a bit of coding skills or you can use our Zapier integration. Also, you can reach out to us at hey@screenshotone.com and we can see if we can render screenshots for you.
Sign up to the ScreenshotOne API and get the access key to send API requests like:
Residential proxies
Social media often block requests that come from servers and not from computers that have IP addresses like regular users. To bypass that limitation, it is recommended to use residential proxies. There is a huge variety of proxy providers you can choose from, e.g. Smartproxy, Geonode, and others.
When you use them, almost all the requests you send look like you sent them from the regular home computer. The ScreenshotOne API supports specifying proxies with the proxy option.
Sign up to one of the proxy providers and get the link to an HTTP proxy, we can use it in the API request like:
https://api.screenshotone.com/take?access_key=
Authentication and cookies
Having proxies is not enough. Some social media websites will block rendering screenshots of profiles and company pages even for residential proxies and will require a user to log in.
For example, Facebook and LinkedIn often require you to log in, even when you use residential proxies. In that case, you need to log in and then copy an HTTP cookie and reuse it when sending requests.
With the ScreenshotOne API, it is easy, you just need to set the cookie option when executing requests.
To copy any cookie value in Chrome, open DevTools, then go to the Application tab and choose Cookies in the sidebar. Then open the site domain and you can see cookies by names.
Each social media requires a set of cookies for authentication. You will need to copy these and use them with the ScreenshotOne API requests.
Screenshot of social media profiles
Once you have a ScreenshotOne access key, residential proxy access, and can fetch a cookie for any website, we can go and make screenshots for them. I will share one by one, how you can do it and what are the nuances of each social media.
How to screenshot Instagram pages
To screenshot Instagram pages, it is enough to use only residential rotating proxies, and don’t forget to block cookie cookie banners by using block_cookie_banners and block_banners_by_heuristics:
How to screenshot Facebook pages
The Facebook profile or company pages are not that hard to screenshot, either, the same as Instagram pages, it is enough to use only residential rotating proxies, and don’t forget to block cookie cookie banners by using block_cookie_banners and block_banners_by_heuristics:
How to screenshot LinkedIn pages
For LinkedIn page screenshots, it is a bit tricky, but you will need to sign in and use cookies to screenshot LinkedIn profiles or company pages.
To do that, as shown earlier, copy li_at cookie values and pass them, when screenshotting web pages. Don’t use rotating residential proxies, use a sticky residential proxy with a static IP address, but be aware that if you violate the LinkedIn terms of service, you might be blocked. Please, seek legal advice before doing that:
Is it legal to scrape or screenshot social media profiles?
In general, the legality of scraping or screenshotting social media profiles depends on local laws, the purpose of data use, and the social media platform’s terms of service.
Laws vary by region, with areas like the EU having strict data protection regulations. Using scraped data, especially for commercial purposes without consent, often breaches legal and ethical boundaries. Also, automated scraping may violate a platform’s terms, leading to potential legal consequences.
ScreenshotOne is a tool and is not liable for user actions. It’s essential to adhere to local laws and seek legal advice if necessary. Always consider the legal implications of scraping or screenshotting social media content.
Summary
It is not that hard to render screenshots of social media pages with the right tools but it requires a bit of technical skills to combine those tools and make it work. In case if you have any questions, or proposals or want to report an issue, please, feel free to reach out at support@screenshotone.com.