HasData
Back to all posts

How to Build a Zapier Web Scraper Without Code

Scraping is a very useful tool in almost any field. If you need data to compare your and your competitors’ prices, or if you want to collect leads, you’ll get the job done faster if you use scraping tools.

However, ways to create scrapers usually come down to two options. Use off-the-shelf universal tools, such as Chrome extensions, or write your own. In the first case, you will be very limited in what you can do, and in the second, you will need programming skills.

But there is a way to build a scraper for your own needs without programming knowledge. Zapier is a no-code automation platform that connects several thousand applications, and one of the things it can connect is a scraping API to the services that store the data.

Where Zapier Stops

Zapier moves data between services, and that framing decides what it can do for scraping. Checked against Zapier’s own pricing and task documentation today:

The jobWho does itWhat it costs
Trigger a run on a schedule or eventZapiernothing, triggers are free
Fetch a page past blocksHasDataHasData credits
Parse HTML into fieldsHasData extraction rulesincluded in the request
Write rows to Google SheetsZapier1 task per action step
Summarize or classify with ChatGPTZapier plus OpenAI1 task, plus OpenAI usage

The numbers around that table set the budget. The free plan carries 100 tasks a month and two-step Zaps only, which fits a proof of concept and little else. Paid plans start at $19.99 a month billed yearly and unlock multi-step Zaps, the kind every workflow below uses. A task is one successful action step, so a three-step Zap that fires on 50 pages spends 100 tasks, and failed steps stay free.

Every parser in these workflows belongs on the scraping side, because nothing in Zapier’s built-in tools takes a CSS selector. The split that works keeps fetching and extraction on the scraping API and Zapier on what it does well, the plumbing between services.

Creating Your First Zapier Web Scraper

Zapier provides the ability to create automated “zaps” consisting of triggers and actions.

Triggers are events or conditions that trigger the execution of a zap. For example, a new email, clicking a link, creating a new entry in Google spreadsheets, or receiving a new order from an online store.

Actions are tasks or operations that must be performed in response to triggers. For example, sending a notification to a cell phone, adding data to a table, or to a CRM system.

So, let’s create our first zap. To do this, go to the Zapier website and sign up. After that, the site will ask you to create your first zap, agree, and get started.

Add a trigger

The first thing we need to do is add a trigger. A trigger can be any action, such as a letter in the mail or a new row in a table, or we can use a webhook.

It all starts with a trigger. Look at the template that Zapier automatically generates when you create a zap. Here you see 2 steps, and the first is marked as a trigger.

Zap editor canvas with two blank steps, the first labeled Trigger

Click on it to change the trigger. We will choose schedule because it is very convenient for simple zaps. When you use a schedule, you can be sure that your zap will run at the frequency you want.

Zapier app picker with Schedule in the built-in tools column

After selecting a schedule as the trigger for your zap, you will need to decide on the frequency at which you want it to run. We will choose once a day as an example.

Trigger event dropdown of Schedule by Zapier with Every Day highlighted

Zapier also allows you to choose whether you want your zap triggered on weekends or not. If you select no, it will only run Monday through Friday. Then select the time at which the Zap will be performed.

Time of Day picker of the Every Day trigger with 9:00 AM selected

This completes the configuration of the trigger and you can check if it works correctly.

Test tab of the trigger with the Test trigger button

If the result is correct, you can go on to the next step of creating your zap. And if not, you can try to test the trigger again. If that doesn’t help, try to perform all the steps again. Now let’s see how to build a web scraper using Zapier and HasData. To do this, let’s complete the trigger and create the action.

Get HasData API key

Before we add the action, let’s get the data we’ll need when using it. You will need your unique API key to work with our web scraping API.

Sign up on our website with the “Try for Free” button. The trial needs an email and a password, no card. After you confirm the email, the dashboard opens with your API key, your credit balance, and usage statistics. The Scrapers tab next to it holds no-code scrapers for popular sites.

HasData dashboard on the API Keys page, with the Default key row highlighted

So, copy your API key and return to creating our Zap.

Connecting HasData API to Zapier

Using our API allows you to automate retrieving data from web pages and Google Maps and collect information from Google search pages. This can be a helpful tool for various tasks, including data parsing, lead generation, web page monitoring, and gathering information for analysis.

So, similar to the trigger, let’s change the action. Use the search to find HasData.

Action search in Zapier returning the HasData app

The HasData app exposes each scraper as its own action event, from Amazon and Zillow listings to Google Maps business data (we covered the Maps flow in a separate article) and Google SERP results. The universal one, and the one this guide uses, is “Web Scraper - Extract Content From URL”. It fetches any page and returns its HTML, text, or specific elements picked by CSS selectors.

Action event list of the HasData app with Web Scraper - Extract Content From URL highlighted

Now you need to connect your HasData account to Zapier. Click “Sign in” next to the Account field, and a connect window opens asking for the API key from your dashboard. Paste it and click Connect. You can always unlink the account from the Zap or connect another one.

HasData connect window in Zapier with the required API Key field

Now you will see the name of your account instead of the connection field, which means that you have successfully connected your HasData account to Zapier.

HasData step setup with the account connected

Once your account is connected, you can move on to the next step to learn how to scrape websites.

Every field carries its own description in the editor, so this walkthrough stays on the required ones and the few that come up most. The rest can stay empty.

And the first field you need to fill out is a link to the target site you want to scrape data from. The Configure tab also shows the Proxy Type and Proxy Country fields right below, which we return to in a moment.

Configure tab of the HasData step with the URL field highlighted

This field is required, so the step will not run without it.

Specify Extraction Rules

The Extraction Rules field lets you get specific data from a page rather than all of its HTML code. It takes a JSON object where each key is the name you want in the output and each value is a CSS selector. For example, {"descriptions": "p"} returns the text of every <p> tag on the page under the descriptions key.

One worked example makes the format familiar, so let’s write Extraction Rules for the data from this demo site.

Find CSS Selectors

First, we need to find the CSS selectors for the elements we want to get. To do this, go to the page and open DevTools (F12 or right-click on the screen in space and select Inspect). All the code of the page is displayed here. To find out the CSS selectors of each element, we need to analyze them.

To do this, let’s use the built-in features of DevTools. Select the element search function and simply select the element you want to find the CSS selector.

The DevTools element picker in three numbered steps, from the picker icon to a hovered product card labelled div.product-thumb and the matching node open in the Elements panel

Let’s select each element and remember the tags where they are.

DevTools Elements panel over a demo store product card, with the h4 title link, p description, and span price classes highlighted

Here, we can see that all the necessary data is stored in the parent tag “div” with the class name “col,” which contains all the products on the page. It includes the following information:

  1. The div.image > a > img @src CSS selector holds the product image. With a selector as generic as img @src, we would get every image on the page instead.

  2. The a tag contains the product link in the href attribute.

  3. The h4 tag contains the product title.

  4. The p tag contains the product description.

  5. Prices are stored in span tags with three classes:

    5.1. price-old for the original price.

    5.2. price-new for the discounted price.

    5.3. price-tax for the tax.

Now that we know where the information we need is stored, we can return to Zapier and Extraction Rules.

Put CSS Selectors to Extraction Rules

Choose descriptive names for each element and provide their CSS selectors as one JSON object. For the demo store, titles, descriptions, and discounted prices come out with:

{"title": "h4", "description": "p", "price": "span.price-new"}

To pull an attribute instead of the element text, add it after the selector with an @ sign, like "image": "div.image img @src". If you’re unfamiliar with how to construct CSS selectors or are unsure what they are, you can read our article on CSS selectors to understand better.

Extraction Rules field with a JSON object mapping title, description, and price to CSS selectors

Now we will only get the information we need.

Change Proxy

This is an optional step so you can skip it. Proxy Type switches between datacenter and residential exits, and if the website provides different information for different countries, Proxy Country picks the country you want results from.

Proxy Type and Proxy Country fields of the HasData step, set to datacenter and US

If you skip this step, the default values of the datacenter USA proxy will be used.

Test the result

You can fill in the rest of the fields as you see fit, with one warning. The Output Format field offers json, html, markdown, and text, and the last two make the API answer with plain text instead of JSON, which the Zapier step cannot parse, so the test fails. Leave Output Format empty here and pick the data you need from the JSON response instead.

The Test tab first shows the exact request the step is about to send, so you can check every value before spending a credit.

Test preview listing the request that will be sent to HasData

When you’re satisfied that everything is correct, run the test. The Data out tab returns the extracted fields (our title rule came back with the demo store’s product names) along with links to the stored HTML and JSON of the fetched page.

Data out tab of the HasData test with extracted titles MacBook and iPhone

Watch how specific your selectors are. Our "description": "p" rule pulls every paragraph on the page, footer text included, and a class-scoped selector like span.price-new is what keeps a field clean.

Advanced Use Cases

Now that we have covered the basics, we can move on to more advanced examples. Based on our experience, the most popular and frequent integrations with our API are Google Sheets and ChatGPT. Therefore, we will now detail how these can be used together. Extended with both, the Zap from the first part grows into this chain:

Zap canvas named HasData scraping demo with four steps, Schedule, HasData Web Scraper, ChatGPT, and Google Sheets Create Spreadsheet Row

The canvas below is the shape both examples share. A schedule fires the scraper, the scraper hands its result to the next step, and that step writes somewhere you can read later.

HasData with ChatGPT

And we’ll start with ChatGPT. To avoid repeating the steps already discussed, we will take the zap from the previous example and add the following ChatGPT action.

Zapier action picker with ChatGPT highlighted in the search results

As with HasData, you’ll need an API key to connect ChatGPT to your Zap. To get it, you need to sign up on OpenAI platform and go to the API key section. You can create one in the same section if there is no API key.

OpenAI API keys page with the secret key row highlighted

Back in Zapier, select the ChatGPT interaction type. When using ChatGPT in your zap, you can use the following options to extract information:

  1. Here, you can send a sequence of messages (a conversation) to ChatGPT, which will be used as context to generate a response. Your messages and model responses can be saved and used in further processing. This allows you to create dialog systems or interact with a user in a chat format where the model answers questions and provides information based on user input. You can also use this option to analyze the input and draw conclusions.
  2. Extract Structured Data. This interaction option is suitable for analyzing and extracting structured data from incoming unstructured information. The model will look for information about specific entities, such as names, dates, addresses, phone numbers, etc., and return structured data you can use in further processing or integration with other systems.

Thus, with ChatGPT in your zap, you can create chat systems, process conversations with users, and retrieve structured data from unstructured text, giving you more flexibility in processing and analyzing information. We will use the Conversation case as an example to analyze the information we collected earlier.

The ChatGPT step with its event dropdown open, offering Conversation and Extract Structured Data, with Conversation highlighted

Now let’s connect ChatGPT. To do this, click the Sign in button and wait for the pop-up window. Paste your API key into the first field. Organization ID matters only if your OpenAI account belongs to several organizations, otherwise leave it blank, and Region stays on Global unless your account uses a specific data residency.

ChatGPT connect window in Zapier with API Key, Organization ID, and Region fields

A request has two halves, the fixed text and the scraped data that changes between runs. For a more useful example, point the previous step at a news site instead. Also, we will change extraction rules to get only text in <p> tag. Get a brief summary of the news using ChatGPT.

User Message field with the Insert Data panel open, offering the extracted text from the HasData step

As a result, we get a query like this:

The Conversation step with the news prompt in User Message followed by the inserted scraping result, and Assistant Instructions reading "You are a SEO researcher"

If you want to create a conversation that remembers past messages, specify the key of this conversation by which you will find it.

Memory Key field of the ChatGPT action, empty by default

The rest of the fields default sensibly, so fill in only what your case needs, then check every value before running the test.

Test preview of the ChatGPT step listing the model, system message, and the user message with the scraped news text

As a result, we will get this (or a similar) ChatGPT response:

ChatGPT response with a numbered news summary in the step's test output

As you can see, connecting to ChatGPT is easy enough, but with it, you get many options for how to use Zapier.

HasData with Google Sheets

Now, let’s see how to get all the data from HasData into Google Sheets. To do this, first, go to Google Sheets and create a new table. Specify the columns where we will write the information and remember the table’s name.

Google Sheets spreadsheet named Zapier Automation with column headers Title, Link, Image, Description, Old Price, New Price, and Tax

Now go to Zapier and create a new Google Sheets action. Here we need to select the event option. We will not examine each option in detail but only briefly consider the options:

  1. CREATE. Allows you to create an empty document, column, row, or worksheet.
  2. COPY WORKSHEET. Creates a new worksheet by copying an existing worksheet.
  3. CREATE MULTIPLE SPREADSHEET ROWS. Creates one or more new rows in the specified spreadsheet. Can support line items.
  4. DELETE SPREADSHEET ROW. Deletes the contents of a row in the specified table. The deleted rows will appear as empty rows in the table.
  5. FORMAT SPREADSHEET ROW. Applies formatting to the specified spreadsheet row.
  6. UPDATE SPREADSHEET ROW. Updates the contents of the row in the specified table.
  7. UPDATE SPREADSHEET ROW(S). Updates one or more rows in the specified table. Can support line items.
  8. SEARCH. Finds a worksheet, row, or line item.
  9. REQUEST API (Beta). This advanced action performs an HTTP request using this integration’s authentication. This is useful if the application has an API entry point that Zapier has not yet implemented.

