StackExchange API tag synonyms returns tags that do not exist on Stack Overflow

84 Views Asked by At

I am trying to build a taxonomy-like relationship graph for Stack Overflow tags. I extracted all tags and nearly ~37000 of those wikis. Before determining the relationships based on wikis, I decided to take look at what Stack Overflow /tags/{tag}/synonyms has to offer. Some of the from_tags in the results are not actual tags in Stack Overflow. I thought I might have missed those in my dataset. So tried to search those with the /tags/{tag}/info, which however returned the information for to_tag.

For example:

{
  "creation_date": 1377674210,
  "last_applied_date": 1602368899,
  "applied_count": 1172,
  "to_tag": "java",
  "from_tag": "jre"
}

Is one of the results for tags/java/synonyms endpoint. However, there is no tag . If search /tag/jre/info I get information for Java instead.

I am confused about this behavior. How does tags/java/synonyms get a tag which is not a Stack Overflow tag?

1

There are 1 best solutions below

0
On BEST ANSWER

The API results are correct. As you can see here, exists and was synonymised and merged with Java. In addition, https://stackoverflow.com/questions/tagged/jre redirects to https://stackoverflow.com/questions/tagged/java (the page doesn't return a 404!). Apparently, you can only find tags that have been synonymised via the /tags/{tag}/synonyms. Thus, this route is not that useful for your task.

For more information, see: What are tag synonyms and merged tags? How do they work?