This document describes DeepAPI, a deep learning model that uses an RNN encoder-decoder architecture to generate API usage sequences from natural language queries. It trains on a large corpus of code snippets paired with their documentation comments. DeepAPI is shown to outperform traditional IR approaches by better understanding query semantics and word order. Automatic and human evaluations demonstrate its ability to generate accurate and relevant API sequences for a variety of queries. Parameters like hidden units and word dimensions are analyzed. Enhancements like weighting APIs by importance further improve performance. DeepAPI has applications beyond code search like synthesis of sample code from query understanding.