Skip to content
shotsmith
Features Docs Guides Pricing Changelog Sign inStart free

Open Graph checker

See how a link will look when it’s shared in chat apps and on social networks. We load the page in real Chrome, read its Open Graph and Twitter tags, and show what’s missing.

Free for 10 captures a day, no sign-up. Pages are rendered in real Chrome on our servers and not stored.

Do this from your own code

This tool is the shotsmith API with a form in front. The same request from your app, with a free key (100 renders a month):

// npm install @shotsmith/sdk
import { Shotsmith, TakeOptions } from '@shotsmith/sdk';
import { writeFile } from 'node:fs/promises';

const shotsmith = new Shotsmith({
  accessKey: 'YOUR_ACCESS_KEY',
});

const options = TakeOptions.url('https://example.com')
  .responseType('json')
  .metadataOpenGraph()
  .metadataPageTitle();

await writeFile('capture.json', await shotsmith.take(options));
<?php

// composer require shotsmith/shotsmith-php
require 'vendor/autoload.php';

use Shotsmith\Client;
use Shotsmith\Options\TakeOptions;

$shotsmith = new Client('YOUR_ACCESS_KEY');

$options = TakeOptions::url('https://example.com')
    ->responseType('json')
    ->metadataOpenGraph()
    ->metadataPageTitle();

file_put_contents('capture.json', $shotsmith->take($options));

// In Laravel: Shotsmith::take($options) with SHOTSMITH_ACCESS_KEY in .env
curl -G "https://shotsmith.dev/v1/take" \
  --data-urlencode "access_key=YOUR_ACCESS_KEY" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "response_type=json" \
  --data-urlencode "metadata_open_graph=true" \
  --data-urlencode "metadata_page_title=true" \
  -o capture.json
import { writeFile } from 'node:fs/promises';

const params = new URLSearchParams({
  access_key: 'YOUR_ACCESS_KEY',
  url: 'https://example.com',
  response_type: 'json',
  metadata_open_graph: 'true',
  metadata_page_title: 'true',
});

const res = await fetch(`https://shotsmith.dev/v1/take?${params}`);
if (!res.ok) throw new Error((await res.json()).error_message);

await writeFile('capture.json', Buffer.from(await res.arrayBuffer()));
import urllib.request
from urllib.parse import urlencode

params = {
    "access_key": "YOUR_ACCESS_KEY",
    "url": "https://example.com",
    "response_type": "json",
    "metadata_open_graph": "true",
    "metadata_page_title": "true"
}

url = "https://shotsmith.dev/v1/take?" + urlencode(params, doseq=True)

# Raises urllib.error.HTTPError on a 4xx/5xx response
with urllib.request.urlopen(url, timeout=120) as res, open("capture.json", "wb") as f:
    f.write(res.read())
<?php

$query = http_build_query([
    'access_key' => 'YOUR_ACCESS_KEY',
    'url' => 'https://example.com',
    'response_type' => 'json',
    'metadata_open_graph' => 'true',
    'metadata_page_title' => 'true',
], '', '&', PHP_QUERY_RFC3986);

$ch = curl_init('https://shotsmith.dev/v1/take?' . $query);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 120,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status !== 200) {
    throw new RuntimeException(json_decode($body, true)['error_message'] ?? "HTTP {$status}");
}

file_put_contents('capture.json', $body);
package main

import (
	"io"
	"net/http"
	"os"
)

func main() {
	res, err := http.Get("https://shotsmith.dev/v1/take?access_key=YOUR_ACCESS_KEY&url=https%3A%2F%2Fexample.com&response_type=json&metadata_open_graph=true&metadata_page_title=true")
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	if res.StatusCode != http.StatusOK {
		body, _ := io.ReadAll(res.Body)
		panic(string(body))
	}

	out, err := os.Create("capture.json")
	if err != nil {
		panic(err)
	}
	defer out.Close()
	io.Copy(out, res.Body)
}
require "net/http"
require "uri"

uri = URI("https://shotsmith.dev/v1/take")
uri.query = URI.encode_www_form([
  ["access_key", "YOUR_ACCESS_KEY"],
  ["url", "https://example.com"],
  ["response_type", "json"],
  ["metadata_open_graph", "true"],
  ["metadata_page_title", "true"]
])

res = Net::HTTP.get_response(uri)
raise res.body unless res.is_a?(Net::HTTPSuccess)

File.binwrite("capture.json", res.body)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;

public class Capture {
    public static void main(String[] args) throws Exception {
        var client = HttpClient.newHttpClient();
        var request = HttpRequest.newBuilder(URI.create(
            "https://shotsmith.dev/v1/take?access_key=YOUR_ACCESS_KEY&url=https%3A%2F%2Fexample.com&response_type=json&metadata_open_graph=true&metadata_page_title=true"
        )).build();

        var res = client.send(request, HttpResponse.BodyHandlers.ofFile(Path.of("capture.json")));
        if (res.statusCode() != 200) {
            throw new RuntimeException("HTTP " + res.statusCode());
        }
    }
}
using System;
using System.IO;
using System.Net.Http;

using var http = new HttpClient { Timeout = TimeSpan.FromSeconds(120) };

// Throws HttpRequestException on a 4xx/5xx response
var bytes = await http.GetByteArrayAsync(
    "https://shotsmith.dev/v1/take?access_key=YOUR_ACCESS_KEY&url=https%3A%2F%2Fexample.com&response_type=json&metadata_open_graph=true&metadata_page_title=true"
);

await File.WriteAllBytesAsync("capture.json", bytes);

Questions

What are Open Graph tags?

Meta tags in a page’s head, such as og:title, og:description and og:image, that chat apps and social networks read to build the preview card when someone shares a link.

What size should og:image be?

1200 × 630 pixels works almost everywhere. Use an absolute https:// address, keep important content away from the edges, and keep the file under a few megabytes.

Why doesn’t my change show up when I share the link?

Social networks cache previews, sometimes for days. Most have a debugging page that fetches the link again; after that, new shares use the new tags.

Can I generate Open Graph images automatically?

Yes. Render an HTML template to a 1200 × 630 image with the API, for every page or post. Our guide on Open Graph images shows how.

More free tools