Skip to content

Commit 679f10f

Browse files
VinciGit00claude
andcommitted
fix(docs): remove incorrect nationality references, use locationGeoCode
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7e342ad commit 679f10f

2 files changed

Lines changed: 16 additions & 42 deletions

File tree

sdks/javascript.mdx

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ const { data, requestId } = await sgai.extract(
105105
| options.schema | ZodSchema / object | No | Zod schema or JSON schema for structured response |
106106
| options.mode | string | No | HTML processing mode: `"normal"`, `"reader"`, `"prune"` |
107107
| options.contentType | string | No | Override the detected content type (e.g. `"text/html"`) |
108-
| options.fetchConfig | FetchConfig | No | Fetch configuration |
109108
| options.html | string | No | Raw HTML input (alternative to `url`) |
110109
| options.markdown | string | No | Raw markdown input (alternative to `url`) |
111110

@@ -137,22 +136,6 @@ console.log(`Author: ${data.author}`);
137136
```
138137
</Accordion>
139138

140-
<Accordion title="With FetchConfig" icon="code">
141-
```javascript
142-
const { data } = await sgai.extract(
143-
"https://example.com",
144-
{
145-
prompt: "Extract the main heading",
146-
fetchConfig: {
147-
mode: 'js+stealth',
148-
wait: 2000,
149-
scrolls: 3,
150-
},
151-
}
152-
);
153-
```
154-
</Accordion>
155-
156139
### search()
157140

158141
Search the web and extract information. Replaces the v1 `searchScraper` function.
@@ -174,7 +157,7 @@ const { data } = await sgai.search(
174157
| options.schema | ZodSchema / object | No | Schema for structured response (requires `prompt`) |
175158
| options.format | string | No | `"markdown"` (default) or `"html"` |
176159
| options.mode | string | No | HTML processing mode: `"normal"`, `"reader"`, `"prune"` (default) |
177-
| options.locationGeoCode | string | No | Geo code for localized search (e.g. `"us"`, `"it"`, `"gb"`) |
160+
| options.locationGeoCode | string | No | Two-letter ISO country code for localized search (e.g. `"us"`, `"it"`, `"gb"`) |
178161
| options.timeRange | string | No | Recency filter: `"past_hour"`, `"past_24_hours"`, `"past_week"`, `"past_month"`, `"past_year"` |
179162
| options.fetchConfig | FetchConfig | No | Fetch configuration |
180163

@@ -334,32 +317,18 @@ Controls how pages are fetched. See the [proxy configuration guide](/services/ad
334317

335318
```javascript
336319
{
337-
mode: 'js+stealth', // Proxy strategy: auto, fast, js, direct+stealth, js+stealth
338-
timeout: 15000, // Request timeout in ms (1000-60000)
339-
wait: 2000, // Wait after page load in ms (0-30000)
340-
scrolls: 3, // Number of scrolls (0-100)
341-
country: 'us', // Proxy country code (ISO 3166-1 alpha-2)
320+
mode: 'js', // Fetch mode: auto, fast, js
321+
stealth: true, // Enable stealth mode (residential proxy, anti-bot headers)
322+
timeout: 15000, // Request timeout in ms (1000-60000)
323+
wait: 2000, // Wait after page load in ms (0-30000)
324+
scrolls: 3, // Number of scrolls (0-100)
325+
country: 'us', // Proxy country code (ISO 3166-1 alpha-2)
342326
headers: { 'X-Custom': 'header' },
343327
cookies: { key: 'value' },
344-
mock: false, // Enable mock mode for testing
328+
mock: false, // Enable mock mode for testing
345329
}
346330
```
347331

348-
### LlmConfig
349-
350-
Controls LLM behavior for format entries that run an LLM (scrape `json` and `summary` formats). Pass it inside the format entry — it is not accepted at the top level of `extract` or `search` in v2.
351-
352-
```javascript
353-
{
354-
model: "gpt-4o-mini", // LLM model to use
355-
temperature: 0.3, // Response creativity (0-1)
356-
maxTokens: 1000, // Maximum response tokens
357-
chunker: { // Content chunking strategy
358-
size: "dynamic", // Chunk size (number or "dynamic")
359-
overlap: 100, // Overlap between chunks
360-
},
361-
}
362-
```
363332

364333
## Error Handling
365334

services/search.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,14 @@ curl -X POST https://api.scrapegraphai.com/api/v2/search \
5656
| Parameter | Type | Required | Description |
5757
|-----------|------|----------|-------------|
5858
| query | string | Yes | The search query to execute. |
59-
| num_results | int | No | Number of search results to return (3-20). Default: 5. |
60-
| output_schema | object | No | Pydantic or Zod schema for structured response format. |
61-
| llm_config | LlmConfig | No | Configuration for the AI model (model, temperature, max_tokens, etc.). |
59+
| num_results | int | No | Number of search results to return (1-20). Default: 5. |
60+
| prompt | string | No | Prompt used when extracting structured results. |
61+
| output_schema | object | No | Pydantic or Zod schema for structured response format (requires `prompt`). |
62+
| format | string | No | Output format: `"markdown"` (default) or `"html"`. |
63+
| mode | string | No | HTML processing mode: `"normal"`, `"reader"`, `"prune"` (default). |
64+
| location_geo_code | string | No | Geo code for localized results (e.g. `"us"`, `"it"`, `"gb"`). In the JS SDK, use `locationGeoCode`. |
65+
| time_range | string | No | Recency filter: `"past_hour"`, `"past_24_hours"`, `"past_week"`, `"past_month"`, `"past_year"`. |
66+
| fetch_config | FetchConfig | No | Configuration for page fetching (mode, stealth, headers, etc.). |
6267

6368
<Note>
6469
Get your API key from the [dashboard](https://scrapegraphai.com/dashboard)

0 commit comments

Comments
 (0)