Scraping the Pinterest API
Legally scrape Pinterest without violating their Terms of Service using a little-known technique involving HAR files and our Pinterest scraper. You’ll be recording your network traffic as you browse Pinterest (while obeying their Terms of Service) and then performing a scrape on the recording instead of the actual website, so the recording cannot be governed under the Pinterest Terms of Service.
Our approach differs from other web scraping tools that collect data through automatically accessing the Pinterest website, which typically violates Terms of Services and can be very unreliable. The HAR file approach allows Pinterest scraping for easily extractable data such as user profile posts, Pinterest image URLs, Pinterest profiles and other social media information from Pinterest users.
1. Browse Pinterest Data
Go to any Pinterest Page or search results page on Pinterest containing the items you want to scrape. Then right click somewhere on the page and hit “Inspect” to open up developer tools and begin recording your web traffic.
Now refresh the page (to force Pinterest to re-send its data now that you’re recording) and then scroll down through all the results you want to capture. Keep browsing around all of the Pins you want to scrape or see the video on this page for a more detailed walkthrough.
2. Export a HAR File
Once you’re done browsing, go to the “Network” tab in developer tools and click the down arrow labeled “Export HAR…” to download a HAR file containing the raw data of the Pins (or related data) you just browsed on Pinterest.
Then upload that file to the HAR File Web Scraper which will parse out the data and group together similar requests so you can download related response data together into the same CSV file.
3. Download Pinterest Data
When you find the group from the HAR parse page containing the data you want, click “Parse Group” to extract out downloadable collections. You can then save these to your computer as CSV files and use them with any spreadsheet program like Excel.
Please note that you’ll only be able to extract basic information from the “Pins”, basically the limited data that you saw while browsing around the site. You will not be able to scrape the details behind the pins, as you would need to manually click on each and every pin which is not feasible. Regardless, scraping bulk search & browse results from Pinterest should give you an overall good idea of the data you’re looking at and perhaps provide some content inspiration.