Skip to content

Web API

lastversion public API¤

You don't need to use lastversion as a command line tool or install it as a package to use it. You can use the public web API at lastversion-api.getpagespeed.com.

Usage¤

Make a GET request to https://lastversion-api.getpagespeed.com/<github-repo> to get the latest version of the repository in JSON format.

To get only the version number, append ?version to the URL.

Examples:

Note that API caches results for 2 hours.

For faster updates of your own project, please set up a webhook for your GitHub repo that points to:

https://lastversion-api.getpagespeed.com/hooks/github

Badges with the latest version¤

You can use the following badges in your project's README.md to show the latest version of your project:

For GitHub projects¤

![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Flastversion-api.getpagespeed.com%2Fdvershinin%2Flastversion&query=version&label=Release)

Just replace dvershinin and lastversion with your GitHub username and repository name.

The result will look like this:

Dynamic JSON Badge

Alternatively, head to Shields.io dynamic page configurator:

  • Set URL to https://lastversion-api.getpagespeed.com/<your-github-user>/<your-github-repo>
  • Set query to version
  • Set label to Release or whatever you want, and set other settings as desired.

Click Execute to verify results and copy Markdown or desired format.