You can use these actions in your zaps with Google Sheets to create, update, format, search, and delete data in tables and worksheets. In our example, we get multiple rows of product data using the HasData API. Therefore, we will use the ability to add multiple rows to Google Sheets document.

The Google Sheets event list filtered on "create", with Create Multiple Spreadsheet Rows highlighted above Create Spreadsheet and Create Spreadsheet Row

Now you need to log in to your Google account and grant access to your documents so that Zapier can change, add and manage your documents.

Google Sheets action setup in Zapier asking to connect an account with the Sign in button

Pick the Google account whose documents the Zap should reach.

You can read the terms and conditions and what you provide access to. As we said, you can remove the document management permission from your account anytime.

Google consent screen allowing Zapier access to Drive files and Sheets spreadsheets, with the Allow button highlighted

Now we need to select the pre-created table. To do this, we will specify google drive and its location. If you have only one account connected, you will have only one option in this field.

The Drive field of the Google Sheets action with My Google Drive selected

Now select the table you created beforehand.

Spreadsheet dropdown in Zapier with the Zapier Automation file selected

Finally, choose the sheet name containing the pre-created column headers. We didn’t change it, so we have only one option here.

Worksheet dropdown in Zapier with Sheet1 highlighted

Once we have filled up these fields, we have the columns that are already in this table automatically pulled up. Define the data that will be stored in each column. To do this, click in the input field of the column required and use search or manually find the data that should be in that column.

The Insert Data panel on the Title column, searching for "title" and offering the extracted Title, Description and Image values from the HasData step

Given that these are rather simple and monotonous actions, we won’t show you how to fill in each field individually. The filled fields below show what the result looks like.

The finished Create Multiple Spreadsheet Rows step with all seven columns mapped to extracted values, from Title through Old Price, New Price and Tax

Open the testing section and check the data before running the test.

The Test tab of the Google Sheets step, previewing column A as MacBook, iPhone, Apple Cinema 30 and Canon EOS 5D and column B as the matching product URLs

Then, run the test and wait for it to complete (usually takes no more than 5 seconds). After that, go to Google Sheets and open your spreadsheet. You will get this table with all the scraped data if you have done everything correctly.

The finished spreadsheet with one row per product under the Title, Link, Image, Description, Old Price, New Price and Tax headers

As you can see, we have created a Zapier web scraper that collects data from the specified website and enters the data into a table without writing a single line of code. And we hope it can help you get a handle on the basics and start building scrapers of your own.

For example, you can connect Gmail and send the emails ChatGPT drafts from the scraped information to the mailboxes specified in Google Sheets. It is as simple as the examples above, as long as you take it one step at a time.

Make a Zap with Google Sheets & HasData & ChatGPT

Now that we have explored examples, let’s create a no code web scraper that you can easily replicate and use for your purposes.

Our goal is to create a Zapier web scraping tool that works as follows:

  1. We input a website link into a Google Sheets document to gather data from.
  2. Our scraper is triggered When a new row with a website link appears in the document.
  3. Using HasData, we extract all the text information from the website’s <p> tags.
  4. The extracted data is sent to ChatGPT with a request to gather information about the page, including contact details and possible offers for the website owners.
  5. The response from ChatGPT, along with the website link, is recorded in the same Google Sheets document but on a different sheet.

Now that we have outlined our plan step by step, it will be easier for us to write the no coding data scraper by simply following this plan. Let’s start by creating a Google Sheets document and setting the column header as “website”.

New spreadsheet with a single Website column header for the combined Zap

Next, let’s move on to Zapier, where we’ll create a new Zap. For the trigger, we’ll choose Google Sheets.

The Change trigger picker with Google Sheets highlighted among the suggested apps

The actions above covered writing to Google Sheets, and the triggers run the other way:

  1. New or Updated Spreadsheet Row fires when a row is added or an existing one is edited, which covers both new data and corrections.
  2. New or Updated Spreadsheet Row (Team Drive) does the same for tables that live in a shared Team Drive folder.
  3. New Spreadsheet fires when you create a spreadsheet.
  4. New Spreadsheet Row fires only when a row is appended to the end, so edits to existing rows pass unnoticed.
  5. New Spreadsheet Row (Team Drive) is the Team Drive version of the same.
  6. New Worksheet fires when you add a sheet inside a spreadsheet.

