Skip to content

A basic, lightweight link preview API

License

Notifications You must be signed in to change notification settings

SLT-World/metafetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Metafetcher

A basic, lightweight link preview API initially designed for rendering link embeds in SLChat.

Features

  • Supports OpenGraph and Twitter Card metadata formats.
  • Returns a clean, basic JSON structure with missing fields as null.
  • No Selenium or browser automation used.
  • Optional raw <head> extraction mode.

Deployment

Deploy to Cloudflare

Usage

Basic

Request:

/?url=https://www.planetminecraft.com/

Response:

{
  "site": "Planet Minecraft",
  "title": "Planet Minecraft Community | Creative fansite for everything Minecraft!",
  "description": "Planet Minecraft is a family friendly community that shares and respects the creative works and interests of others. We have a variety of entertaining...",
  "image": "https://www.planetminecraft.com/images/layout/themes/modern/planetminecraft_logo.png",
  "theme": "#3366CC"
}

Raw <head>

Request:

/?raw=true&url=https://ogp.me/

Firefox User Agent

Request:

/?discord=false&url=https://ogp.me/

History

Originally developed as a subproject in the SLChat-External repository to reduce SLChat's reliance on third-party services.

It was later moved to this repository to prevent unnecessary Cloudflare build triggers on unrelated commits within SLChat-External.

At the time, I wasn't aware that Cloudflare supported build watch paths, which would have made this move unnecessary.