---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/tools/scrapper/functions/createScrapperArticleTool.md
---

# Function: createScrapperArticleTool()

```ts
function createScrapperArticleTool(
  config: ScrapperArticleConfig,
): Promise<Tool<SpooledArtifact>>;
```

Defined in: [batteries/tools/scrapper/index.ts:365](https://github.com/NHTIO/ADK/blob/v1.20260609.1/src/batteries/tools/scrapper/index.ts#L365)

Create a configured Scrapper **article** [Tool](../../../../forge/classes/Tool.md) (async — accepts a dynamic-import `artifact`).

## Parameters

| Parameter | Type                                                                | Description                                                                                                                                                     |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `config`  | [`ScrapperArticleConfig`](../type-aliases/ScrapperArticleConfig.md) | Instance URL, instance-auth headers, output policy, `artifact` resolver, per-parameter disposition (`fixed`/`defaults`/`fixedQuery`), and middleware pipelines. |

## Returns

`Promise`<[`Tool`](../../../../forge/classes/Tool.md)<[`SpooledArtifact`](../../../../spooled_artifact/classes/SpooledArtifact.md)>>

A promise of a `Tool` ready to register in a `ToolRegistry`.

## Remarks

Async because `artifact` may be an async / dynamic-import resolver, which must resolve to the sync
`() => Ctor` `Tool.artifactConstructor` requires before the tool is built. For the common case,
use [createScrapperArticleToolSync](createScrapperArticleToolSync.md) and skip the `await`.

##

::: warning
Two distinct "headers": `config.headers` authenticates to the Scrapper *instance*; the
`extra_http_headers` *parameter* is what the scraper's browser sends to the *target site* — do not
conflate them. Also note `scroll_down` requires a positive `sleep`, and `resultUri`/`screenshotUri`
are instance-relative and may come back `http://` even over HTTPS — do not assume they match
`instanceUrl`.
:::

## Throws

[E\_INVALID\_SCRAPPER\_CONFIG](../../../variables/E_INVALID_SCRAPPER_CONFIG.md) when `instanceUrl` or `artifact` is invalid.
