Looking into it more, not as straight forward as I thought
The view-source doesn’t expose the post id.
The latest RSS does
as does a topics JSON
I don’t see any “pin” in either the RSS or JSON (unless I missed something)
So if you get the post id from the RSS you would need to take Pinned topics into consideration.
Same it you wanted to get a topics JSON.
I think I’d go with the RSS get enough to make sure all Pinned were got past, and use the highest number eg.
4234, 4303, 5347, 5329 - use 5347