If you think you might be allergic to peanuts, you should see your doctor. He'll probably send you to an allergist for testing. The allergist will go through a step-by-step process in order to determine whether you're actually allergic to peanuts. First, your doctor will ask about past reactions: when you had symptoms of an allergy, what those symptoms were and how long they appeared after you ate something with peanuts in it. He'll also want to know about your family history and whether either of your parents had any food allergies. The allergist will probably conduct a physical examination in order to rule out other possible issues you may be suffering from.
If your doctor still isn't convinced that your problem is peanuts, he may ask you to keep a log of what you eat and what happens when you eat it. He also may try an elimination diet, where you cut out certain possible culprits from your diet for a few weeks, then slowly reintroduce them one by one to pinpoint where the trouble is. These diets aren't safe when your reactions are severe, however.
After all this, your allergist may decide to do a skin test, a blood test or both. In the skin test, the doctor will prick or scratch your skin lightly and insert tiny amounts of liquid allergens into the wounds. If any of the various allergens he tests for causes a red bump where you were pricked, that means you are allergic to that allergen. Blood tests are considered less accurate than skin tests. In a blood test, a sample of your blood is sent to a lab where it's mixed with various allergens. After they're mixed, the blood is checked for immunoglobulin E, which is the antibody that allergic reactions cause to be produced. If it's present, it indicates that you're allergic to the allergen being tested.