The only way to find the part number of some switch that you have, when that device has no markings, is to search and search. Before you begin your search it is necessary to have on hand data such as:
- Switching Function (SPST, DPDT etc)
- Body Size (mm or other units)
- Lead Configuration and Spacing
Then you check online catalogues from multiple sources such as Digikey, Mouser, RS Components etc. Also check online manufacturer web sites from common switch sources.
As a last resort sometimes it can be productive to post a picture here with your question. Sometimes you may get lucky if a reader here recognizes the type of switch. Obviously clear well focused pictures are much more useful in this regard.