Download Images

You can download images in jpeg, svg, and png formats when using universal or universal_ecommerce sources.

If you do that through Proxy Endpoint, you can simply save the output to image extension, for example:

curl -k -x -U "USERNAME:PASSWORD" "" >> image.svg

If you are using the Push-Pull or Realtime integration methods, you will need to add the content_encoding parameter with a value of base64. Once you receive the results, you need to decode encoded data from content into bytes and save it as an image file.

Please find an example in Python below.

import base64
import json
import requests

# Your credentials.

# Image URL which will be saved to file.

# Realtime URL.

def dump_to_file(filename: str, data: bytes):
    with open(filename, 'wb') as file:

def main():
    parameters = {
        'source': 'universal',
        'url': URL_IMAGE,
        'content_encoding': 'base64',
    response =, json=parameters)
    if response.ok:
        data = json.loads(response.text)
        content_base64 = data['results'][0]['content']
        # Decode base64 encoded data into bytes.
        content = base64.b64decode(content_base64)
        dump_to_file('out.svg', content)

if __name__ == '__main__':

Last updated