The invention belongs to the field of information retrieval, and discloses an API information retrieval method for natural language form and based on lecture notes and Stack Overflow. The method comprises: constructing an API-KI library of API and knowledge items and performing extraction, the API-KI library comprising API and lecture segment API-segment pairs, API and question and answer sheet API-Q&A pairs; analyzing the questions in the natural language form, and obtaining potential APIs corresponding to the questions; identifying related API-KI using a relative identification mode TDML; performing potential APIs with related API-KI pair to generate a candidate list, carrying out descending sorting on the candidate list according to a sorting strategy, and finally returning the sorted API-KI list as a question answer. According to the retrieval method provided by the invention, information of API lecture and SO is integrated, the retrieval precision is effectively improved, and moreuseful API related knowledge can be provided for developers.