Skip to content

fedmich/Py-Flask-Meta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Py-Flask-Meta

Open Graph Meta API (Image, OG, etc)

App preview

A lightweight Flask service that extracts Open Graph (og:*) metadata from URLs, such as og:image, og:title, and og:description. It intelligently caches HTML (60 days) and metadata (permanent) to optimize performance and reduce redundant requests.

Supports fallback "curl" browser impersonation for sites with bot detection.

Version 2 is also available for Advance Users. It has more features like multiple urls checking.

v2


๐Ÿš€ Sample API Usage

JavaScript (Fetch)

fetch('http://localhost:5000/meta', {
  method: 'POST',
  body: new URLSearchParams({ url: 'https://ogp.me/' })
})
.then(res => res.json())
.then(data => console.log(data['og:image']));

curl

curl -X POST http://localhost:5000/meta \
  -d "url=https://ogp.me/"

Python

import requests

response = requests.post('http://localhost:5000/meta', data={
    'url': 'https://ogp.me/'
})
print(response.json()['og:image'])

โ˜• Buy me a coffee

About

Open Graph Meta API (Image, OG, etc)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages