Skip to content

Commit cf0efc7

Browse files
committed
docs: mobile mode
1 parent d41a1db commit cf0efc7

File tree

3 files changed

+92
-8
lines changed

3 files changed

+92
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"title": "Sessions API",
33
"root": false,
4-
"pages": ["---Sessions API---", "overview", "quickstart", "session-lifecycle", "multi-region"]
4+
"pages": ["---Sessions API---", "overview", "quickstart", "session-lifecycle", "mobile-mode","multi-region"]
55
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
title: Mobile Mode
3+
sidebarTitle: Mobile Mode
4+
description: Create browser sessions that appear as mobile devices with full mobile fingerprints and touch capabilities.
5+
llm: false
6+
---
7+
8+
### Overview
9+
10+
Mobile mode allows Steel sessions to appear as mobile devices. Pass `deviceConfig: { device: "mobile" }` when creating a session and the browser presents itself with mobile user agent, viewport, touch capabilities, and browser characteristics—everything aligned to look like a phone instead of desktop.
11+
12+
Most websites serve fundamentally different experiences to mobile devices. Desktop sites have nested navigation, hover menus, and complex interactions. Mobile sites strip these away into linear flows and touch-optimized interfaces. For AI agents, this simplification can directly improve task completion.
13+
14+
### How It Works
15+
16+
<CodeTabs storage="languageSwitcher">
17+
18+
```typescript !! Typescript -wcn
19+
import Steel from 'steel-sdk';
20+
import { chromium } from 'playwright';
21+
22+
const client = new Steel({ steelAPIKey: process.env.STEEL_API_KEY });
23+
24+
// Create a session with mobile device configuration
25+
const session = await client.sessions.create({
26+
deviceConfig: { device: "mobile" }
27+
});
28+
29+
// Connect to the mobile session
30+
const browser = await chromium.connectOverCDP(
31+
`wss://connect.steel.dev?apiKey=${process.env.STEEL_API_KEY}&sessionId=${session.id}`
32+
);
33+
34+
const page = await browser.contexts()[0].pages()[0];
35+
await page.goto('https://example.com');
36+
```
37+
38+
```python !! Python -wcn
39+
from steel import Steel
40+
from playwright.async_api import async_playwright
41+
import os
42+
43+
client = Steel(steel_api_key=os.environ.get("STEEL_API_KEY"))
44+
45+
# Create a session with mobile device configuration
46+
session = client.sessions.create(
47+
device_config={"device": "mobile"}
48+
)
49+
50+
# Connect to the mobile session
51+
async with async_playwright() as p:
52+
browser = await p.chromium.connect_over_cdp(
53+
f"wss://connect.steel.dev?apiKey={os.environ.get('STEEL_API_KEY')}&sessionId={session.id}"
54+
)
55+
56+
page = browser.contexts[0].pages[0]
57+
await page.goto('https://example.com')
58+
```
59+
60+
</CodeTabs>
61+
62+
The session automatically configures mobile viewport dimensions, touch events, and a full mobile device fingerprint. Sites see a consistent mobile device visiting from a browser app, not a desktop browser with a spoofed user agent. Before this, you could override the user agent string, but the rest of the fingerprint wouldn't match—sites would detect the inconsistency.
63+
64+
Mobile mode works with all existing features including proxies, CAPTCHA solving, and session persistence.
65+
66+
### Why This Matters
67+
68+
**Simplified Navigation**
69+
70+
Mobile sites present content sequentially rather than using nested menus or hover states. An e-commerce checkout that requires navigating dropdown menus on desktop becomes a vertical list on mobile. Fewer interactive elements means clearer action spaces and less chance of mistakes.
71+
72+
**Performance and Cost Benefits**
73+
74+
Mobile sites load faster with fewer widgets and less aggressive lazy-loading. They also have simpler DOM structures. Less HTML for your model to process means lower token costs. If you're using vision, it means fewer image tokens too.
75+
76+
**Consistent Fingerprints**
77+
78+
Without mobile mode, your sessions use desktop fingerprints by default. Mobile mode provides a complete, consistent mobile device fingerprint that websites trust.
79+
80+
:::callout
81+
type: help
82+
### Need help with mobile mode?
83+
Reach out to us on the <span className="font-bold">#help</span> channel on [Discord](https://discord.gg/steel-dev) or [@steeldotdev](https://twitter.com/steeldotdev).
84+
85+
Part of Steel's launch week. More at [steel.dev/launch-week](https://steel.dev/launch-week).
86+
:::

content/docs/overview/sessions-api/multi-region.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,8 @@ Steel is available in the following regions:
7474
| Los Angeles | LAX | Los Angeles, USA |
7575
| Chicago | ORD | Chicago, USA |
7676
| Washington DC | IAD | Washington DC, USA |
77-
| Mumbai | BOM | Mumbai, India |
7877
| Santiago | SCL | Santiago, Chile |
7978
| Frankfurt | FRA | Frankfurt, Germany |
80-
| Hong Kong | HKG | Hong Kong |
8179

8280
### Region vs Proxy Selection
8381

@@ -88,24 +86,24 @@ You can combine region selection with proxy settings:
8886
<CodeTabs storage="languageSwitcher">
8987

9088
```typescript !! Typescript -wcn
91-
// Browser runs in Hong Kong, but uses a US proxy for requests
89+
// Browser runs in Frankfurt, but uses a US proxy for requests
9290
const session = await client.sessions.create({
93-
region: "HKG",
91+
region: "FRA",
9492
useProxy: true
9593
});
9694

9795
```
9896

9997
```python !! Python -wcn
100-
# Browser runs in Hong Kong, but uses a US proxy for requests
98+
# Browser runs in Frankfurt, but uses a US proxy for requests
10199
session = client.sessions.create(
102-
region="HKG",
100+
region="FRA",
103101
use_proxy=True
104102
)
105103
```
106104
</CodeTabs>
107105

108-
Well be launching new features soon to allow you to control regions for proxies as well. Right now, all are US based.
106+
We'll be launching new features soon to allow you to control regions for proxies as well. Right now, all are US based.
109107

110108
:::callout
111109
type: help

0 commit comments

Comments
 (0)