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

Would it be possible, on an external non-Discourse website, to have a “Forum topics that discuss this page” section containing links to the relevant Discourse forum topics?

If the API can take a URL and return a list of topic IDs/URLs that would be perfect.

Do you know about Embed Discourse comments on another website via Javascript?

But if you think that multiple topics link to a page then you might be able to use the TopicLink table to do a search of topics that link that URL (probably with the Data Explorer plugin) and then you’d have the topic and post IDs so you could link to them.

I don’t think there’s an endpoint to get them. A plugin could make one available, I think. Also, Discourse GitHub doess something sort-of similar, so that might help.

1 Like

Do you think I could create a query with a URL parameter and run it via the API using this? Run Data Explorer queries with the Discourse API.

1 Like