1

Currently I can get results for a generic drug name if I use a query like:

https://api.fda.gov/drug/label.json?search=generic_name:atorvastatin

But is there a way to get results back if the drug name is not completely typed out. If I search for "atorvastat", I get no results. It only returns a result if the drug name is typed out perfectly and completely.

2

Unfortunately, we do not support partial or ngram search. The search tool that we use forces us to decide between different tokenization approaches (whitespace, word, ngram, et al.). We decided against the ngram approach for performance reasons and use case fit.

Please submit a request on https://github.com/FDA/openfda/issues and we can prioritize it with the rest of the rests.

Thank you for using openFDA.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.