> ## Documentation Index
> Fetch the complete documentation index at: https://langchain.idochub.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Apify

> [Apify](https://apify.com) is a cloud platform for web scraping and data extraction,
> which provides an [ecosystem](https://apify.com/store) of more than a thousand
> ready-made apps called *Actors* for various scraping, crawling, and extraction use cases.

[<img src="https://mintlify.s3.us-west-1.amazonaws.com/idochub/img/ApifyActors.png" alt="Apify Actors" />](https://apify.com/store)

This integration enables you run Actors on the `Apify` platform and load their results into LangChain to feed your vector
indexes with documents and data from the web, e.g. to generate answers from websites with documentation,
blogs, or knowledge bases.

## Installation and Setup

* Install the LangChain Apify package for Python with:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-apify
  ```

  ```bash uv theme={null}
  uv add langchain-apify
  ```
</CodeGroup>

* Get your [Apify API token](https://console.apify.com/account/integrations) and either set it as
  an environment variable (`APIFY_API_TOKEN`) or pass it as `apify_api_token` in the constructor.

## Tool

You can use the `ApifyActorsTool` to use Apify Actors with agents.

```python theme={null}
from langchain_apify import ApifyActorsTool
```

See [this notebook](/oss/python/integrations/tools/apify_actors) for example usage and a full example of a tool-calling agent with LangGraph in the [Apify LangGraph agent Actor template](https://apify.com/templates/python-langgraph).

For more information on how to use this tool, visit [the Apify integration documentation](https://docs.apify.com/platform/integrations/langgraph).

## Wrapper

You can use the `ApifyWrapper` to run Actors on the Apify platform.

```python theme={null}
from langchain_apify import ApifyWrapper
```

For more information on how to use this wrapper, see [the Apify integration documentation](https://docs.apify.com/platform/integrations/langchain).

## Document loader

You can also use our `ApifyDatasetLoader` to get data from Apify dataset.

```python theme={null}
from langchain_apify import ApifyDatasetLoader
```

For a more detailed walkthrough of this loader, see [this notebook](/oss/python/integrations/document_loaders/apify_dataset).

Source code for this integration can be found in the [LangChain Apify repository](https://github.com/apify/langchain-apify).
