Same, but it is feasible outside the API as well by creating a lookup table. You could use the same to track whether the comment is collapsed, viewed comments, etc. Just make a table with:
comment ID
whatever flags you’re interested in
row creation time
data from the post - modified time, for example
Then as you’re creating posts, reference that db and make the appropriate changes. Have an option to clear old settings after some time based on the row creation time (say, a week) so storage doesn’t grow indefinitely
It’s feasible, but there’s a fair amount of work there.