How to get posts viewed by a user via APIs?

Have you had a look through the rest API documentation?

Also Data Explorer queries

5 Likes