{"id":13447252,"url":"https://github.com/sindresorhus/get-urls","last_synced_at":"2025-05-15T10:05:45.678Z","repository":{"id":14141910,"uuid":"16847530","full_name":"sindresorhus/get-urls","owner":"sindresorhus","description":"Get all urls in a string","archived":false,"fork":false,"pushed_at":"2023-08-15T18:21:19.000Z","size":62,"stargazers_count":369,"open_issues_count":2,"forks_count":47,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-11T20:26:24.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sindresorhus.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":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2014-02-14T19:45:05.000Z","updated_at":"2025-04-30T06:32:04.000Z","dependencies_parsed_at":"2023-12-19T05:51:48.605Z","dependency_job_id":"e5e6db66-4334-4a5e-ba4f-f62ed8628ad3","html_url":"https://github.com/sindresorhus/get-urls","commit_stats":{"total_commits":84,"total_committers":16,"mean_commits":5.25,"dds":0.2857142857142857,"last_synced_commit":"73834dff3a59f5cca99f782d74cc65a20a8b4333"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fget-urls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fget-urls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fget-urls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fget-urls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/get-urls/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319718,"owners_count":22051072,"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":[],"created_at":"2024-07-31T05:01:12.095Z","updated_at":"2025-05-15T10:05:45.546Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["JavaScript"],"sub_categories":[],"readme":"# get-urls\n\n\u003e Get all URLs in a string\n\nThe URLs will be [normalized](https://github.com/sindresorhus/normalize-url).\n\n*Do not use this for any kind of security-related validation.*\n\nPlease note the [known limitation](https://github.com/niftylettuce/url-regex-safe#limitations). You can work around this by setting `requireSchemeOrWww` to `true`.\n\n## Install\n\n```sh\nnpm install get-urls\n```\n\n## Usage\n\n```js\nimport getUrls from 'get-urls';\n\nconst text = 'Lorem ipsum dolor sit amet, //sindresorhus.com consectetuer adipiscing http://yeoman.io elit.';\n\ngetUrls(text);\n//=\u003e Set {'http://sindresorhus.com', 'http://yeoman.io'}\n```\n\n## API\n\n### getUrls(text, options?)\n\nReturns a `Set` of URLs.\n\n### text\n\nType: `string`\n\n### options\n\nType: `object`\n\nAll the `normalize-url` [options](https://github.com/sindresorhus/normalize-url#options) in addition to:\n\n#### extractFromQueryString\n\nType: `boolean`\\\nDefault: `false`\n\nExtract URLs that appear as query parameters in the found URLs.\n\n#### exclude\n\nType: `string[]`\\\nDefault: `[]`\n\nExclude URLs that match URLs in the given array.\n\n#### requireSchemeOrWww\n\nType: `boolean`\\\nDefault: `false`\n\nRequire URLs to have a scheme or leading `www.` to be considered an URL. When `false`, matches against a list of valid TLDs, so it will match URLs like `unicorn.education`.\n\nDoes not affect URLs in query parameters if using the `extractFromQueryString` option.\n\n## Related\n\n- [get-urls-cli](https://github.com/sindresorhus/get-urls-cli) - CLI for this module\n- [linkify-urls](https://github.com/sindresorhus/linkify-urls) - Linkify URLs in text\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fget-urls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fget-urls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fget-urls/lists"}