What are the maximum number of days an original contractor has to file a notice of lien and an “application for a lien” after completing a project?

What are the maximum number of days an original contractor has to file a notice of lien and an “application for a lien” after completing a project?