0:01 if you need to scrape Facebook
0:04 Marketplace data I'll show you how to
0:06 legally do so using only your web
0:08 browser as you scroll through Facebook
0:11 Marketplace listings without violating
0:13 the Facebook terms of service to get
0:15 started at the Facebook Marketplace and
0:16 you don't even need to be logged in
0:18 unless you want to and browse any
0:20 category or location you want you can
0:22 put in any of these filters use the
0:23 website normally because we're just
0:25 going to be recording your web traffic
0:27 we don't have to do any automated
0:29 interaction that typically fails once
0:30 you see the list things you want right
0:32 click and hit inspect this opens up
0:34 developer tools which will automatically
0:36 begin recording your web traffic you'll
0:39 see here now that we're recording
0:41 refresh this page so Facebook reloads
0:43 the first set of results into our
0:44 browser and you can just close these
0:46 annoying popups they're really desperate
0:48 to get you to log in or give them your
0:50 location now under the network Tab and
0:52 developer tools if you type in graphql
0:55 under the filter you can see these API
0:57 responses showing us the raw data for
0:59 Facebook Marketplace they use to power
1:01 the front end it's extremely deeply
1:03 nested so you have to keep drilling
1:04 through here until you find the listings
1:05 and you'll finally see something here
1:08 like 1963 Chevrolet and you can see the
1:10 number of miles it has here delivery
1:12 types most of these cars are going to be
1:14 in person but sometimes they do shipping
1:16 this ID is useful if you want to look up
1:17 the listing on Facebook Marketplace for
1:20 even more details you get pricing here
1:21 in a bunch of different formats for some
1:23 reason and if there's a video attached
1:25 to the listing you can get the URL to
1:26 see that video here's some more
1:28 information about the location of each
1:30 listing I can see the city and State
1:31 this here is information about the
1:33 seller showing them their full name but
1:34 I don't want to show that on camera and
1:36 if they have photos we can see the
1:38 primary photo here and again it's an
1:40 image URL and if we search in the
1:42 results we can see the HTML version
1:43 presented up here with all the data I
1:45 just showed you in Json button
1:47 userfriendly format now to get the rest
1:48 of the listings we simply scroll through
1:50 the results and the Facebook API will
1:52 send more data to our browser that we're
1:54 recording we're not violating the
1:56 Facebook terms of service because we're
1:58 just browsing the site normally if
2:00 anybody asks so I got through about
2:01 1,500 results and it looks like I could
2:03 keep going but I think that's enough for
2:05 this demo to get this data out go into
2:06 the network Tab and click this down
2:08 arror here called export hor that will
2:10 save a hor file containing the raw Json
2:12 data to your computer to get the data
2:14 out of the hor file check the link in
2:16 the description for my no code Facebook
2:18 API scraper featuring the hor file web
2:20 scraper this will work with any hor file
2:22 not just from Facebook Marketplace just
2:24 drag and drop it into your browser and
2:26 it will securely combine together
2:28 similar API requests so you can download
2:30 all of the data in one place look for
2:31 this group here ending in graphql and
2:33 check these fields it should have things
2:35 like listing and listing price there may
2:37 be a few groups ending in graphql you'll
2:39 also see a bunch of images for the cars
2:40 these were captured in the hor file
2:42 they're not being dynamically loaded so
2:44 don't worry about that then down here
2:46 you can see the 65 individual API
2:48 requests and responses containing all
2:51 the data now using these Blue Links here
2:53 you can download that raw Json data I
2:54 showed you in your browser to your
2:56 downloads folder so you can get all this
2:58 data in one folder on your computer to
3:00 process it yourself but if you just want
3:02 a CSV file of all this combined data
3:04 scroll all the way up and click this
3:06 parse group button here and if you have
3:08 a premium account with us you can
3:10 download up to 10 rows of this data per
3:11 day for free here I'm able to download
3:14 all 1500 results we browse through on
3:15 Facebook Marketplace and if I want to
3:17 see them on Facebook Marketplace I copy
3:19 this listing ID and you want to paste it
3:22 into this URL format here facebook.com/
3:24 Marketplace item listing ID and then
3:27 paste in the listing ID here now you can
3:28 open this URL up in your browser and see
3:30 the official listing Facebook
3:32 Marketplace this is this video that I
3:34 showed earlier and we can also see that
3:36 first image is the primary image we saw
3:38 in that Json data other notable Fields
3:39 will'll get back are the title of the
3:41 listing there is custom title too which
3:43 is usually the same in most cases a link
3:45 to the primary photo for the listing so
3:46 you can loaded in your browser here
3:49 here's the price again in decimal format
3:51 location City and location state if the
3:53 listing has a video you can see that URL
3:55 here to the video file if you do access
3:57 this media for whatever reason please do
3:59 not republish it without consent that's
4:01 typically copyright violation but you're
4:02 probably fine if you just use this
4:04 information for private research you
4:06 also see the seller's Facebook
4:08 identifier and their name which could be
4:09 helpful for example if you're trying to
4:11 crack down on people selling illegal
4:12 things here's the number of miles which
4:14 is obviously only going to be shown on
4:15 cars So based on what you browse these
4:17 fields will be different and we can see
4:19 the shipping or pickup on site it's
4:21 mostly going to be in person and there
4:22 are a few more Fields here you may find
4:23 helpful for example if a listing has
4:25 more than one video you can download
4:26 that here as a separate collection and
4:28 each row will come with a reference to
4:30 its parent listing in the download file
4:31 and then these here are custom
4:33 attributes so this is showing mileage
4:34 for cars but if you're scraping phones
4:36 for example it may show you storage
4:38 capacity or other attributes based on
4:39 the products you're browsing so hope you
4:41 guys found this useful let me know in
4:43 the comments your feedback or what
4:45 you're using this data for or if there
4:46 are other websites I can help show you
4:48 how to scrape and check out this next
4:51 video here on scraping merari for
4:53 similar Marketplace data thanks for