Why we cannot include the params section when retrieving the comments of reddit?

Screen Link:

Hi,
When we retrieve the posts from reddit, we used this format:
response=requests.get(“https://oauth.reddit.com/r/python/top”, headers=headers, params=params)
with params={“t”: “day”}
But, when we want to retrieve the comments from a post, if we include params it gives error. Why? How can we know what to include in each instance?
Thanks a lot!

Hello @ncirauqu,

Please include a link to the screen in your post as per these guidelines. This will make it easier for people to help you.

Hi Octavio,
Sorry, usually it was included where it says Screen Link, but it does not appear. Thanks ofr noticing it.
Here the link:

1 Like

We will have to read API documentation for it.

As For post documentation is - https://old.reddit.com/dev/api#GET_{sort}

And For Comment is - https://old.reddit.com/dev/api#GET_comments_{article}

Ah! I see! I did not know how to find the info for each endpoint. Thanks so much!!!

Welcome! and another thing i just realized i did not mention that red boxes i have marked are clickable links to the endpoints. Hope you have already figure out by now.

Yes, figured out and checked :slight_smile: Thanks!!!