{"id":13454052,"url":"https://github.com/jacktuck/unfurl","last_synced_at":"2025-05-15T20:03:46.949Z","repository":{"id":37580212,"uuid":"86367123","full_name":"jacktuck/unfurl","owner":"jacktuck","description":"Metadata scraper with support for oEmbed, Twitter Cards and Open Graph Protocol for Node.js :zap:","archived":false,"fork":false,"pushed_at":"2024-04-09T03:06:36.000Z","size":17991,"stargazers_count":492,"open_issues_count":1,"forks_count":53,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-10T01:04:54.809Z","etag":null,"topics":["embed","meta-tags","metadata","micro","microservice","nodejs","oembed","ogp","open-graph","scraper","slack","twitter-cards","unfurl"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacktuck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"jacktuck","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-03-27T17:57:09.000Z","updated_at":"2025-05-05T06:11:54.000Z","dependencies_parsed_at":"2024-01-15T19:44:40.595Z","dependency_job_id":"a5169410-8ee1-498b-989f-03c8fd1b18ac","html_url":"https://github.com/jacktuck/unfurl","commit_stats":{"total_commits":266,"total_committers":24,"mean_commits":"11.083333333333334","dds":0.5451127819548872,"last_synced_commit":"608b61dc10d86ae1a098f47e4838588915757021"},"previous_names":["jacktuck/unfurled"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacktuck%2Funfurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacktuck%2Funfurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacktuck%2Funfurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacktuck%2Funfurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacktuck","download_url":"https://codeload.github.com/jacktuck/unfurl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254330085,"owners_count":22052925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embed","meta-tags","metadata","micro","microservice","nodejs","oembed","ogp","open-graph","scraper","slack","twitter-cards","unfurl"],"created_at":"2024-07-31T08:00:50.572Z","updated_at":"2025-05-15T20:03:45.550Z","avatar_url":"https://github.com/jacktuck.png","language":"TypeScript","readme":"# Unfurl\n\nA metadata scraper with support for oEmbed, Twitter Cards and Open Graph Protocol for Node.js (\u003e=v8.0.0). \n\nNote: Will not work in the Browser\n\n[![Travis CI](https://img.shields.io/travis/jacktuck/unfurl?style=flat-square)](https://travis-ci.org/jacktuck/unfurl)\n[![Coverage Status](https://img.shields.io/coveralls/jacktuck/unfurl?style=flat-square)](https://coveralls.io/github/jacktuck/unfurl?branch=master)\n[![Known Vulnerabilities](https://snyk.io/test/github/jacktuck/unfurl/badge.svg?style=flat-square)](https://snyk.io/test/github/jacktuck/unfurl)\n[![npm](https://img.shields.io/npm/v/unfurl.js?style=flat-square)](https://www.npmjs.com/package/unfurl.js)\n\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/jacktuck)\n\n## The what\nUnfurl _(spread out from a furled state)_ will take a `url` and some `options`, fetch the `url`, extract the metadata we care about and format the result in a sane way. It supports all major metadata providers and expanding it to work for any others should be trivial.\n\n## The why\nSo you know when you link to something on Slack, or Facebook, or Twitter - they typically show a preview of the link. To do so they have crawled the linked website for metadata and enriched the link by providing more context about it. Which usually entails grabbing its title, description and image/player embed.\n\n## The how\n```bash\nnpm install unfurl.js\n```\n\n### `unfurl(url [, opts])`\n#### url - `string`\n---\n#### opts - `object` of:\n-  `oembed?: boolean` - support retrieving oembed metadata\n-  `timeout?  number` - req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies)\n-  `follow?: number` - maximum redirect count. 0 to not follow redirect\n-  `compress?: boolean` - support gzip/deflate content encoding\n-  `size?: number` - maximum response body size in bytes. 0 to disable\n-  `headers?: Headers | Record\u003cstring, string\u003e | Iterable\u003creadonly [string, string]\u003e | Iterable\u003cIterable\u003cstring\u003e\u003e` - map of request headers, overrides the defaults\n\nDefault headers:\n```\n{\n  'Accept': 'text/html, application/xhtml+xml',\n  'User-Agent': 'facebookexternalhit'\n}\n```\n---\n#\n```typescript\nimport { unfurl } from 'unfurl.js'\nconst result = unfurl('https://github.com/trending')\n```\n---\n#### result is `\u003cPromise\u003cMetadata\u003e\u003e`\n```typescript\ntype Metadata = {\n  title?: string\n  description?: string\n  keywords?: string[]\n  favicon?: string\n  author?: string\n  theme_color?: string\n  canonical_url?: string\n  oEmbed?: OEmbedPhoto | OEmbedVideo | OEmbedLink | OEmbedRich\n  twitter_card: {\n    card: string\n    site?: string\n    creator?: string\n    creator_id?: string\n    title?: string\n    description?: string\n    players?: {\n      url: string\n      stream?: string\n      height?: number\n      width?: number\n    }[]\n    apps: {\n      iphone: {\n        id: string\n        name: string\n        url: string\n      }\n      ipad: {\n        id: string\n        name: string\n        url: string\n      }\n      googleplay: {\n        id: string\n        name: string\n        url: string\n      }\n    }\n    images: {\n      url: string\n      alt: string\n    }[]\n  }\n  open_graph: {\n    title: string\n    type: string\n    images?: {\n      url: string\n      secure_url?: string\n      type: string\n      width: number\n      height: number\n      alt?: string\n    }[]\n    url?: string\n    audio?: {\n      url: string\n      secure_url?: string\n      type: string\n    }[]\n    description?: string\n    determiner?: string\n    site_name?: string\n    locale: string\n    locale_alt: string\n    videos: {\n      url: string\n      stream?: string\n      height?: number\n      width?: number\n      tags?: string[]\n    }[]\n    article: {\n      published_time?: string\n      modified_time?: string\n      expiration_time?: string\n      author?: string\n      section?: string\n      tags?: string[]\n    }\n  }\n}\n\ntype OEmbedBase = {\n  type: \"photo\" | \"video\" | \"link\" | \"rich\"\n  version: string\n  title?: string\n  author_name?: string\n  author_url?: string\n  provider_name?: string\n  provider_url?: string\n  cache_age?: number\n  thumbnails?: [\n    {\n      url?: string\n      width?: number\n      height?: number\n    }\n  ]\n}\n\ntype OEmbedPhoto = OEmbedBase \u0026 {\n  type: \"photo\"\n  url: string\n  width: number\n  height: number\n}\n\ntype OEmbedVideo = OEmbedBase \u0026 {\n  type: \"video\"\n  html: string\n  width: number\n  height: number\n}\n\ntype OEmbedLink = OEmbedBase \u0026 {\n  type: \"link\"\n}\n\ntype OEmbedRich = OEmbedBase \u0026 {\n  type: \"rich\"\n  html: string\n  width: number\n  height: number\n}\n```\n\n## The who 💖\n_(If you use unfurl.js too feel free to [add your project](https://github.com/jacktuck/unfurl/edit/master/README.md))_\n- [vapid/vapid](https://github.com/vapid/vapid) - A template-driven content management system\n- [beeman/micro-unfurl](https://github.com/beeman/micro-unfurl) - small microservice that unfurls a URL and returns the OpenGraph meta data.\n- [probot/unfurl](https://github.com/probot/unfurl) - a GitHub App built with probot that unfurls links on Issues and Pull Request discussions\n\n\n","funding_links":["https://ko-fi.com/jacktuck"],"categories":["TypeScript","nodejs","scraper"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacktuck%2Funfurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacktuck%2Funfurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacktuck%2Funfurl/lists"}