Check if a taxonomy term synonym exists
Edited my answer since my original answer referred to dev code.

The following simple module works with Drupal 7.34 and the current stable version of synonyms (7.x-1.2) and successfully matches a synonym to a taxonomy term.

synonyms_test.module:

function synonyms_test_menu() {
  $menu['test-synonyms'] = array(
    'page callback' =&gt; 'synonyms_test_page',
    'access callback' =&gt; TRUE,
  );

  return $menu;
}

function synonyms_test_page() {
  $vocabulary_name = 'tags';
  $output = '&lt;p&gt;Assuming you have a taxonomy with machine name "tags" and that '
            . 'taxonomy has a term named "first term" and that term has a '
            . 'synonym "syn one", this test will produce these results:&lt;/p&gt;';
  $test_terms = array('first term', 'bogus term', 'syn one');
  $vocabulary = taxonomy_vocabulary_machine_name_load($vocabulary_name);
  foreach($test_terms as $test_term) {
    $output .= 'Testing "' . $test_term . '"&lt;br&gt;';
    $matched_terms = taxonomy_get_term_by_name($test_term, $vocabulary-&gt;machine_name);
    if(empty($matched_terms)) {
      $output .= 'Not an existing taxonomy term.';
    } else {
      $output .= 'Is an existing taxonomy term.';
    }
    $output .= '&lt;br&gt;&lt;br&gt;';
    $matched_synonym = synonyms_get_term_by_synonym($test_term, $vocabulary);
    if(empty($matched_synonym)) {
      $output .= 'Not an existing synonym.';
    }
    else {
      $output .= 'Is an existing synonym, for tid ' . $matched_synonym;
    }
    $output .= '&lt;br&gt;=========&lt;br&gt;&lt;br&gt;';
  }
  return $output;
}


* Original answer below *

This is the function you're looking for (from synonyms.module):

/**
 * Returns the term objects that have the given string as a synonym.
 *
 * @param $synonym
 *  A string containing the synonym to search for.
 * @param $vocabulary
 *  (optional) The machine name of the vocabulary in which to search for.

 * @return
 *  An array of term objects containing that synonym.
 */
function synonyms_root_terms_get($synonym, $vocabulary = NULL) {
  $tids = synonyms_root_tids_get($synonym, $vocabulary);

  return taxonomy_term_load_multiple($tids);
}


So if your $matched_terms is empty, try something like:

$matched_synonyms = synonyms_root_terms_get($term_name, $vocabulary-&gt;machine_name);
if(empty($matched_synonyms)) {
  // ...now create your new term
}
else {
  $term = array_shift($matched_synonyms);
}