I'm not sure of any programs that will do this for you but Lemmy has a pretty nice API that you can use and there are libraries you can use for languages like JavaScript: https://github.com/LemmyNet/lemmy-js-client
import { LemmyHttp } from 'lemmy-js-client
const client = new LemmyHttp( 'https://beehaw.org/' )
const response = await client.search( {
listing_type: 'Local',
q: 'https://www.huckmag.com/article/sex-workers-and-the-kink-community-are-fighting-back-against-instagram-deplatforming',
sort: 'TopNineMonths',
type_: 'Url'
} )
console.log( response.posts.length ) // Should print '1' to the console