How to restrict a BLAST search to include only a few protein sequences?
The gene identifiers that you get in BLAST output depends on the identifiers used during the BLAST database construction. So you may not find the exact identifier you are looking for.

For restricting the BLAST results to a smaller set of proteins/nucleic acid you can choose either of the two:


Make a database with the fasta sequences of the proteins/nucleic acids that you want. You have to install BLAST and run it from the commandline. Use makeblastdb to make the database. Now you align your queries against this database. Note that now your e-values would not be the same as what you would obtain from a search against the bigger database.
As you said in the question, you can parse the results later. You would have to know what identifiers were used in the blast database that you searched against. ExPASy-BLAST would most probably use the UniProt IDs (there is an ID convertor in the UniProt website to map UniProt IDs to other IDs). If you use NCBI-BLAST (nr database) then you would need to know the GenBank IDs.