> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to ScrapingAnt

The ScrapingAnt connector lets your AI agent act in each user's ScrapingAnt account. Each user connects their own ScrapingAnt API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 5 tools.

**Authentication:** API Key
**Categories:** Search, Developer Tools
**Tools:** 5: 5 read, 0 write, 0 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=SCRAPINGANT)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the ScrapingAnt connection

   In **AgentKit > Connections**, create a ScrapingAnt connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'scrapingant'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize ScrapingAnt:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'scrapingant_usage_get',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "scrapingant"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize ScrapingAnt:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="scrapingant_usage_get",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their ScrapingAnt credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'scrapingant_extract',
  toolInput: {
    extract_properties: '<extract_properties>',
    url: '<url>',
  },
  connector: 'scrapingant',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="scrapingant_extract",
    tool_input={
        "extract_properties": "<extract_properties>",
        "url": "<url>",
    },
    connection_name="scrapingant",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `scrapingant_extract`

Extract Data with AI · Read-only

Scrape a web page through ScrapingAnt and extract the data you describe into JSON with AI.
Returns a JSON object whose camelCase properties match the fields you asked for.
Use this for structured fields such as product title and price. Use scrapingant_scrape_markdown for the whole page text.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `extract_properties` (`string`, required): Free-text list of the data to extract, usually comma-separated. Nested lists can be described in brackets. Example: product title, price(number), full description, reviews(list: review title, review content)
- `url` (`string`, required): Full URL of the page to scrape, including https://. Example: https://example.com.
- `block_resource` (`string`, optional): A resource type the browser should not load, to speed up scraping. Works only with browser true. Example: image. One of: `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`, `eventsource`, `websocket`, `manifest`, `other`.
- `browser` (`boolean`, optional): Render the page in a headless browser (true, the default) or fetch it without one (false, faster and cheaper). Example: true.
- `cookies` (`string`, optional): Cookies to send to the target site, as name=value pairs separated by semicolons. Example: session_id=abc123;lang=en.
- `js_snippet` (`string`, optional): Base64-encoded JavaScript to run after the page loads. Works only with browser true. Example: ZG9jdW1lbnQuYm9keS5zdHlsZS5iYWNrZ3JvdW5kQ29sb3IgPSAnd2hpdGUnOw==.
- `proxy_country` (`string`, optional): Two-letter country code to send the request from. A random country is used when empty. Example: US.
- `proxy_type` (`string`, optional): Proxy pool to use: datacenter (default) or residential (more credits, harder to block). Example: datacenter. One of: `datacenter`, `residential`.
- `return_page_source` (`boolean`, optional): Return the HTML as the server sent it, before JavaScript runs. Works only with browser true. Defaults to false. Example: false.
- `timeout` (`integer`, optional): Maximum seconds the scrape may run, from 5 to 60. Defaults to 60. Example: 60.
- `wait_for_selector` (`string`, optional): CSS selector to wait for before returning the page. Works only with browser true. Example: div.product-list.

Example input: `{"extract_properties":"<extract_properties>","url":"<url>"}`

### `scrapingant_scrape_extended`

Scrape Page (Extended JSON) · Read-only

Scrape a web page through ScrapingAnt and return the page with its response details.
Returns JSON with html, text, cookies, status_code, headers, the XHR requests the page made and iframes.
Use this when you need the target's status code, cookies or background requests. Use scrapingant_scrape_html for HTML only.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `url` (`string`, required): Full URL of the page to scrape, including https://. Example: https://example.com.
- `block_resource` (`string`, optional): A resource type the browser should not load, to speed up scraping. Works only with browser true. Example: image. One of: `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`, `eventsource`, `websocket`, `manifest`, `other`.
- `browser` (`boolean`, optional): Render the page in a headless browser (true, the default) or fetch it without one (false, faster and cheaper). Example: true.
- `cookies` (`string`, optional): Cookies to send to the target site, as name=value pairs separated by semicolons. Example: session_id=abc123;lang=en.
- `js_snippet` (`string`, optional): Base64-encoded JavaScript to run after the page loads. Works only with browser true. Example: ZG9jdW1lbnQuYm9keS5zdHlsZS5iYWNrZ3JvdW5kQ29sb3IgPSAnd2hpdGUnOw==.
- `proxy_country` (`string`, optional): Two-letter country code to send the request from. A random country is used when empty. Example: US.
- `proxy_type` (`string`, optional): Proxy pool to use: datacenter (default) or residential (more credits, harder to block). Example: datacenter. One of: `datacenter`, `residential`.
- `return_page_source` (`boolean`, optional): Return the HTML as the server sent it, before JavaScript runs. Works only with browser true. Defaults to false. Example: false.
- `timeout` (`integer`, optional): Maximum seconds the scrape may run, from 5 to 60. Defaults to 60. Example: 60.
- `wait_for_selector` (`string`, optional): CSS selector to wait for before returning the page. Works only with browser true. Example: div.product-list.

