Skip to content

About

An API that provide product/library name for a URL.

Resources

Code of conduct

Security policy

Stars

6 stars

Watchers

2 watching

Forks

Repository files navigation

JSer.info Product Name API

Tiny Web API that provide product/library name for a URL.

This Web API uses JSer.info Dataset and runs on Cloudflare Workers.

Response

  • name: product name
  • url: product url
  • releaseNoteVersion: release note version if the target url is release note.
    • string | undefined
  • releaseNoteProbability: Do this url have release notes?
    • 0 - 1

Usage

The API is available at https://product-name.jser.workers.dev/.

Get Supported All products.

curl https://product-name.jser.workers.dev/

Get a product name for URL

curl "https://product-name.jser.workers.dev/?url=${url}"

Example

$ curl https://product-name.jser.workers.dev/
[{"name":"jQuery Mobile","url":"http://jquerymobile.com"},{"name":"jQuery","url":"http://blog.jquery.com"},{"name":"Node","url":"http://blog.nodejs.org"},{"name":"Bootstrap","url":"http://blog.getbootstrap.com"}, ...]
$ curl "https://product-name.jser.workers.dev/?url=https://deno.com/blog/v1.19"
{"name":"Deno","url":"https://deno.com","releaseNoteProbability":0.7619047619047619,"releaseNoteVersion":"v1.19"}

No Data

$ curl "https://product-name.jser.workers.dev/?url=https://example.com"
null # status code is 404

Develop

Requires Node.js 22 or newer and pnpm 10.15.0.

pnpm install
pnpm dev

make run also starts the local server on port 8000. Each request fetches the current JSer.info dataset; no database or storage binding is required.

Test

pnpm test
pnpm typecheck
pnpm build

make test also runs the tests. pnpm build bundles the Worker without deploying it.

Deploy

pnpm exec wrangler login
pnpm deploy

Wrangler deploys the product-name Worker to the Cloudflare account with the jser.workers.dev subdomain. Update API clients to use its public URL; the previous deno.dev address cannot be served by Cloudflare Workers.

For Workers Builds, connect this repository, set the build command to pnpm typecheck && pnpm test && pnpm build, and the deploy command to pnpm deploy. GitHub Actions runs checks only.

Related

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

About

An API that provide product/library name for a URL.

Resources

Code of conduct

Security policy

Stars

6 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages