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.

1 Answer 1

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.

1
  • is there a way to download all the drug names list from openFDA ? It might help us to do roll my own partial search from my db? Feb 14, 2022 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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