.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEGetSDData

.. oe:function:: OEGetSDData

   .. oe:language:: c++ java csharp

      .. oe:api::

         std::string OEGetSDData(const OEMolBase& mol, const std::string& tag)

   .. oe:language:: python

      .. oe:api:: python

         OEGetSDData(mol: Union[OEGraphMol,OEMol,OEQMol], tag: str) -> str

   Returns the SD data for the given tag. If the molecule does not have
   that tag, an empty string is returned.
   If there are multiple items with the same tag, only the first data
   is returned.

   .. seealso::

      * :oe:func:`OEChem::OEGetSDDataPairs` function to access multiple items with the same tag
      * :oe:func:`OEChem::OEAddSDData` and :oe:func:`OEChem::OESetSDData` functions
      * :ref:`section_moltaggeddata_SD` section

   .. admonition:: Code Example

      * :ref:`section_example_oechem_sdf2csv` example
      * :ref:`section_example_oechem_sdfilter` example
