October 03, 2023
2 min read
At OpenGraph.io, our constant need to improve has spurred the development of a cool new feature. Adhering to the adage that a picture conveys a thousand words, we think that this addition will provide a valuable tool for enhancing user experiences and streamlining marketing and reporting processes. We’re always pumped to get new things out for our customers to implement and give us feedback.
We're excited to share something new at OpenGraph.io - our Screenshot API route. We've built this with a lot of care, aiming to give your applications a simple yet powerful way to visualize web content on their own terms. Just a straightforward HTTP GET request, and your application can grab screenshots from any website, adjusting to your specific needs with customizable parameters like full_page, dimensions, and quality. It’s a tool for precise, tailored navigation through web content, allowing your applications to represent data in a way that's both visually clear and informationally rich. In this space, your data doesn’t just communicate; it paints a picture, telling a story that's as engaging as it is informative.
curl "https://opengraph.io/api/1.1/screenshot/https%3A%2F%2Fwww.example.com?app_id=xxxxxx&full_page=true&dimensions=lg&quality=80"
Our API has always been about simplicity. We’ve never wanted anyone to get bogged down and spend hours digging through documentation just to get started. Just like everything else here, our Screenshot route is no fuss, no muss – it's straightforward and aimed at making your life as a developer a tad easier.
The API isn’t rigid either, with its query parameters, it bends and shapes to your particular needs, allowing a degree of customization that we hope you find both useful and refreshing.
‘full_page’ might be self-explanatory, but let's make sure we are on the same page.
This parameter allows you to decide the extent of your screenshot: whether it captures only the visible viewport or stretches out to include the entire webpage.
Why Go Full Page?:
Imagine wanting a single, clean shot of diverse web content from top to bottom; that’s where ‘full_page’ comes into play, ensuring you don’t miss a pixel of information.
Tweaking the View:
‘dimensions’ is your ticket to playing around with the screenshot's viewport. In other words, it's what helps you set the width and height of the image you’re capturing.
Below is a list of possible params that you can pass to in the `dimensions` query.
Having the power to adjust dimensions is crucial whether you're wanting to test responsive design across different device sizes or ensuring content previews are just right.
Picking the Pixels:
When we talk about ‘quality’, we're discussing how refined your screenshot turns out. It adjusts the clarity of the image, giving you control over how polished the final shot appears.
The quality parameter specifies the image quality and can be set to values representing different quality levels. The value should be set in intervals of 10, starting from 10 up to 80, where: 10 is the lowest possible quality.
As always we are so thankful to all who use OpenGraph.io and we strive to make it the best that it can be. We are constantly looking for ways to improve the quality of the API and the features that we offer. We hope that you will try out the new Screenshot route and give us all the feedback you can give. With it we can continue to improve and offer a better experience.
Check out the documentation for any more information you may need, and sign up for a free account with no credit card to try everything out.