@staticmethod
def _construct_api_url(molecule, file_format=None, get3d=True, **kwargs):
    """

        Return the URL for the desired API endpoint.

        Arguments:
            molecule (String): Smiles representation of the molecule we are interested in.
            get3d (Boolean): Parameter Cactus needs to handle to return the mol2 data.

        Returns:
            url (string): The full url used to request from cactus.

        """
    _API_BASE = 'https://cactus.nci.nih.gov/chemical/structure'
    from urllib.parse import quote, urlencode
    kwargs['format'] = file_format
    representation = 'file'
    tautomers = 'tautomers:%s' % molecule
    url = '{}/{}/{}/{}'.format(_API_BASE, quote(tautomers), representation,
        'xml/')
    if get3d:
        kwargs['get3d'] = True
    url += '?%s' % urlencode(kwargs)
    return url
