0

I am trying to use the Microsoft Academic API to download the publications of this author. Since his name contains a ', the API throws an error. I am passing this URL to the API: https://api.labs.cognitive.microsoft.com/academic/v1.0/evaluate?expr=Composite(AA.AuN==%27martin kang'ethe gachukia%27)&model=latest&attributes=AA.AuId&count=10&offset=0&subscription-key=YOUR_KEY"

When using this url, the ' in the middle of the name is replaced by %27, which leads to an error because the %27 indicate the beginning and end of a query term.

My question is, how do I prevent this behavior? Is there a way I need to escape the apostrophe to prevent this behavior?

Ger
  • 249
  • 3
  • 11

1 Answers1

0

According to the documentation, the query should not include special chars, so you can safely replace the ' char with space in your query.

XYT
  • 11
  • 1
  • Thanks for the suggestion. Replacing the ' with a space however didn't work, but just removing the ' did the job – Ger Apr 06 '21 at 06:49