This article guides on how to check number of words with NET REST API. You will learn counting words in MS Word with C# Low Code API with the help of .NET cloud SDK. It will assist you in getting statistics of individual pages in a Word file according to your requirements.
Prerequisite
- Create an account and get API credentials
- Download Aspose.Words Cloud SDK for Dotnet to count words in a Word file
- Setup C# solution project with the above SDK for fetching statistics of a Word file
Steps to Check Word Count with C# Low Code API
- Instantiate the Configuration object and use it to create the WordsApi object for Word file statistics
- Load the source Word file into a byte array for accessing statistics
- Create the request object for the loaded document using the GetDocumentStatisticsOnlineRequest class
- Fetch the statistics using the GetDocumentStatisticsOnline() method
- Display page count, word count on a specific page, and total word count in the loaded document
The above steps describe how to write an application for checking the Word document word count with C# REST API. Load the source Word file and create a request object for document statistics using the GetDocumentStatisticsOnlineRequest() class. Call the GetDocumentStatisticsOnline() method to get the statistics of the World file and display the information.
Code to Count Words in MS Word with NET REST API
This sample code demonstrates how to check word count online with C# REST API for a Word file. The API returns a response object containing the page count, a collection of statics for individual pages, a word count for all the pages, and footnote information. You can perform INQ queries on the statistics collection to fetch specific information to fulfill your application requirements.
This article has taught us to get number of words in Word document with C# Low Code API. To get metadata of a World file, refer to the following article: Extract metadata from Word Document with NET REST API.