convertapi API Reference

Convert API lets you effortlessly convert file formats and types.

Swagger OpenAPI Specification | .NET Framework Client | .NET Core Client | Java Client | Node.JS Client | Python Client | Drupal Client

API Endpoint
https://api.cloudmersive.com
Schemes: https
Version: v1

Authentication

Apikey

API Key Authentication

type
apiKey
name
Apikey
in
header

ConvertData

CSV to JSON conversion

POST /convert/csv/to/json


Convert a CSV file to a JSON object array



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
object
Response Content-Types: application/json, text/json, application/xml, text/xml
Response Example (200 OK)
"object"

XML to JSON conversion

POST /convert/xml/to/json


Convert an XML string or file into JSON



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
object
Response Content-Types: application/json, text/json, application/xml, text/xml
Response Example (200 OK)
"object"

ConvertDocument

Word DOCX to PDF

POST /convert/docx/to/pdf


Convert Office Word Documents (docx) to standard PDF



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
string (byte)
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"

Word DOC (97-2003) to PDF

POST /convert/doc/to/pdf


Convert Office Word (97-2003 Format) Documents (doc) to standard PDF



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
string (byte)
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"

PowerPoint PPTX to PDF

POST /convert/pptx/to/pdf


Convert Office PowerPoint Documents (pptx) to standard PDF



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
string (byte)
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"

PowerPoint PPT (97-2003) to PDF

POST /convert/ppt/to/pdf


Convert Office PowerPoint (97-2003) Documents (ppt) to standard PDF



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
string (byte)
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"

Excel XLSX to PDF

POST /convert/xlsx/to/pdf


Convert Office Excel Workbooks (xlsx) to standard PDF. Converts all worksheets in the workbook to PDF.



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
string (byte)
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"

Excel XLS (97-2003) to PDF

POST /convert/xls/to/pdf


Convert Office Excel (97-2003) Workbooks (xls) to standard PDF. Converts all worksheets in the workbook to PDF.



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
object
Response Content-Types: application/octet-stream
Response Example (200 OK)
"object"

Excel XLSX to CSV

POST /convert/xlsx/to/csv


Convert Office Excel Workbooks (xlsx) to standard Comma-Separated Values (CSV) format.



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
string (byte)
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"

Convert Document to PDF

POST /convert/autodetect/to/pdf


Automatically detect file type and convert it to PDF.



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
string (byte)
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"

ConvertImage

Image format conversion

POST /convert/image/{format1}/to/{format2}


Convert between over 100 file formats, including key formats such as Photoshop (PSD), PNG, JPG, GIF, NEF, and BMP.



format1: string
in path

Input file format as a 3+ letter file extension. Supported formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV

format2: string
in path

Output (convert to this format) file format as a 3+ letter file extension. Supported formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV

inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

type
string (byte)
Response Content-Types: application/json, text/json, application/xml, text/xml
Response Example (200 OK)
"string (byte)"

ConvertTemplate

Apply HTML template

POST /convert/template/html/apply


Apply operations to fill in an HTML template, generating a final HTML result



Operations to apply to template

Code Example:
Request Content-Types: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
Request Example
{
  "HtmlTemplate": "string",
  "HtmlTemplateUrl": "string",
  "Operations": [
    {
      "Action": "integer (int32)",
      "MatchAgsint": "string",
      "ReplaceWith": "string"
    }
  ]
}
Response Content-Types: application/json, text/json, application/xml, text/xml
Response Example (200 OK)
{
  "Successful": "boolean",
  "FinalHtml": "string"
}

ConvertWeb

Take screenshot of URL

POST /convert/web/url/to/screenshot


Fully renders a website and returns a PNG screenshot of the full page image. Javascript, HTML5, CSS and other advanced features are all supported.



Screenshot request parameters

Code Example:
Request Content-Types: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
Request Example
{
  "Url": "string",
  "ExtraLoadingWait": "integer (int32)"
}
200 OK

OK

type
string (byte)
Response Content-Types: application/json, text/json, application/xml, text/xml
Response Example (200 OK)
"string (byte)"

Convert a URL to PDF

POST /convert/web/url/to/pdf


Fully renders a website and returns a PDF of the full page. Javascript, HTML5, CSS and other advanced features are all supported.



URL to PDF request parameters

Code Example:
Request Content-Types: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
Request Example
{
  "Url": "string",
  "ExtraLoadingWait": "integer (int32)"
}
200 OK

OK

type
string (byte)
Response Content-Types: application/json, text/json, application/xml, text/xml
Response Example (200 OK)
"string (byte)"

Convert HTML string to PDF

POST /convert/web/html/to/pdf


Fully renders a website and returns a PDF of the HTML. Javascript, HTML5, CSS and other advanced features are all supported.



HTML to PDF request parameters

Code Example:
Request Content-Types: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
Request Example
{
  "Html": "string",
  "ExtraLoadingWait": "integer (int32)"
}
200 OK

OK

type
object
Response Content-Types: application/json, text/json, application/xml, text/xml
Response Example (200 OK)
"object"

Convert Markdown to HTML

POST /convert/web/md/to/html


Convert a markdown file (.md) to HTML



inputFile: file
in formData

Input file to perform the operation on.

Code Example:
200 OK

OK

Response Content-Types: application/octet-stream
Response Example (200 OK)
{
  "Successful": "boolean",
  "Html": "string"
}

MergeDocument

Merge Multple Word DOCX Together

POST /convert/merge/docx


Combine multiple Office Word Documents (docx) into one single Office Word documents



inputFile1: file
in formData

First input file to perform the operation on.

inputFile2: file
in formData

Second input file to perform the operation on (more than 2 can be supplied).

Code Example:
200 OK

OK

type
string (byte)
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"

Schema Definitions

HtmlTemplateApplicationRequest: object

HTML template application request

HtmlTemplate: string
HtmlTemplateUrl: string
Operations: HtmlTemplateOperation
HtmlTemplateOperation
Example
{
  "HtmlTemplate": "string",
  "HtmlTemplateUrl": "string",
  "Operations": [
    {
      "Action": "integer (int32)",
      "MatchAgsint": "string",
      "ReplaceWith": "string"
    }
  ]
}

HtmlTemplateOperation: object

Action: integer (int32) 1
MatchAgsint: string
ReplaceWith: string
Example
{
  "Action": "integer (int32)",
  "MatchAgsint": "string",
  "ReplaceWith": "string"
}

HtmlTemplateApplicationResponse: object

Response from an HTML template application

Successful: boolean
FinalHtml: string
Example
{
  "Successful": "boolean",
  "FinalHtml": "string"
}

ScreenshotRequest: object

Details of the screenshot request

Url: string
ExtraLoadingWait: integer (int32)
Example
{
  "Url": "string",
  "ExtraLoadingWait": "integer (int32)"
}

HtmlToPdfRequest: object

Details of the HTML to PDF request

Html: string
ExtraLoadingWait: integer (int32)
Example
{
  "Html": "string",
  "ExtraLoadingWait": "integer (int32)"
}

HtmlMdResult: object

Result from converting a Markdown file to HTML

Successful: boolean

True if operation was successful, false otherwise

Html: string

Resulting HTML from the conversion

Example
{
  "Successful": "boolean",
  "Html": "string"
}