You have to have been working for at least 26 out of the 66 weeks leading up to the due date of your baby. That may not mean you were paying NICs because they are only payable above the LEL and the reason some people have to get MA is because they have not earned above the LEL for the qualifying period in order to get SMP.
So even if you have earned £30 a week (average), you can apply.
You choose the 13 weeks where you earned the most within that 66 week period (providing you have definitely worked 26 weeks in total), and you use those 13 weeks to give you the average weekly earnings. When you have that you need to work out 90% of it. You will get that amount OR 123.06 a week whichever is the lowest, and you will get it for 39 weeks from the date you start it. You can start it from 11 weeks before EDD (so 29 weeks of pregnancy).