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}

2 Answers 2

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?
Sign up to request clarification or add additional context in comments.

Comments

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)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.