0

I need to get the question/answer content from Stack Overflow site using the username.

I know we are able to retrieve data using the question id, using this API call:

http://api.stackexchange.com/2.1/users/{id}

Is there a method to fetch questions and answered publish by a particular user?

Something like:

http://api.stackexchange.com/2.1/users/{username}
hichris123
  • 10,145
  • 15
  • 56
  • 70

2 Answers2

1

For a note , Method you mentioned, will return the user by user id, not question by question id.

You should change it to

http://api.stackexchange.com/2.1/users/{id}

To

http://api.stackexchange.com/2.1/questions/{id}

Coming back to your question,There is no method available to give you questions/answers by username, what you can give it try is that get id for user first and then try below methods for questions/answers of user respectively.

//Questions by user id :
http://api.stackexchange.com/2.1/users/{id}/questions?

//Answers by user id
http://api.stackexchange.com/2.1/users/{id}/answers?
Sanjiv
  • 1,795
  • 1
  • 29
  • 45
0

here you go:

http://api.stackoverflow.com/1.1/users/1759197/questions?answers=true

1759197 should be replaced by the users ID (in this case, that is your ID)

JustinM151
  • 744
  • 3
  • 11