How to programmatically fetch all failed jobs under a recurring job

I am looking for a way for my C# code to fetch a list of all (or recent 50) failed Job IDs for a recurring job but cannot find a solution or helpful tips in documentation.

Thanks