---
title: "Amazon Bedrock · Scrape.ly Docs"
description: "Give Bedrock agents built with Strands Scrape.ly tools."
url: https://scrape.ly/docs/amazon-bedrock
markdown: https://scrape.ly/docs/amazon-bedrock.md
---

# Amazon Bedrock

> Give Bedrock agents built with Strands Scrape.ly tools.

Give agents running on Amazon Bedrock models Scrape.ly tools: search the Store, run Actors, wait for their runs, and read the results. Agents built with [Strands Agents](https://strandsagents.com), AWS's open-source agent SDK, connect to the hosted [MCP server](https://scrape.ly/docs/mcp.md), so there is no Scrape.ly package to install.

```bash
pip install strands-agents
```

The agent calls Bedrock with your AWS credentials, so set them up as for any Bedrock app and enable the model in your account. Create an API token in the [dashboard](https://my.scrape.ly) under **Settings → API & Integrations** and set it as `SCRAPELY_TOKEN`. The agent can do anything the token can, including starting paid runs, so give it a scoped key: `actors:run`, `runs:read`, and `datasets:read`, with a **Max charge per day**. See [API keys & permissions](https://scrape.ly/docs/api-keys.md).

## Give an agent Scrape.ly tools

Open the server with Strands' `MCPClient` and pass its tools to the agent.

```python
import os

from strands import Agent
from strands.tools.mcp import MCPClient

scrapely = MCPClient(
    url="https://mcp.scrape.ly",
    headers={"Authorization": f"Bearer {os.environ['SCRAPELY_TOKEN']}"},
)

with scrapely:
    agent = Agent(
        system_prompt="Find the right Actor in the Scrape.ly Store, run it, and report what its results show.",
        tools=scrapely.list_tools_sync(),
    )
    agent(
        "Find an Actor that scrapes Google Maps, run it for 'coffee shops in Berlin' with at most 20 results, "
        "and list the name, rating, and address of each place."
    )
```

Strands uses its default Bedrock model unless you pass one with `model=BedrockModel(model_id=...)`. See [MCP in Strands](https://strandsagents.com/docs/user-guide/sdk/tools/mcp-transports/) for more options.

### Bedrock AgentCore Gateway

To share Scrape.ly with agents through an AgentCore Gateway, add the hosted server as an **MCP server** target with **OAuth** outbound auth. The gateway signs in through the server's [OAuth flow](https://scrape.ly/docs/mcp.md#oauth-details), so there is no token to copy.

## What the agent can do

The agent gets the MCP server's default tools. The ones used most:

| Tool | What it does |
| --- | --- |
| `search-actors` | Find Actors in the Store by keywords. |
| `fetch-actor-details` | Read an Actor's input schema, README, and pricing before running it. |
| `call-actor` | Run an Actor with a JSON input, optionally with `maxItems` and `maxTotalChargeUsd`. |
| `get-actor-run` | Wait for a run and check its status. |
| `get-actor-output` | Read a run's results, paged and kept compact. |

The full list, including saved inputs and automations, is on the [MCP server](https://scrape.ly/docs/mcp.md#tools) page. To run one Actor you already know, name it in the prompt, for example `Run username/actor-name`, so the agent skips the search.

**Costs**: runs started by the agent are billed like any run. Put the limits in the prompt (such as "at most 20 results"), and keep a **Max charge per day** on the key.

---

- Previous: [Flowise](https://scrape.ly/docs/flowise.md)
- Next: [ChatGPT](https://scrape.ly/docs/chatgpt.md)
- All docs: [Docs index](https://scrape.ly/docs.md), [llms.txt](https://scrape.ly/llms.txt)
