# ScrapflyLoader

> **Class** in `langchain_community`

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

Turn a url to llm accessible markdown with `Scrapfly.io`.

For further details, visit: https://scrapfly.io/docs/sdk/python

## Signature

```python
ScrapflyLoader(
    self,
    urls: List[str],
    *,
    api_key: Optional[str] = None,
    scrape_format: Literal['markdown', 'text'] = 'markdown',
    scrape_config: Optional[dict] = None,
    continue_on_failure: bool = True,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `urls` | `List[str]` | Yes | List of urls to scrape. |
| `api_key` | `Optional[str]` | No | The Scrapfly API key. If not specified must have env var SCRAPFLY_API_KEY set. (default: `None`) |
| `scrape_format` | `Literal['markdown', 'text']` | No | Scrape result format, one or "markdown" or "text". (default: `'markdown'`) |
| `scrape_config` | `Optional[dict]` | No | Dictionary of ScrapFly scrape config object. (default: `None`) |
| `continue_on_failure` | `bool` | No | Whether to continue if scraping a url fails. (default: `True`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    urls: List[str],
    *,
    api_key: Optional[str] = None,
    scrape_format: Literal['markdown', 'text'] = 'markdown',
    scrape_config: Optional[dict] = None,
    continue_on_failure: bool = True,
) -> None
```

| Name | Type |
|------|------|
| `urls` | `List[str]` |
| `api_key` | `Optional[str]` |
| `scrape_format` | `Literal['markdown', 'text']` |
| `scrape_config` | `Optional[dict]` |
| `continue_on_failure` | `bool` |


## Properties

- `scrapfly`
- `urls`
- `scrape_format`
- `scrape_config`
- `continue_on_failure`

## Methods

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

---

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