I'm trying to build a data set based on Stackoverflow question and answers for testing some Natural Language Processing algorithms. So far, I have a small Java program that based on a set of keywords it retrieves questions from StackOverflow tagged with these keywords.

In the next step, I need to retrieve the actual content of the question. In other words, given a question Id, how can I retrieve its content (content==the actual text written by the user)?

Is it possible to do this with the StackOverflow API?

If not, is there any workaround?

有帮助吗?

解决方案

Here's an example URL for getting the content of your question:

http://api.stackoverflow.com/1.1/questions/16640957?body=true

The content is in the body field. More info.

其他提示

enter image description herefrom http://api.stackoverflow.com/1.1/usage/methods/questions-by-ids

body: When "true", a post's body will be included in the response. 

It's what your looking for. ;)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top