Convert anything to JSON


The API for converting any file to JSON.

Here you can see all available conversion options which you can use within the "options" section of conversions (see the example JSON below the table).

Here you can see all available conversion options which you can use within the "options" section of conversions (see the example JSON on the right).

Option Name Description
download_password
Type: string
Pattern: ^[ -~]{0,1000}$
Example: secret_password
A password to protect the download. To download the file send the password in the x-oc-download-password header or set a cookie named x-oc-download-password. The value contains a comma separated list of passwords.
keys_format
Type: string
Enum: original capital_first snake_lowercase snake_uppercase lowercase_nospaces lowercase_with_spaces uppercase_nospaces uppercase_with_spaces
Default: snake_lowercase
Required: False
The returned metadata keys' format. (E.g. Color Space, color_space, COLOR_SPACE, colorspace, color space, COLORSPACE, COLOR SPACE)
output_mode
Type: string
Enum: basic expert
Default: basic
Required: False
Returns a more or less detailed output
type
Type: string
Enum: document image video audio
Required: False

Output Example

POST /v2/jobs HTTP/1.1
Host: https://api.api2convert.com
X-Oc-Api-Key: <your API key here>
Content-Type: application/json
{
    "input": [{
        "type": "remote",
        "source": "https://example-files.online-convert.com/raster%20image/png/example_small.png"
    }],
    "conversion": [{
        "category": "metadata",
        "target": "json",
        "options": {
            <conversion options here>
        }
    }]
}