In this tutorial, we will scrape Instagram profile data into Airtable using the Data Fetcher extension and RapidAPI. Although we'll be working with APIs, this tutorial is 100% no-code.
RapidAPI is an API marketplace that offers 14,000+ public APIs. These APIs provide data on social media sites, finance, sports, ecommerce and lots more.
For this tutorial, we'll be using this Instagram Scraper API, but you can use the same approach to connect to any API from the Rapid API hub.
To connect to RapidAPI, we will use the free Data Fetcher extension. Add the Data Fetcher extension to your base from the Airtable marketplace.
After the extension launches, sign up for a free Data Fetcher account by entering a password and clicking Sign up for free or sign up with Google.
Requests in Data Fetcher are how you connect to any API in Airtable. On the home screen of the Data Fetcher extension, click Create your first request.
For the Application, select Custom.
RapidAPI is a different service to Data Fetcher, so you will need to sign up to RapidAPI here. Some APIs on RapidAPI are free and some are paid. This Instagram Scraper API is a paid one, although it has a generous free tier we can use for testing.
Go to the Instagram Scraper pricing page and "subscribe" to the free plan.
Back on Instagram Scraper API endpoints page, make sure the Info (details & contacts) endpoint is selected on the left-hand side.
Under Code Snippets on the right-hand side, change the type of code displayed to Shell > cURL.
Click Copy Code to copy this curl command. Back in the Data Fetcher extension, paste the curl command directly into the URL input. You should see a popup confirming that the curl command was imported into the request.
Under Parameters, change the username to the Instagram profile you want to scrape.
Give your request a helpful name, like "Scrape Instagram". Then click the Save & Run button in the bottom right-hand corner.
The request will run and the Response Field Mapping will open. There is where you select which Instagram fields from RapidAPI to import into Airtable. Click Deselect all to deselect all the fields. Then, user the Find field search bar find and select the following fields:
You can also select any other fields that you want to scrape from Instagram into Airtable. Once you are happy, click Save & Run.
The new fields will be created, and the data will be imported into Airtable. You can run the request again to get the latest data available in the Instagram Scraper API. You won't need to set up the Response Field Mapping every time!
We've scraped Instagram into Airtable for one profile, but what if we want to fetch data for a list of Instagram profiles. We can do this by creating a table reference in Data Fetcher.
First, rename the table's primary field to "Username" and populate it with some Instagram usernames.
In Data Fetcher, under Parameters, remove the username you added earlier, then select the + icon on the right-hand side of the input.
On the window that opens, select Username for the Field option. Then click Confirm.
The username_or_id_or_url
parameter will now have a reference to the "Username" field in Airtable. Click Save & Run again to scrape Instagram profile data for every username in your table.
In this tutorial, we've learnt that we can run any RapidAPI request by grabbing the curl command and importing it into Data Fetcher. This means you can connect to any of the 1000s of APIs on the RapidAPI hub in Airtable without code!
If you want to scrape Instagram into Airtable automatically, you can upgrade to a paid Data Fetcher plan and schedule the request.
Dec 10, 2024
•Andy Cloke
•WebflowWhalesyncOct 7, 2024
•Zayyad Muhammad Sani
•Custom RequestsData FetcherSep 20, 2024
•Zayyad Muhammad Sani
•Custom Requests