Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Recommend a website screenshot API?
9 points by dangrossman on Jan 19, 2012 | hide | past | favorite | 9 comments
I'm working on a bookmark organizer site to teach myself some new libraries/techniques, and I'd like to show ~200px screenshots of the bookmarked pages. Can anyone recommend a service to provide those screenshots? I did a search first and most of the years-old recommendations are no longer in business.


Though it meant a bit of server setup, I had a good experience using self-hosted PhantomJS. I have a mini how-to here, in the "Rendering the screenshot" section: http://petewarden.typepad.com/searchbrowser/2011/11/how-to-p...


Thanks. That was easier to set up than I expected -- lots of prerequisites but all easy to install. I just need to figure out why the fonts are coming out wrong, then maybe it'll make more sense to set up a queue to build screenshots myself with this instead of paying for a service.



How long did these take to render with phantomjs?


I set up a queue/worker setup with a max of 5 threads to generate screenshots with phantomjs then resize them with imagemagick. It was averaging one URL per second. Wasn't very taxing on the CPU so probably could be pushed much higher even on this little VPS.


Excellent! Thanks for the tip. I'm currently using url2png and imagemagick. URL2PNG is an excellent service, but probably won't be economically feasible for me, long term, when I get to trying to scale my app. ( I'm working on a visual bookmarking app with screenshot thumbnails serving as tiles on a draggable corkboard interface. You can double-click the tiles to open the target url in a draggable iframe. Example: http://beta.mindcast.com/ui/4k82yb5zb2ov )


Here are two options. Webkit2png (free for Mac) - http://www.paulhammond.org/webkit2png/ Khtml2png (free for Linux) - http://khtml2png.sourceforge.net/ Paid online api - http://url2png.com/


Can recommend url2png, very good service.


I like it too (really, thanks for the suggestion), but the pricing is way too high, by at least an order of magnitude. A single user might import 1000 bookmarks -- there's $10 right there.

Now that I've set up phantomjs (headless webkit) on a VPS per petewarden's suggestion, I can see what it costs to run a screenshot farm myself. A couple pennies per thousand images at most for bandwidth -- Linode's smallest instance can run a bunch of webkit instances in parallel just fine. I've already generated and resized almost 1000 screenshots since installing it all.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: