HTM to TXT API
The API for extracting Text from HTML files.
Try it FreeThe API for extracting Text from HTML files.
ConvertAPI offers a cloud-based solution, which makes HTM to TXT conversion effortless with just a single REST-API call:
Converting htm to txt via REST-API is now easier than ever. Sign up for a free account to obtain your authentication secret, append it as a query string parameter to the conversion URL, and voilà! You can find advanced authentication techniques in our docs.
Once you have your authentication in place, you can convert your files using application/json
, multipart/form-data
and application/octet-stream
content types.
A simple HTTP POST request using JSON would look like this:
You can easily convert htm to txt with a simple cURL request. Our documentation provides more advanced cURL request techniques.
ConvertAPI CLI allows you to convert files using our command-line file conversion utility tool. Check out CLI documentation for a detailed explanation and usage examples.
You can try out advanced conversion parameters and test the conversion result online using our interactive demo tool. This tool will produce the same conversion output as if you were using the library from your solution, and it will auto-generate the code snippet for you!
Try for FREE!HTTP authentication username. Could be used if conversion web page is protected with HTTP authentication.
HTTP authentication password. Could be used if conversion web page is protected with HTTP authentication.
Set additional cookies for the page request. Example: cookiename1=cookievalue1; cookiename2=cookievalue2; cookiename3=cookievalue3
Delay in seconds before page load and PDF creation. Sometimes useful to let web page fully load.
Specify a particular version of the Chromium engine to render the web page.
Values: latest 126 117
Block ads in converting page.
Tries to remove EU regulation required cookie warnings from web pages.
Allow web pages to run JavaScript.
Element selector string of the DOM element. Converter will wait for this element to appear in DOM before conversion begins.
Execute provided JavaScript before conversion begins.
Apply additional CSS before conversion begins.
Element selector string of the DOM elements that needs to be hidden during conversion.
Use CSS media type in conversion process. The default screen and print media types are supported but not limited to these. The custom media type, like convertapi can be used too.
Set custom HTTP headers to include in the request. Format: Header1:Value1|Header2:Value2|Header3:Value3
|
.:
.Specifies a CSS selector to identify and extract specific DOM elements from the page,
instead of scraping the entire content, allowing for more targeted and efficient data retrieval;
for example, to select elements by class name use .class-name
, to select an element by its ID use #elementId
,
or to select elements by their tag name use tagName
.
We ensure that all document processing is handled securely in the cloud, adhering to industry-leading standards like ISO 27001, GDPR, and HIPAA. To enhance security even further, we can ensure that no files or data are stored on our servers and never leave your country.
Learn more about security