How to get local toot ID from remote URL

Hi,

Is there a way to do the opposite of How to get URL of toot from toot ID? ?

I have a remote status URL and want to convert it to the local status ID of my instance?

Background:
I have an Mastodon Bot (mycete) that tells you if you’ve been e.g. mentioned on Mastodon. It shows you the status URL, so you can check our the status on the Web.
Given the URL, the Bot (mycete) should allow you to boost / favourite / reply-to a status.

Why use the URL of a status as argument and not the local status ID?
Because that’s the information the user has and can get from either the Web or the Matrix room. The local status ID is much harder to obtain for the user. (Showing the local status ID in the room would just solve half of the problem and create others)

So how does one translate a remote URL into a local status ID for use with the API using only the API?
Certainly this is a solved problem, as when a user wants to favourite a remote status, he is redirected to e.g. https://mastodon.social/authorize_interaction?uri=REMOTE_URL and the server then redirects him to that status with the local status ID.

This however seems to require that one is logged in and has a cookie set and is thus unsuitable for app development.