You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agent-skill/Scrapling-Skill/references/mcp-server.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,18 @@ All scraping tools return a `ResponseModel` with fields: `status` (int), `conten
6
6
7
7
## One-shot tools
8
8
9
-
### `get` -- HTTP request (single URL)
9
+
### `make_request` -- HTTP request, any method (single URL)
10
10
11
-
Fast HTTP GET with browser fingerprint impersonation (TLS, headers). Suitable for static pages with no/low bot protection.
11
+
Fast HTTP request with browser fingerprint impersonation (TLS, headers). Supports GET (default), POST, PUT, and DELETE via the `method` parameter. Suitable for static pages with no/low bot protection.
### `bulk_get` -- HTTP GET request (multiple URLs)
38
41
39
-
Async concurrent version of `get`. Same parameters except `url` is replaced by `urls` (list of strings). All URLs are fetched in parallel. Returns a list of `ResponseModel`.
42
+
Async concurrent GET-only version of `make_request`. Same parameters except `url` is replaced by `urls` (list of strings) and there are no `method`/`data`/`json` parameters. All URLs are fetched in parallel. Returns a list of `ResponseModel`.
40
43
41
44
### `fetch` -- Browser fetch (single URL)
42
45
@@ -110,7 +113,7 @@ Opens a browser session that stays alive across multiple `session_fetch` calls,
Plus the other browser-level session parameters (`real_chrome`, `cdp_url`, `locale`, `timezone_id`, `useragent`, `cookies`, `executable_path`, `additional_args`). Per-request options (`timeout`, `wait`, `google_search`, `network_idle`, `disable_resources`, `wait_selector`, `wait_selector_state`, `extra_headers`, `proxy`, `solve_cloudflare`) are not set here; pass them to `session_fetch`.
116
+
Plus the other browser-level session parameters (`proxy`, `real_chrome`, `cdp_url`, `locale`, `timezone_id`, `useragent`, `cookies`, `executable_path`, `additional_args`). Per-request options (`timeout`, `wait`, `google_search`, `network_idle`, `disable_resources`, `wait_selector`, `wait_selector_state`, `extra_headers`, `solve_cloudflare`) are not set here; pass them to `session_fetch`.
114
117
115
118
One `session_fetch` works with either session type; `solve_cloudflare` only applies to a stealthy session.
116
119
@@ -135,7 +138,6 @@ Fetches one URL through a session opened with `open_session` (dynamic or stealth
135
138
|`wait_selector_state`| str |`"attached"`| State for wait_selector: `"attached"` / `"visible"` / `"hidden"` / `"detached"`|
| Multiple pages from the same site |`open_session` + `session_fetch` per page |
187
189
| Need a screenshot of a page |`open_session` + `screenshot` with `session_id`|
188
190
189
-
Start with `get` (fastest, lowest resource cost). Escalate to `fetch` if content requires JS rendering. Escalate to `stealthy_fetch` only if blocked. For multiple pages from the same site, use a persistent session to avoid browser launch overhead.
191
+
Start with `make_request` (fastest, lowest resource cost). Escalate to `fetch` if content requires JS rendering. Escalate to `stealthy_fetch` only if blocked. For multiple pages from the same site, use a persistent session to avoid browser launch overhead.
Copy file name to clipboardExpand all lines: docs/ai/mcp-server.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ The Scrapling MCP Server provides eleven powerful tools for web scraping, split
11
11
### One-shot tools
12
12
13
13
#### 🚀 Basic HTTP Scraping
14
-
-**`get`**: Fast HTTP requests with browser fingerprint impersonation, generating real browser headers matching the TLS version, HTTP/3, and more!
15
-
-**`bulk_get`**: An async version of the above tool that allows scraping of multiple URLs at the same time!
14
+
-**`make_request`**: Fast HTTP requests with any method (GET, POST, PUT, DELETE) and browser fingerprint impersonation, generating real browser headers matching the TLS version, HTTP/3, and more!
15
+
-**`bulk_get`**: An async GET-only version of the above tool that allows scraping of multiple URLs at the same time!
16
16
17
17
#### 🌐 Dynamic Content Scraping
18
18
-**`fetch`**: Rapidly fetch dynamic content with Chromium/Chrome browser with complete control over the request/browser, and more!
@@ -290,7 +290,7 @@ We will gradually go from simple prompts to more complex ones. We will use Claud
290
290
Scrape the main content from https://example.com and convert it to markdown format.
291
291
```
292
292
293
-
Claude will use the `get` tool to fetch the page and return clean, readable content. If it fails, it will continue retrying every second for 3 attempts, unless you instruct it otherwise. If it fails to retrieve content for any reason, such as protection or if it's a dynamic website, it will automatically try the other tools. If Claude didn't do that automatically for some reason, you can add that to the prompt.
293
+
Claude will use the `make_request` tool to fetch the page and return clean, readable content. If it fails, it will continue retrying every second for 3 attempts, unless you instruct it otherwise. If it fails to retrieve content for any reason, such as protection or if it's a dynamic website, it will automatically try the other tools. If Claude didn't do that automatically for some reason, you can add that to the prompt.
294
294
295
295
A more optimized version of the same prompt would be:
296
296
```
@@ -404,7 +404,7 @@ And so on, you get the idea. Your creativity is the key here.
404
404
Here is some technical advice for you.
405
405
406
406
### 1. Choose the Right Tool
407
-
- **`get`**: Fast, simple websites
407
+
- **`make_request`**: Fast, simple websites
408
408
- **`fetch`**: Sites with JavaScript/dynamic content
409
409
- **`stealthy_fetch`**: Protected sites, Cloudflare, anti-bot systems
"""Make GET HTTP request to a URL and return a structured output of the result.
406
+
"""Make an HTTP request to a URL with any method (GET, POST, PUT, DELETE) and return a structured output of the result.
403
407
Only suitable for low-mid protection levels.
404
408
405
409
:param url: The URL to request.
410
+
:param method: The HTTP method to use: "GET" (default), "POST", "PUT", or "DELETE".
406
411
:param impersonate: Browser version to impersonate its fingerprint. It's using the latest chrome version by default.
407
412
:param extraction_type: The type of content to extract from the page: "markdown", "html", or "text".
408
413
:param css_selector: CSS selector to extract the content from the page. If main_content_only is True, then it will be executed on the main content of the page.
409
414
:param main_content_only: Whether to extract only the main content of the page. The main content here is the data inside the `<body>` tag.
410
415
:param params: Query string parameters for the request.
416
+
:param data: Form data for the request body. Used with "POST", "PUT", and "DELETE" only.
417
+
:param json: A JSON-serializable object for the request body. Used with "POST", "PUT", and "DELETE" only.
411
418
:param headers: Headers to include in the request.
412
419
:param cookies: Cookies to use in the request.
413
420
:param timeout: Number of seconds to wait before timing out.
@@ -424,28 +431,32 @@ async def get(
424
431
:param http3: Whether to use HTTP3. It might be problematic if used it with `impersonate`.
425
432
:param stealthy_headers: If enabled (default), it creates and adds real browser headers. It also sets a Google referer header.
"instructions": """Follow these instructions precisely:
952
963
1. When the `open_session` tool is used, make sure to close the session with `close_session` after you finish, and use `list_sessions` if you lose track of the open sessions or their effective settings.
953
-
2. If the user didn't specify which tool to use, start with the `get` tool, then escalate. The `get` tool and the bulk version are suitable only for low-to-mid protection levels.
964
+
2. If the user didn't specify which tool to use, start with the `make_request` tool (a plain HTTP request, defaulting to GET; set `method` for POST/PUT/DELETE), then escalate. The `make_request` tool and `bulk_get` (its GET-only bulk version) are suitable only for low-to-mid protection levels.
954
965
For high-protection levels or websites that require JS loading, use the other tools directly.
955
966
3. For all tools, if the `css_selector` resolves to more than one element, all the elements will be returned.
956
967
4. For all fetch tools, the `extraction_type` parameter controls the format of the returned content: "markdown" (default) converts the page content to Markdown, "html" returns the raw HTML, and "text" returns the text content of the page.
0 commit comments