I hope this helps,
1.make a file 'sample.list' with the list of compound IDs you have,
2.And then run the following CURL command below.
curl -g -s -S http://rest.kegg.jp/list/compound | grep -f sample.list | sed "s/cpd\://" > sample_extracted.table.txt
C00001 H2O; Water C00002 ATP; Adenosine 5'-triphosphate C00003 NAD+; NAD; Nicotinamide adenine dinucleotide; DPN; Diphosphopyridine nucleotide; Nadide; beta-NAD+ C00004 NADH; DPNH; Reduced nicotinamide adenine dinucleotide C00005 NADPH; TPNH; Reduced nicotinamide adenine dinucleotide phosphate C00006 NADP+; NADP; Nicotinamide adenine dinucleotide phosphate; beta-Nicotinamide adenine dinucleotide phosphate; TPN; Triphosphopyridine nucleotide; beta-NADP+ C00007 Oxygen; O2
I assume, I understand your question properly.
Suppose you are interested in the following three compound IDs:
Simply go to this webpage (have a look at how the URL has been constructed): http://rest.kegg.jp/get/C00259+C00140+C00818