How to get the contents of questions and answers from Stack Overflow?

53 Views Asked by At

I have a project that I am working on, that requires to fetch questions and answers from stack overflow.

I am using version 2.3 and it is working great, but I can't fetch the content of the question.

This is a URL example that I am using:

https://api.stackexchange.com/2.3/questions/75360972?order=desc&sort=activity&site=stackoverflow

This is the reponse:

{
    "items": [
        {
            "tags": [
                "python",
                "tkinter",
                "tkinter-button"
            ],
            "owner": {
                "account_id": 26806717,
                "reputation": 125,
                "user_id": 20731770,
                "user_type": "registered",
                "profile_image": "https://www.gravatar.com/avatar/c44ee0f48900a5f4dffd19307102484b?s=256&d=identicon&r=PG",
                "display_name": "Adam Basha",
                "link": "https://stackoverflow.com/users/20731770/adam-basha"
            },
            "is_answered": true,
            "view_count": 54,
            "accepted_answer_id": 75361583,
            "answer_count": 1,
            "score": 0,
            "last_activity_date": 1675690016,
            "creation_date": 1675684462,
            "last_edit_date": 1675690016,
            "question_id": 75360972,
            "content_license": "CC BY-SA 4.0",
            "link": "https://stackoverflow.com/questions/75360972/how-to-make-a-button-with-a-command-with-the-parameter-attribute-of-its-name-wit",
            "title": "How to make a button with a command with the parameter/attribute of its name with tkinter?"
        }
    ],
    "has_more": false,
    "quota_max": 300,
    "quota_remaining": 290
}

I want to get the content of the question and if it is answered the answer. I hope my question is clear.

0

There are 0 best solutions below