# SemanticScholarAPIWrapper

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/utilities/semanticscholar/SemanticScholarAPIWrapper)

Wrapper around semanticscholar.org API.
https://github.com/danielnsilva/semanticscholar

You should have this library installed.

`pip install semanticscholar`

Semantic Scholar API can conduct searches and fetch document metadata
like title, abstract, authors, etc.

Attributes:
top_k_results: number of the top-scored document used for the Semantic Scholar tool
load_max_docs: a limit to the number of loaded documents

Example:
.. code-block:: python

from langchain_community.utilities.semanticscholar import SemanticScholarAPIWrapper
ss = SemanticScholarAPIWrapper(
    top_k_results = 3,
    load_max_docs = 3
)
ss.run("biases in large language models")

## Signature

```python
SemanticScholarAPIWrapper()
```

## Extends

- `BaseModel`

## Properties

- `semanticscholar_search`
- `top_k_results`
- `S2_MAX_QUERY_LENGTH`
- `load_max_docs`
- `doc_content_chars_max`
- `returned_fields`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/utilities/semanticscholar/SemanticScholarAPIWrapper/validate_environment)
- [`run()`](https://reference.langchain.com/python/langchain-community/utilities/semanticscholar/SemanticScholarAPIWrapper/run)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/utilities/semanticscholar.py#L11)