How to get the best seller products in last 3/7/31 days

Hi everyone,
How to get the best seller products in last 3/7/31 days via rest API or GraphQL? I tried to look at documentation but can not find anything.