How to Scrape Instagram into Airtable using RapidAPI

Apr 11, 2024Andy Cloke

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.

What is RapidAPI?

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.

Add Data Fetcher Extension

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.

Group 1Data Fetcher Sign Up .png

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.

click-create-your-first-request.png

For the Application, select Custom.

custom-application-selected.png

Scrape Instagram into Airtable using RapidAPI

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.

rapidapi instagram scraper api subscribe.png

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.

instagram scraper api curl command.png

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.

instagram username parameter.png

Give your request a helpful name, like "Scrape Instagram". Then click the Save & Run button in the bottom right-hand corner.

scrape instagram request save and run.png

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:

  • Biography
  • Follower count
  • Following
  • Hd profile pic url info url

You can also select any other fields that you want to scrape from Instagram into Airtable. Once you are happy, click Save & Run.

scrape instagram response field mapping .png

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!

Send Airtable Data to RapidAPI

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.

instagram table of usernames.png

In Data Fetcher, under Parameters, remove the username you added earlier, then select the + icon on the right-hand side of the input.

instagram username cell reference button.png

On the window that opens, select Username for the Field option. Then click Confirm.

table reference dialog instagram username.png

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.

instagram profile data imported into Airtable.png

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.

Other Recent Posts

How to Import Data into Airtable Without Duplicates

How to Import Data into Airtable Without Duplicates

Oct 7, 2024

Zayyad Muhammad Sani

Custom RequestsData Fetcher
How to Connect to an OAuth 1.0 API in Airtable

How to Connect to an OAuth 1.0 API in Airtable

Sep 20, 2024

Zayyad Muhammad Sani

Custom Requests
Connect to the Anthropic (Claude) API in Airtable

Connect to the Anthropic (Claude) API in Airtable

Sep 5, 2024

Zayyad Muhammad Sani

Anthropic