Can I send an external URL to the Discourse API for it to return topics linking to that URL?

Yes I think so, kinda.

Try this, e.g.:

https://meta.discourse.org/search.json?q=https%3A%2F%2Fnews.bbc.co.uk

Tidy results in JavaScript.

If anon can use search you perhaps don’t need an API key even (then you can put this client side)

However you might want to cache the results on the external server for best results and avoid poor Discourse get overwhelmed with search queries.

So this probably involves writing server side code on your external website for best outcome.

2 Likes