Summary: In social media analysis, several researchers perform sampling from API (application programming interface) provided by the social media such as Facebook and Twitter to collect attribute information of entities to be analyzed. There are few reports of sampling method from search API, and hence it is not obvious how to sample from the API efficiently. This paper shows a method which enables us to improve the efficiency of sampling by using Wikipedia ontology. Our method generates multiple dictionaries from a given ontology, and changes using dictionary adaptively in conformity to a target topic. Besides, we propose estimated Jaccard coefficient as an evaluation criterion for a dictinoary. The expeiment reports that our method samples 18 million entities, 25.8% of all the entities in Facebook, and the method with estimated Jaccard coefficient outperforms existing methods.