It is possible to retrieve links from the web by AppleScript?

I want to create a link on a webpage that when clicked will open up AppleScript. I’ve seen things where you can open a link in an app (i.e. opening a App Store link will request to open in the App Store app).

I was just wondering if this is possible?