It can be hard to make ends meet after losing your job, but there are some tax breaks from Uncle Sam to help cover job-hunting expenses. 

“Struggling job seekers can deduct almost every legitimate expense they incur while looking for employment provided they don't run afoul of IRS publication 529,” says David Selig, federal tax practitioner at Selig & Associates and Founder of TrueTaxHelp.com. “Most job seekers don't have a clue about the breaks or about most of the available tax deductions.”

According to IRS publication 529, job seekers can deduct certain job-searching expenses even if they remain unemployed. But with most tax code rules, there are some caveats. You can’t deduct expenses if you are looking for job in a new occupation. For instance, a doctor couldn’t write off the costs of trying to land a job as a lawyer, nor could a mortgage broker deduct the expenses of finding employment as a mechanic. 

First-time job seekers aren’t allowed to take deductions, and the IRS rules there can’t be a “substantial break” between the ending of your last job and the search for a new one. Self-employed people may not benefit from these deductions because they have to exceed 2% of your adjusted gross income, according to Selig.

So what can you deduct?

Costs incurred from using a headhunter or employment agency can be deducted come tax time. However, if a new employer covers those expenses you’ll have to count it as income when you file taxes. After all, the IRS doesn’t look kindly to double dipping.

Even in this digital age many job seekers mail out their resumes, which can be a costly affair between paper, stamps and printer expenses. The IRS allows you to deduct all the money spent on preparing and mailing your resume, even if you are sending out a 100 resumes a week. But remember the rule: your search must be for a job in your old occupation to remain eligible for the deduction.

If an out-of-town event or interview opportunity arises, you won’t have to worry about incurring all the travel costs. The IRS lets you deduct travel expenses if the primary purpose of the trip employment.  Even the car mileage you rack driving to and from interviews is deductible. The 2012 rate for business use of a vehicle was around 55 cents per mile.

According to the IRS, the amount of time you spend on personal activity compared to the amount you spend looking for an employment will determine if you can take the deductions.  “Be sure to keep excellent records in case the IRS thinks you’re trying to write off a wonderful vacation,” recommends Selig. You can take these deductions using  Schedule A (Form 1040 or Form 1040NR).

Experts say job-related write offs tend not to raise a red flag within the IRS, but they still recommend keeping all your receipts, networking event information, proof of travel and anything else that can validate a claim in the event of an audit.

“It's important that you keep detailed records that accurately catalogue your efforts. For example, keeping a diary is a good way to stay compliant and ensure that you get all the deductions that you're entitled to,” says Selig.