Example input: `{"url":"<url>"}`

### `scrapingant_scrape_html`

Scrape Page HTML · Read-only

Scrape a web page through ScrapingAnt's headless browsers and rotating proxies and return its HTML.
Returns the page's HTML as text.
Use this for raw HTML. Use scrapingant_scrape_markdown for LLM-ready text, scrapingant_scrape_extended for HTML plus status, cookies and headers, or scrapingant_extract for structured fields.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `url` (`string`, required): Full URL of the page to scrape, including https://. Example: https://example.com.
- `block_resource` (`string`, optional): A resource type the browser should not load, to speed up scraping. Works only with browser true. Example: image. One of: `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`, `eventsource`, `websocket`, `manifest`, `other`.
- `browser` (`boolean`, optional): Render the page in a headless browser (true, the default) or fetch it without one (false, faster and cheaper). Example: true.
- `cookies` (`string`, optional): Cookies to send to the target site, as name=value pairs separated by semicolons. Example: session_id=abc123;lang=en.
- `js_snippet` (`string`, optional): Base64-encoded JavaScript to run after the page loads. Works only with browser true. Example: ZG9jdW1lbnQuYm9keS5zdHlsZS5iYWNrZ3JvdW5kQ29sb3IgPSAnd2hpdGUnOw==.
- `proxy_country` (`string`, optional): Two-letter country code to send the request from. A random country is used when empty. Example: US.
- `proxy_type` (`string`, optional): Proxy pool to use: datacenter (default) or residential (more credits, harder to block). Example: datacenter. One of: `datacenter`, `residential`.
- `return_page_source` (`boolean`, optional): Return the HTML as the server sent it, before JavaScript runs. Works only with browser true. Defaults to false. Example: false.
- `timeout` (`integer`, optional): Maximum seconds the scrape may run, from 5 to 60. Defaults to 60. Example: 60.
- `wait_for_selector` (`string`, optional): CSS selector to wait for before returning the page. Works only with browser true. Example: div.product-list.

Example input: `{"url":"<url>"}`

### `scrapingant_scrape_markdown`

Scrape Page as Markdown · Read-only

Scrape a web page through ScrapingAnt and convert it into clean Markdown for LLMs and retrieval.
Returns JSON with url and markdown.
Use this to read a page's content. Use scrapingant_extract to pull specific fields as JSON.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `url` (`string`, required): Full URL of the page to scrape, including https://. Example: https://example.com.
- `block_resource` (`string`, optional): A resource type the browser should not load, to speed up scraping. Works only with browser true. Example: image. One of: `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`, `eventsource`, `websocket`, `manifest`, `other`.
- `browser` (`boolean`, optional): Render the page in a headless browser (true, the default) or fetch it without one (false, faster and cheaper). Example: true.
- `cookies` (`string`, optional): Cookies to send to the target site, as name=value pairs separated by semicolons. Example: session_id=abc123;lang=en.
- `js_snippet` (`string`, optional): Base64-encoded JavaScript to run after the page loads. Works only with browser true. Example: ZG9jdW1lbnQuYm9keS5zdHlsZS5iYWNrZ3JvdW5kQ29sb3IgPSAnd2hpdGUnOw==.
- `proxy_country` (`string`, optional): Two-letter country code to send the request from. A random country is used when empty. Example: US.
- `proxy_type` (`string`, optional): Proxy pool to use: datacenter (default) or residential (more credits, harder to block). Example: datacenter. One of: `datacenter`, `residential`.
- `return_page_source` (`boolean`, optional): Return the HTML as the server sent it, before JavaScript runs. Works only with browser true. Defaults to false. Example: false.
- `timeout` (`integer`, optional): Maximum seconds the scrape may run, from 5 to 60. Defaults to 60. Example: 60.
- `wait_for_selector` (`string`, optional): CSS selector to wait for before returning the page. Works only with browser true. Example: div.product-list.

Example input: `{"url":"<url>"}`

### `scrapingant_usage_get`

Get API Credit Usage · Read-only

Get your ScrapingAnt subscription and remaining API credits.
Returns plan_name, start_date, end_date, plan_total_credits and remained_credits.
Use this before large scraping jobs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

## Related

Other Search connectors ([all 89](/agentkit/connectors/?category=search)):

- [Supadata](/agentkit/connectors/supadata/): Scalekit connector, API key, 21 tools
- [Exa](/agentkit/connectors/exa/): Scalekit connector, API key, 21 tools
- [Brave Search](/agentkit/connectors/brave/): Scalekit connector, API key, 18 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
