سؤال

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