# PubMedLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/pubmed/PubMedLoader)

Load from the `PubMed` biomedical library.

## Signature

```python
PubMedLoader(
    self,
    query: str,
    load_max_docs: Optional[int] = 3,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `query` | `str` | Yes | The query to be passed to the PubMed API. |
| `load_max_docs` | `Optional[int]` | No | The maximum number of documents to load. Defaults to 3. (default: `3`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    query: str,
    load_max_docs: Optional[int] = 3,
)
```

| Name | Type |
|------|------|
| `query` | `str` |
| `load_max_docs` | `Optional[int]` |


## Properties

- `query`
- `load_max_docs`

## Methods

- [`lazy_load()`](https://reference.langchain.com/python/langchain-community/document_loaders/pubmed/PubMedLoader/lazy_load)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/document_loaders/pubmed.py#L9)