Existing Web API search engines allow only category-based browsing and keyword- or tag-based searches for RESTful services. In other words, they do not enable the discovery or composition of real-world RESTful services by application developers. This paper outlines a novel scheme, called Transformation–Annotation–Discovery (TAD), which transforms OpenAPI (Swagger) documents related to RESTful services into a graph structure and then automatically annotates the semantic concepts on graph nodes using Latent Dirichlet Allocation (LDA) and WordNet. TAD can then be used for service composition based on the user requirements specified in two modules: a service discovery chain and logical-operation-based composition. The service discovery chain uses the Hungarian algorithm to assess service interface compatibility in order to facilitate the retrieval of services capable of bridging the gap between specified user requirements and the discovered services. The logical-operation-based composition module identifies services that semantically fit the user requirements, based on the structure of the service flow. Those candidate services are then sent to service discovery chains to enable the simultaneous search for potential composition solutions. System prototype and experiment results demonstrate the feasibility and efficacy of the proposed scheme.