Generally, anyone can file for bankruptcy. However, not everyone qualifies to file for a particular kind of bankruptcy. If you are an honest person who can't afford to pay your bills, you can qualify for bankruptcy. If you have previously filed for bankruptcy, it may affect your options. For example, if you have recently filed a chapter 7 bankruptcy, you cannot file another chapter 7 for eight years.
Bankruptcy is for the honest debtor with too much debt and no real way to repay it. So, you cannot file for bankruptcy to defraud your creditors. If you are in financial trouble, you cannot intentionally run up large debts with the intention of filing for bankruptcy afterwards.
There are records requirements. You must gather personal tax returns, proof of your income in the six months before filing, and a certificate of your attendance at a mandatory credit counseling class.