API to scrape meta from URLs
URL Meta provides a straight forward API to get meta of any given page on the internet. Following documentation covers the API. If you still have any questions, please reach out via chat or at team@urlmeta.org.
You'll need to register and get a free API key to access the API.
Auth
Follow the auth guide to add the required headers and your API key with requests.
Basics
| Key | Value | Help |
|---|---|---|
| Endpoint | api.urlmeta.org/meta | Should always be accessed over https |
api.urlmeta.org/ (deprecated) | ||
| Method | GET |
Query Parameters
| Key | Value | Help |
|---|---|---|
| url | The URL to fetch | required Along with scheme i.e: http or https |
Example
To fetch the meta for https://backupdiary.com, we'll use:
https://api.urlmeta.org/meta?url=https%3A%2F%2Fbackupdiary.comIt is recommended to encode the
urlvalue. You can useencodeURIComponentin JavaScript and similar methods in other environments.
Response
The API will always return JSON response. Here's the response schema returned by the API.
{
"result": {
"status": "OK"
},
"meta": { ... }
}meta key will contain all the meta parsed from the target page.
Here's an example response when https://backupdiary.com (opens in a new tab) is passed as url:
{
"result": {
"status": "OK"
},
"meta": {
"site": {
"name": "Backup Diary",
"favicon": "https://backupdiary.com/icon.svg",
"twitter": "https://twitter.com/@UseBackupDiary"
},
"image": "https://backupdiary.com/social-image.png",
"title": "Backup Diary - leave a note for your loved ones",
"description": "Store your important information, add recipients and then sign-in to your account once every 60 days. If you miss it, we'll send the information to your recipients."
}
}
metawill only have the properties available on the given page. Make sure they are available in response before consuming them.