{"id":16584991,"url":"https://github.com/gorango/x-feed-parser","last_synced_at":"2026-04-20T02:33:19.744Z","repository":{"id":176992902,"uuid":"651773020","full_name":"gorango/x-feed-parser","owner":"gorango","description":"Universal feed parser for any format: RSS/Atom, JSON Feed, and HTML.","archived":false,"fork":false,"pushed_at":"2023-07-15T02:27:02.000Z","size":1000,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-23T16:44:08.282Z","etag":null,"topics":["feed","html","json","parser","rss","xml"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/gorango.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-06-10T03:51:16.000Z","updated_at":"2023-08-09T22:38:56.000Z","dependencies_parsed_at":"2025-01-16T16:15:31.388Z","dependency_job_id":"827573be-c0f7-4a54-9e89-8ec303d9c978","html_url":"https://github.com/gorango/x-feed-parser","commit_stats":null,"previous_names":["gorango/xfp","gorango/x-feed-parser"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/gorango/x-feed-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorango%2Fx-feed-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorango%2Fx-feed-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorango%2Fx-feed-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorango%2Fx-feed-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gorango","download_url":"https://codeload.github.com/gorango/x-feed-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorango%2Fx-feed-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32030134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["feed","html","json","parser","rss","xml"],"created_at":"2024-10-11T22:46:25.373Z","updated_at":"2026-04-20T02:33:19.715Z","avatar_url":"https://github.com/gorango.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# (X) Feed Parser\n\n[![Types][types-badge]][types-link]\n[![Size][size-badge]][size-link]\n\nParse [RSS](#parseXmlFeedstr), [Atom](#parseXmlFeedstr), [JSON Feed](#parseJsonFeedstr), and [HTML](#parseHtmlFeedstr) into a common JSON format. Complete with XML decoding, HTML sanitization, date standardization, media and metadata extraction.\n\nThis project is based on the [rbren/rss-parser][rss-parser] upgraded to [ESM][esm] with [JSDoc][jsdoc] types and the addition of features above.\n\n## Install\n\n```sh\nnpm install x-feed-parser\n```\n\n## Usage\n\n```js\nimport { parse } from 'x-feed-parser'\n\nlet rawFeedString // XML (RSS/Atom), JSON Feed, or HTML\nconst feed = parse(rawFeedString)\n```\n\nRunning the code above with a valid `rawFeedString` returns a response with the following [schema][types]:\n\n```\n{\n\ttype: 'rss' | 'atom' | 'json' | 'html'\n\tlang?: string\n\ttitle?: string\n\tdescription?: string\n\tfeedUrl?: string\n\tsiteUrl?: string\n\timageUrl?: string\n\tetag?: string\n\tupdatedAt?: string\n\titems?: [{\n\t\tid?: string\n\t\turl?: string\n\t\tlang?: string\n\t\ttitle?: string\n\t\tsummary?: string\n\t\tauthor?: string\n\t\tcontent?: string\n\t\tsnippet?: string\n\t\tcategories?: string[]\n\t\tcommentsUrl?: string\n\t\timageUrl?: string\n\t\tmedia?: [{\n\t\t\turl: string\n\t\t\tlength?: number\n\t\t\ttype?: string\n\t\t}]\n\t\tcreatedAt?: string\n\t\tupdatedAt?: string\n\t}]\n\tmeta?: {\n\t\t[key: string]: any // youtube, itunes metadata\n\t}\n}\n```\n\nSee the [`test/`](test/) folder for complete usage examples.\n\n## API\n\nThis library exports the [`parse`](#parse) function, which is a thin wrapper for [`parseXmlFeed`](#parseXmlFeedstr), [`parseJsonFeed`](#parseJsonFeedstr), and [`parseHtmlFeed`](#parseHtmlFeedstr).\n\n### `parse(str)`\n\nIdentifies the filetype (`xml`, `json`, or `html`) and assigns the appropriate parser.\n\n```js\nimport { parse } from 'x-feed-parser'\n```\n\n### `parseXmlFeed(str)`\n\nHandler for [RSS][rss] (v0.9 - v2.0) and [Atom][atom] feeds.\n\n```js\nimport { parseXmlFeed } from 'x-feed-parser'\n```\n\n### `parseJsonFeed(str)`\n\nHandler for [JSON feeds][json] (v1).\n\n```js\nimport { parseJsonFeed } from 'x-feed-parser'\n```\n\n### `parseHtmlFeed(str)`\n\n**WIP!** Extracts feed data from an HTML document using [rehype-extract-meta][rehype-meta] and [rehype-extract-posts][rehype-posts].\n\n```js\nimport { parseHtmlFeed } from 'x-feed-parser'\n```\n\n## License\n\n[MIT][license] © [Goran Spasojevic][author]\n\n\n\n\u003c!-- Definitions --\u003e\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n[jsdoc]: https://github.com/jsdoc/jsdoc\n[types-badge]: https://badgen.net/npm/types/x-feed-parser\n[types-link]: https://www.npmjs.com/package/x-feed-parser\n[size-badge]: https://packagephobia.com/badge?p=x-feed-parser\n[size-link]: https://packagephobia.com/result?p=x-feed-parser\n[rss-parser]: https://github.com/rbren/rss-parser\n[types]: ./types.ts\n[json]: https://www.jsonfeed.org/version/1/\n[rss]: https://validator.w3.org/feed/docs/rss2.html\n[atom]: https://validator.w3.org/feed/docs/atom.html\n[rehype-meta]: https://www.npmjs.com/package/rehype-extract-meta\n[rehype-posts]: https://www.npmjs.com/package/rehype-extract-posts\n[license]: license\n[author]: https://github.com/gorango\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgorango%2Fx-feed-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgorango%2Fx-feed-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgorango%2Fx-feed-parser/lists"}