Live data from Hacker News

Show HN: I scraped 25M Shopify products to build a search engine

searchagora.com

261–270 of 286 posts

Re: Show HN: I scraped 25M Shopify products to build a search engine

#261
post #57

What was the process for scraping 25M products ? I have always used standard python tools like selenium, bs4 and the like. But I'm guessing none of these work at scale. Could you talk about your process and key bottlenecks at that scale a little bit ? Also, how much did it cost ? ______________ A recommendation for how to improve search. Your base captions will be pretty bad. You can use spot instances on a smaller G…

Great suggestions, looking into this right now. First time building something like this so definitely new to some of these tools. For scraping: Found that every Shopify store has a public JSON file that is available in the same route. The JSON file appears on the [Base URL]/products.json. For example, the store for Wild Fox has their JSON file available here: https://www.wildfox.com/products.json . Built a crawler in…

I index 40M paragraphs of legal text, bm25 and vector similarity search, at < 200ms query time, on a single $80/month Hetzner server. Email in profile if you’d like to talk.

Re: Show HN: I scraped 25M Shopify products to build a search engine

#262
post #57

What was the process for scraping 25M products ? I have always used standard python tools like selenium, bs4 and the like. But I'm guessing none of these work at scale. Could you talk about your process and key bottlenecks at that scale a little bit ? Also, how much did it cost ? ______________ A recommendation for how to improve search. Your base captions will be pretty bad. You can use spot instances on a smaller G…

Great suggestions, looking into this right now. First time building something like this so definitely new to some of these tools. For scraping: Found that every Shopify store has a public JSON file that is available in the same route. The JSON file appears on the [Base URL]/products.json. For example, the store for Wild Fox has their JSON file available here: https://www.wildfox.com/products.json . Built a crawler in…

Oh... no... $1500/mo?

Re: Show HN: I scraped 25M Shopify products to build a search engine

#263
post #22

Cool! But how did you get the initial dataset of 643,000+ Shopify stores (data as per your “About” page) in the first place, to then scrape the products from their /products.json feeds? Or did you just try a huge list of domain names at random?

https://www.shopify.com/robots.txt lists a lot of sitemap files, which tend to be a good starting point.

Looks like it's just Shopify's own pages and not anything related to actual stores.

Re: Show HN: I scraped 25M Shopify products to build a search engine

#264

I built this a couple years ago (now defunct) for the same reason :) The public JSON endpoints on shopify stores make it pretty easy to get the data. You mentioned using Mongo but it sounds expensive. I honestly think you could do this with just elastic or even postgres full text search and save money. Here's a pro tip + feature you should implement: Shopify has a semi-hidden hack where you can link directly to check…

I didnt know about the link to checkout. That's a slightly nicer user experience for sure. Still, its confusing for users who want to do more shopping at the same time. I had users who clicked on a number of items, clicked "add to cart" in each one (all different shops), and then couldn't figure out how to checkout on the main site afterwards! Obviously people were looking for a more complete one-stop-shopping experi…

I mean a single checkout from multiple shopify stores isn't really possible (at least by 3rd parties)

My hypothesis is that, if you could drive traffic to your site and offer a fast checkout experience, there's probably multiple ways to monetize that. Driving the traffic is the hard part.

Re: Show HN: I scraped 25M Shopify products to build a search engine

#266
post #84

Earlier quoted context omitted.

2.2k/mo right off the bat is pretty steep, especially if you're paying that while the search response reliably takes over 10 seconds. Why would you shovel 1.5k into MongoDB's pockets right off the bat? Especially when ElasticSearch is much better suited to what you're trying to do?

Sounds like someone drank the Mongo kool-aid. You absolutely do not need Mongo, let alone Mongo Atlas. 25 million documents with ecommeece products is measly and should fit in a single 600 GB server

Probably not even that - 25mil is nothing really. A normalised schema in an RDBMS would handle that without sweating.

Re: Show HN: I scraped 25M Shopify products to build a search engine

#268
post #115

Earlier quoted context omitted.

If you're already on AWS, I recommend switching to postgres for now. For context, I have 3 RDS instances, each multi zone, with the biggest instance storing several billion records. My total bill for all 3 last month was $661. Postgres has full text search, vector search, and jsonb. With jsonb you can store and index json documents like you would in Mongo. - https://www.postgresql.org/docs/current/textsearch.html - h…

how big is the disk for the biggest instance?

Pretty small still at 500gb. It only stores hot data right now and a subset of what's important. Most of our data is in S3.

Re: Show HN: I scraped 25M Shopify products to build a search engine

#270
post #225
post #199

Earlier quoted context omitted.

> site called "Built With", Do you have Alink. And are they any good?

Google ? https://builtwith.com/

I specifically asked the author if he could add some extra info on Builtwith.

I can Google. But then I don't know if its truly the site the author was talking about. And I certainly don't know his or her insights on that site.

Post reply on HN