Skip to content
Get App

The Simplest Way to Automate Scraping Anything with No Code (Apify + n8n tutorial)

Nate Herk shows how to use Apify's pre-built actors with n8n to scrape data like Google Maps leads and TikTok videos, using a two-step start-then-fetch HTTP workflow.

Key Takeaways

  • Apify actors let non-coders scrape almost any public web data source through a simple configuration and API calls.
  • Using n8n HTTP requests, a two-step start-then-fetch pattern is more reliable than synchronous runs for scraping jobs.
  • Scraped lead and social data can be piped into automated workflows to run continuously for research or outreach.

What the video covers

  • Apify is a marketplace of 4,500+ pre-built web scraping and automation 'actors' that can be triggered via API.
  • Actors can scrape Google Maps leads, Instagram comments, Facebook posts, LinkedIn jobs, TikTok videos, and Apollo lead data.
  • The recommended approach is a two-step process: first call the run-actor endpoint to start the actor, then retrieve the results once it finishes.
  • The synchronous run method returned nothing in n8n for longer jobs, so the asynchronous two-step method proved more consistent.
  • The actor configuration panel works like e-commerce filters, letting users set parameters such as search terms and result counts using natural language.
  • Each actor's API endpoints page provides a copy-ready URL and JSON body, including the user's Apify API key.
  • In n8n, the run request is sent as a POST HTTP request with the JSON body, and the response returns an ID confirming the actor has started.
  • The results retrieval step uses a GET request to the 'get last run dataset items' endpoint to pull scraped data into the workflow.
  • Demonstrations include pulling 50 dentists in New York from Google Maps and 25 TikTok captions for the 'AI content' hashtag.
  • The collected data (addresses, websites, phone numbers) can feed into outreach, research, or email workflows that run continuously.

Answers

Questions about this video

What is an Apify actor?

An actor is a predefined script built on the Apify platform for a specific scraping or automation task, such as pulling Google Maps listings or TikTok videos. Users send it a request with their configuration and receive the scraped data back.

Why does the video recommend the two-step method instead of a synchronous run?

The synchronous run returned nothing in n8n when the plumber search took longer to finish, while the two-step method (start the actor, then fetch results after it completes) worked consistently.

What do you need to replicate the workflow in n8n?

You need an Apify account and API key, and two HTTP request nodes in n8n: a POST to the run-actor endpoint with a JSON body, and a GET to the last run dataset items endpoint. The creator also provides a template in his free school community.

Full Transcript — Download SRT & Markdown

00:00
Speaker A
So, Apify is like a marketplace for actors, which essentially let us scrape anything on the internet. As you can see right here, we're able to explore 4,500 plus pre-built actors for web scraping and automation. And it's really not that
00:10
Speaker A
complicated. An actor is basically just a predefined script that was already built for us that we can just send off a certain request to. So, you can think of it like a virtual assistant where you're saying, "Hey, I want you to I want to
00:19
Speaker A
use the Tik Tok virtual assistant and I want you to scrape, you know, videos that have the hashtag of AI content." Or you could use the LinkedIn job scraper and you could say, "I want to find jobs that are titled business analyst." So
00:30
Speaker A
there's just so many ways you could use Appify. You could get leads from Google Maps. You could get Instagram comments.
00:34
Speaker A
You could get Facebook posts. There's just almost unlimited things you can do here. You can even tap into Apollo's database of leads and just get a ton. So today, I'm just going to show you guys in Naden the easiest way to set up this
00:45
Speaker A
Apify actor where you're going to start the actor and then you're going to just grab those results. So, what you're going to want to do is head over to Apify using the link in the description and then use code 30 Nate Herk to get
00:54
Speaker A
30% off. Okay, like I said, what we're going to be covering today is a two-step process where you make one request to Ampify to start up an actor and then you're going to wait for it to finish up
01:03
Speaker A
and then you're just going to pull those results back in. So, let me show you what that looks like. What I'm going to do is hit test workflow and this is going to start the Google Maps actor.
01:10
Speaker A
And what we're doing here is we're asking for dentists in New York. And then if I go to my Appify console and I go over here to actors and click on the Google Maps extractor one. If I click on
01:18
Speaker A
runs, we can see that there's one currently finishing up right now. And now that it's finished, I can go back into our workflow. I can hook it up to the get results node. Hit test step. And this is going to pull in those 50
01:28
Speaker A
dentists that we just scraped in New York. And you can see this contains information like their address, their website, their phone number, all this kind of stuff. So you can just basically scrape these lists of leads. So anyways
01:39
Speaker A
that's how this works. But let's walk through a live setup. So once you're in your Appify console, you click on the Appify store. And this is where you can see all the different actors. And let's do an example of like a social media
01:48
Speaker A
one. So I'm going to click on this Tik Tok scraper since it's just the first one right here. And this may seem a little bit confusing, but it's not going to be too bad at all. We get to
01:56
Speaker A
basically do all this with natural language. So let me show you guys how this works. So basically, we have this configuration panel right here. When you open up any sort of actor, they won't always all be the same, but in this one
02:05
Speaker A
what we have is videos with this hashtag. So we can put something in. I put in AI content to play around with earlier. And then you can see it asks how many videos do you want back. So in
02:13
Speaker A
this case I put 10. Let's just put 25 for the sake of this demo. And then you have the option to add more settings. So down here we could do, you know, we could add certain profiles that we want
02:20
Speaker A
to scrape. We could add a different search functionality. We could even have it download the videos for us. So once you're good with this configuration and just don't over complicate it, think of it the same way you would like put in
02:30
Speaker A
filters on an e-commerce website or the same way you would, you know, fill in your order when you're door dashing some food. So, now that we have this filled out the way we want it, all I'm going to
02:38
Speaker A
do is come up to the top right and hit API and click API endpoints. The first thing we're going to do is we're going to use this endpoint called run actor.
02:46
Speaker A
This is the one that's basically just going to send a request to Amplify and start this process, but it's not going to give us the live results back. That's why the second step later is to pull the results back. What you could do is you
02:55
Speaker A
could run the actor synchronously meaning it's going to send it off and it's just going to spin in and it end until we're done and until it has the results. But I found this way to be more consistent. So anyways, all you have to
03:05
Speaker A
do is click on copy and it's already going to have copied over your Ampify API key. So it's really, really simple.
03:11
Speaker A
All we're going to do here is open up a new HTTP request. I'm going to just paste in that URL that we just copied right here. And that's basically all we have to do except for we want to change
03:20
Speaker A
this method to post because as you can see right here, it says post. And so this is basically just us putting in the actor's phone number. And so we're giving it a call. But now what we have to do is actually tell it what we want.
03:31
Speaker A
So right here, we've already filled this out. I'm going to click on JSON and all I have to do is just copy this JSON right here. Go back into NN. Flick this on to send a body and we want to send
03:40
Speaker A
over just JSON and then all I have to do is paste that in there. So, as you can see, what we're sending over to this Tik Tok scraper is I want AI content and I want 25 results and then all this other
03:49
Speaker A
stuff is false. So, I'm just going to hit test. And so, this basically returns us with an ID and says, okay, the actor has started. If we go back into here and we click on runs, we can see that this
03:58
Speaker A
crawler is now running. and it's going to basically tell us how much it costed how long it took, and all this kind of stuff. And now it's already done. So what we need to do now is we need to
04:06
Speaker A
click on API up in the top right, click on API endpoints again, and scroll all the way down to the bottom where we can see get last run data set items. So, all I need to do is hit this copy button
04:16
Speaker A
right here. Go back into Nitn and then open up another HTTP request. And then I'm just going to paste that URL right in there once again. And I don't even have to change the method because if we go in here, we can see that this is a
04:27
Speaker A
get. So, all I have to do is hit test step. And this is going to pull in those 25 results from our Tik Tok scrape based on the search term AI content. So, you can see right here it says 25 items. And
04:38
Speaker A
just to show you guys that it really is 25 items, I'm just going to grab a set field. And we're going to just drag in the actual text from here and hit test step. And it should Oh, we have to
04:47
Speaker A
connect the trigger. So, I'm just going to move this trigger over here real quick. And um what you can do is because we already have our data here, I can just pin it so we don't actually have to
04:55
Speaker A
run it again. But then I'll hit test step. And now we can see we're going to get our 25 items right here, which are all of the text content. So I think just the captions or the titles of these Tik
05:05
Speaker A
Toks. And we have all 25 Tik Toks as you can see. So I just showed you guys the two-step method and why I've been using it because here's an example where I did the synchronous run. So all I did was I
05:15
Speaker A
came to the Google maps and I went to API endpoints and then I wanted to do run actor synchronously which basically means that it would run it in n and it would spin until the results were done and then it should feed back the output.
05:27
Speaker A
So I copied that I put it into here and as you can see I just ran it with the Google maps looking for plumbers and we got nothing back. So that's why we're taking this two-step approach where as
05:35
Speaker A
you can see here we're going to do that exact same request. We're doing a request for plumbers and we're going to fire this off. And so nothing came back in Nit. But if we go to our actor and we
05:44
Speaker A
go to runs, we can see right here that this was the one that we just made for plumbers. And if we click into it, we can see all the plumbers. So that's why we're taking the two-step approach. I'm
05:52
Speaker A
going to make the exact same request here for New York plumbers. And what I'm going to do is just run this workflow.
05:56
Speaker A
And now I wanted to talk about what we have to do because what happens is we started the actor. And as you can see it's running right now. And then it went to grab the results, but the results
06:04
Speaker A
aren't done yet. So that's why it comes back and says this is an item, but it's empty. So, what we want to do is we want to go to our runs and we want to see how long this is taking on average for 50
06:14
Speaker A
leads. As you can see, the most amount of time it's ever taken was 19 seconds.
06:17
Speaker A
So, I'm just going to go in here and in between the start actor and grab results, I'm going to add a wait. And I'm just going to tell this thing to wait for 22 seconds just to be safe. And
06:25
Speaker A
now, what I'm going to do is just run this thing again. It's going to start the actor. It's going to wait for 22 seconds. So, if we go back into Amplify you can see that the actor is once again
06:33
Speaker A
running. After about 22 seconds, it's going to pass over and then we should get all 50 results back in our HTTP request. There we go. Just finished up.
06:42
Speaker A
And now you can see that we have 50 items, which are all of the plumbers that we got in New York. So from here now that you have these 50 leads, and remember, if you want to come back into
06:51
Speaker A
Appify and change up your input, you can change how many places you want to extract. So if you change this to 200 and then you clicked on JSON and you copied in that body, you would now be searching for 200 results. But anyways
07:02
Speaker A
that's the hard part is getting the leads into end. But now we have all this data about them and we can just, you know, do some research, send them off a email, whatever it is, we can just basically have this thing running 24/7.
07:13
Speaker A
And if you wanted to make this workflow more advanced to handle a little bit more dynamic amount of results, what you'd want to use is a technique called polling. So basically, you'd wait, you check in, and then if the results were
07:23
Speaker A
all done, you continue down the process. But if they weren't all done, you would basically wait again and come back. And you would just loop through this until you're confident that all of the results are done. So that's going to be it for
07:34
Speaker A
this one. I will have this template available in my free school community if you want to play around with it. Just remember you'll have to come in here and you'll have to switch out your own API key. And don't forget when you get to
07:42
Speaker A
Ampify, you can use code 30 Nate Herk to get 30% off. Anyways, that's going to do it for this one. If you appreciated the video, if you learned something new definitely give it a like. It helps me out a ton. And as always, I appreciate
07:51
Speaker A
you guys making it to the end of this video. I'll see you in the next one.
07:53
Speaker A
Thanks everyone.
Topics:Apifyn8nweb scrapingno-code automationGoogle Maps scraperTikTok scraperAPIlead generationHTTP requestworkflow automation

Get More with the SozAI App

Transcribe recordings, audio files, and YouTube videos — with AI summaries and speaker detection. 30 minutes free.

Or transcribe another YouTube video here →