According to this question (and its answer), questions and answers are using the same index to determine their ID. In other words:

  • Question with ID #1
    • Answer with ID #2
    • Answer with ID #3
    • Answer with ID #4
  • Question with ID #5

Because the 3 answers consumed 3 ids, it is impossible for a question to have ID #2, #3, or #4. This is the behavior as defined in the question linked to above.

However, this is not reflected in the API. In some cases, you must know the type of a post in order to request information about it. For example, if you want to request the comments of a particular post, you must use either /questions/{id}/comments or /answers/{id}/comments. It would be really wonderful if I could just use /posts/{id}/comments and not have to rely on knowing the post type in order to retrieve its comments.

Pretty please?

  • Why would you need this? Commented May 29, 2010 at 20:01
  • @Kevin it makes library implementation slightly simpler. Specific example: retrieve the comments to a particular post. Instead of having to know that the post is a Q or an A, I could just request /posts/{id}/comments and be done with it. (which I realize now isn't immediately obvious in my question. i'll update it) Commented May 29, 2010 at 20:50
  • 1
    There's some merit to a posts/{id}/comments method. However, if any method might return different types (for instance, a hypothetical /posts/{id}) I'd have to say its not worth complexity. Commented May 30, 2010 at 5:18

1 Answer 1


The /posts/{id}/comments method has been implemented.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .