Check Number of Words with NET REST API

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

Steps to Check Word Count with C# Low Code API

  1. Instantiate the Configuration object and use it to create the WordsApi object for Word file statistics
  2. Load the source Word file into a byte array for accessing statistics
  3. Create the request object for the loaded document using the GetDocumentStatisticsOnlineRequest class
  4. Fetch the statistics using the GetDocumentStatisticsOnline() method
  5. 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.

 English