Wrapper around PubMed API.
This wrapper will use the PubMed API to conduct searches and fetch document summaries. By default, it will return the document summaries of the top-k results of an input search.
PubMedAPIWrapper()| Name | Type | Description |
|---|---|---|
top_k_results* | unknown | number of the top-scored document used for the PubMed tool |
MAX_QUERY_LENGTH* | unknown | maximum length of the query. Default is 300 characters. |
doc_content_chars_max* | unknown | maximum length of the document content. Content will be truncated if it exceeds this length. Default is 2000 characters. |
max_retry* | unknown | maximum number of retries for a request. Default is 5. |
sleep_time* | unknown | time to wait between retries. Default is 0.2 seconds. |
email* | unknown | email address to be used for the PubMed API. |
api_key* | unknown | API key to be used for the PubMed API. |
Validate that the python package exists in environment.
Run PubMed search and get the article meta information. See https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch It uses only the most informative fields of article meta information.
Search PubMed for documents matching the query. Return an iterator of dictionaries containing the document metadata.
Search PubMed for documents matching the query. Return a list of dictionaries containing the document metadata.