McAPI Screenshot

FREEMIUM
Por Softmatic | Actualizada hace 2 meses | Monitoring

Descripción general de McAPI Screenshot

Seguidores: 1
Recursos:
Sitio web del producto
Creador de la API:
avatar
Softmatic
Softmatic
Calificar la API:
Inicie sesión para calificar la API

LÉAME

An easy to use <b>Screenshot REST API</b> for fast and reliable web site screenshots. The API features a database of over one hundred pre-defined devices and screen sizes and also supports user defined screen sizes. Up to five screenshots can be capture per REST call for different screen sizes in batch mode, very useful if you want to test website designs against a variety of devices.

The <b>McAPI Screenshot API</b> comes with a built-in ad blocker, can automatically click Cookie consent banners (this features is experimental as of V1.0) and supports capturing full-length screenshots with up to 32000px height. Screenshots are returned from the API as a downloadable web URL or as a base64-encoded JPEG or PNG. Extensive sample code illustrates screenshot creation in Node / JS, Python, Ruby, Swift, PHP, C# and other languages and environments, see below for links.

<b>Sample cURL</b>
<pre><code>curl --request POST
–url https://mcapi-screenshot.p.rapidapi.com/
–header ‘content-type: application/json’
–header ‘x-rapidapi-host: mcapi-screenshot.p.rapidapi.com
–header ‘x-rapidapi-key: YOUR_API_KEY’
–data ‘{
“url”: “https://indiehackers.com”,
“format”: “jpeg”,
“storeExternal”: “false”,
“devices”: [ “Default” ]
}’
</code></pre>
<b>Sample response</b>
<pre><code>{
“service”: “McAPI Screenshot, https://mcapi.io”,
“version”: “V1”,
“url”: “https://indiehackers.com”,
“screenshots”: [
{
“device”: “Default”,
“screenshot”: “data:image/jpeg;base64,/9j/4AAQSkZJRgAB … 9yXvZG0pSuhyP/9k=”
}
]
}
</code></pre>
<b>Taking multiple screenshots at once</b>
<p>Getting a batch of screenshots for multiple devices at a time is easy too. Simply list the the device names like so:</p>
<pre><code>…
–data ‘{
“url”: “https://cnbc.com”,
“format”: “jpeg”,
“storeExternal”: “true”,
“devices”: [ “iPhone 12”, “iPhone 12 landscape” ]
}’

</code></pre>
<p><b>Response</b></p>
<p>This call will then return two images in the <em>screenshots</em>-array, one rendered for the iPhone 12 in standard orientation, one for landscape, like so:</p>
<pre><code class=“language-json”>{
“service”: “McAPI Screenshot, https://mcapi.io
“version”: “V1”,
“url”: “https://cnbc.com”,
“screenshots”: [
{
“device”: “iPhone 12”,
“screenshot”: “https://…jpeg”
},
{
“device”: “iPhone 12 landscape”,
“screenshot”: “https://…jpeg”
}
]
}
</code></pre>
<p>The screenshots. #1, standard (portrait) orientation:</p>
<p><img width=“400px” src=“https://mcapi.io/screenshot/Screenshot API - Website iPhone 12 Portrait.jpeg”/></p>
<p>#2, landscape orientation</p>
<p><img width=“400px” src=“https://mcapi.io/screenshot/Screenshot API - Website iPhone 12 Landscape.jpeg”/></p>

<b>Samples & Tutorials</b>
<ul>
<li><a href=“https://mcapi.io/screenshot/screenshot-api-javascript.php”>JavaScript / Node</a></li>
<li><a href=“https://mcapi.io/screenshot/screenshot-api-php.php”>PHP</a></li>
<li><a href=“https://mcapi.io/screenshot/screenshot-api-python.php”>Python</a></li>
<li><a href=“https://mcapi.io/screenshot/screenshot-api-ruby.php”>Ruby</a></li>
<li><a href=“https://mcapi.io/screenshot/screenshot-api-javascript.php”>Swift</a></li>
</ul>

Overview and reference: <a href=“https://mcapi.io/screenshot/screenshot-api-overview.php”>McAPI Screenshot API</a>

Valoración: 5 - Votos: 1