This worker gets the last scrobble of @timmotheus as a JSON response using a Cloudflare Worker and the Last.FM API.
You can fork this repo and use Cloudflares wrangler CLI to publish this worker in your own account.
You'll need to add one secret:
wrangler secret put LASTFM_API_KEY --env production
You can create an App and get this key by visiting the API applications page.