Skip to content

Opengraph & twitter HTML metadata scraper web api to generate link preview cards from urls

Notifications You must be signed in to change notification settings

Debajyati/xogapi

Repository files navigation

XOGAPI

X means twitter and OG means opengraph.

XOGAPI is a REST-API that you can use to extract opengraph and twitter metadata of a website by providing the url as input. For example -

fetch('https://xogapi.ddebajyati.workers.dev?url=https://debajyati.com')
  .then(resp => resp.json())
  .then(data => console.log(data))

the above code will return the json response -

{
  "openGraph": {
    "title": "Debajyati Dey - Web Developer and Freelance Technical Writer",
    "description": "Hi I'm Debajyati Dey, a skilled Web Developer creating dynamic web solutions and a Freelance Technical Writer delivering precise, user-friendly documentation. Let's build something great!",
    "image": "https://debajyati.com/og-image.png",
    "url": "https://debajyati.com"
  },
  "xTwitter": {
    "title": "Debajyati Dey - Web Developer and Freelance Technical Writer",
    "description": "Hi I'm Debajyati Dey, a skilled Web Developer creating dynamic web solutions and a Freelance Technical Writer delivering precise, user-friendly documentation. Let's build something great!",
    "image": "https://debajyati.com/twitter-card-enhanced.png",
    "url": "https://debajyati.com"
  }
}

About

Opengraph & twitter HTML metadata scraper web api to generate link preview cards from urls

Topics

Resources

Stars

Watchers

Forks