Topic URL to include its Category

If you’re the one explicitly providing the URLs to the scraper and defining how it’ll extract the category from them, you might be able to use what Tobias suggested as a hack – you could provide it with /t/category-name__topic-slug/topic-id, for example. Discourse will serve a 301 redirect response to the final URL, based solely on the topic-id.

If it gets the URLs during the scraping process, though, it feels like a lot of work for a change aimed only at fulfilling a limitation in the scraping strategy.

Not that I know of. Serving a /t/category-name/topic-slug/topic_id route in a plugin seems doable, but then having an option so all references to topics in Discourse prefer this alternative route seems (to me, personally) like too much work for little gain.