In our case, we need to be informed about new or modified rows in the table. This way, you’ll be able to add websites to the end of the list and replace existing ones if needed.

The Google Sheets trigger event list with New or Updated Spreadsheet Row highlighted and marked Instant

Now, as with adding an action, we need to select a table and a sheet:

The Spreadsheet and Worksheet fields of the trigger, with the Website worksheet picked from the dropdown

Next, select the column that will be monitored for changes or adding new rows. In our case, this column is titled “Website.”

Trigger Column dropdown with the Website column selected

Finally, we can check if our trigger is working.

Test your trigger panel for Google Sheets confirming rows are being collected

To do this, go to the sheet and add a new row with a link to the web page you want to scrape.

Spreadsheet with a site URL added under the Website header

Back in the Zap, run the test. The trigger picks up the row that was just added.

Trigger test output showing a spreadsheet row with the site URL in column A

We got a link to a website, and we set a trigger to change or add new links. So, let’s scrape all the paragraphs from the site. To do this, add a new action and select HasData.

Action search in Zapier returning the HasData app

Signing in and finding the API key are covered above, so they are not repeated here. If you missed it, return to Creating Your First Zapier Web Scraper. We’ll move on to what we need to fill in this time. First, we need to specify the URL we got using the trigger.

URL field of the HasData action filled with the Website value from the Google Sheets trigger

Then, use Extraction Rules to assemble all the paragraphs on the page. Typically, paragraphs are in <p> tags, which will work for most sites.

The Extraction Rules field with one rule, Description mapped to the p selector

That’s all for now, be sure to verify all data and test the action before moving on to the next step. Do not skip tests even if you are sure that everything works correctly, because in case of a small error, you may have problems with the result.

Test preview of the HasData step with the URL from the sheet and the p-tag extraction rule

Now let’s add one more action and add ChatGPT. We have also already shown where to find the ChatGPT API and discussed what functions you can use. If you missed anything, you can go back to HasData with ChatGPT.

The Zapier action search filtered on "chat", with ChatGPT highlighted above Google Chat and Chatwork

Add a text query and data to process.

User Message field with the analysis prompt and the extracted page description inserted from the HasData step

Do a test and add another action. All we have to do is save all the obtained data in a Google Sheets document. Then you can download this document and open it using Excel.

Add data to Google Sheets

Return to your document and add another sheet where you set the headings “Website” and “ChatGPT answer” to put the results in there.

A second worksheet named Results with Website and ChatGPT answer as its two column headers

Now in Zapier, configure the tab and sheet settings where we want to save the data. And also, fill in the fields with the relevant names. You should end up with something similar:

The Create Spreadsheet Row step pointed at the Results worksheet, with the Website column mapped to the trigger URL and the ChatGPT answer column mapped to the assistant response

Run the action test, then open the Results sheet. Each row holds the URL the trigger picked up in column A and the model’s answer about that page in column B.

That is a working scraper that reads a URL from a sheet, fetches the page, asks ChatGPT about it, and writes the answer back, with no code anywhere in it.

Zapier has many different applications you can integrate into your project. Most of them work and integrate similarly. Therefore, if you understand the examples in this tutorial, you can make almost any automation that perfectly suits your purposes, even without programming knowledge and skills.

Results and Benefits

By using Zapier with various integrations, we could make a web parser by Zapier that automatically processes your data in several services. You may have performed such operations manually in the past, but now you can automate this process with Zapier and save time. For example, thanks to the Zapier custom integration with HasData, you automatically get up-to-date data without having to update it manually.

Automating the collection also takes out the typos and the missing fields that come with copying data by hand.

The time that frees up goes somewhere else in the same Zap. Automatic replies to incoming requests and messages are the usual next step.

Conclusion and Takeaways

Everyday automation runs on services that connect applications to each other, and most of it needs no programming at all.

By automating processes and integrating data quickly, you can increase the amount of work you do or improve your response to changes in external conditions.

In addition, using Zapier will allow you to easily add new Zapier integrations as needed and expand the functionality of your system. This tutorial has helped you understand the basics of working with Zapier and creating your integrations.

Valentina Skakun
Valentina Skakun
Valentina is a software engineer who builds data extraction tools before writing about them. With a strong background in Python, she also leverages her experience in JavaScript, PHP, R, and Ruby to reverse-engineer complex web architectures.If data renders in a browser, she will find a way to script its extraction.
Articles

Might Be Interesting