Get only top level posts in topic via discourse API

That is correct. There is not a filter that can be added to the topic endpoint to get what you are after. However we do have the

which you could use to write a sql query to get what you are after. You can then save that query and hit the api endpoint for the saved query and pass it a topic_id as a param.

2 Likes