We at Doc Conversion API, continue to develop new features that will bring value to our customers and enhance their experience. That’s why we’re happy to announce that we have now released a new word count feature for word documents (.doc, .docx, etc).
The new word count feature has been highly requested by our customers, and we believe that it will make a big difference, as it is super simple, accessible and easy to use. Anyone can use it, even without any programming background.
Finding your word count is easy if you have a single document or two, but when you have a large number of documents to process and go through, it can be quite time consuming and it becomes increasingly difficult to maintain accuracy.
Instead of writing long pieces of code and wasting your time going through the iterations of testing and optimizing your code, we have now created an optimum solution for you; an easy to use, highly reliable, REST API that you can just call into with a few simple lines, to get your documents word count.
This feature will give you the exact number of words in your documents, and it supports Word documents only at the moment, so extensions like (.doc, .docx, etc) are all supported, with clear plans of expanding this feature in the future to cover more document formats.
Using the REST API to find your word count (CURL)
Doc Conversion API is compatible with all programming languages and frameworks; you can find a list of code examples here.
You can simply find the word count for your documents by making a POST request, using the below URL Along with your APP credentials (Application ID and Secret Key):
To make the following curl request:
curl --request POST \ --url 'https://api.docconversionapi.com//utility/wordcount' \ --header 'X-ApplicationID: <Your_Application_ID>' \ --header 'X-SecretKey: <Your_Application_SecretKey>' \ --header 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ --form inputFile= <INPUT FILE PATH> \ --form optionsJSON=
X-ApplicationID is your application ID
X-SecretKey is your secret ky
OutPutFormat is HTML
InputFile is the file you would to like to convert
optionsJSON is a JSON String containing any additional options relevant to the request type.
Using the REST API to find your word count (PHP)
Doc Conversion API is compatible with all main programming languages and frameworks; you can find a list of code examples here.
For this PHP example, we’re using a direct URL for our word document (the document we would like to find the word count for) for simplicity; you can also upload documents to the service or use your own linked storage files.
We’re going to be using this example (this document has 39 words):
We’re going to create a simple PHP page that reads the Doc file from a URL, and finds the total number of words in this file:
This code will execute the word count, and display the number of words (769) as an HTML page.
If you have any questions or need any further help, please contact us at [email protected]