@claude
Documentation Change Detected
A documentation change was pushed to the GitBook repository that may require updates to this SDK.
Commit: 37ff3c2533d09607a05d40b91de10ef1030469c2
Author: Oxylabs
Message: GITBOOK-1499: fast-search-api_fix_samples
Changed documentation paths
scraping-solutions/web-scraper-api/targets/fast-search-api.md
Diff
diff --git a/scraping-solutions/web-scraper-api/targets/fast-search-api.md b/scraping-solutions/web-scraper-api/targets/fast-search-api.md
index 4dd3c81..d6733ba 100644
--- a/scraping-solutions/web-scraper-api/targets/fast-search-api.md
+++ b/scraping-solutions/web-scraper-api/targets/fast-search-api.md
@@ -23,7 +23,19 @@ To ensure the best performance, connect to one these endpoints:
{% tabs %}
{% tab title="cURL" %}
```bash
-curl 'https://serp.oxylabs.io/v0/queries' \
+# For search queries:
+curl 'https://serp.oxylabs.io/v1/g/queries/search' \
+--user 'YOUR_USERNAME:YOUR_PASSWORD' \
+-H 'Accept: application/json' \
+-H 'Content-Type: application/json' \
+-d '{
+ "query": "iphone 17 release event",
+ "geo_location": "United States",
+ "page": 1
+}'
+
+# For news queries:
+curl 'https://serp.oxylabs.io/v1/g/queries/news' \
--user 'YOUR_USERNAME:YOUR_PASSWORD' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
@@ -38,7 +50,6 @@ curl 'https://serp.oxylabs.io/v0/queries' \
{% tab title="Python" %}
```python
from pprint import pprint
-
import requests
payload = {
@@ -47,18 +58,14 @@ payload = {
"page": 1
}
-response = requests.request(
- "POST",response = requests.request(
- "POST",
-
-# For search queries
- "https://serp.oxylabs.io/v1/g/queries/search",
+ENDPOINT = "https://serp.oxylabs.io/v1/g/queries/search" # For search queries
+ENDPOINT = "https://serp.oxylabs.io/v1/g/queries/news" # For news queries
-# For news queries
- "https://serp.oxylabs.io/v1/g/queries/news",
-
- auth=("YOUR_USERNAME", "YOUR_PASSWORD"),
- json=payload,
+response = requests.request(
+ "POST",
+ ENDPOINT,
+ auth=("YOUR_USERNAME", "YOUR_PASSWORD"),
+ json=payload,
)
pprint(response.json())
@@ -68,9 +75,9 @@ pprint(response.json())
### Request parameter values
-<table><thead><tr><th width="166.078125">Parameter </th><th width="374.89453125">Description</th><th width="114.39453125">Default value</th><th>Type</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong>query</strong></mark></td><td>The keyword or phrase to search for.</td><td>-</td><td>String</td></tr><tr><td><strong>url</strong></td><td></td><td>-</td><td>String</td></tr><tr><td><strong>uule</strong></td><td>The UULE (User Location) parameter that will be sent to Google.</td><td>-</td><td>String</td></tr><tr><td><strong>gl</strong></td><td>2-letter country code (stand-alone, not part of UULE).</td><td>-</td><td>String</td></tr><tr><td><strong>geo_location</strong></td><td>The geographical location that the result should be adapted for. Accepts: <strong>Canonical Location Name</strong>, <strong>ISO-3166 Country Code</strong>, and <strong>Country Name</strong>, as described <a href="../features/localization/serp-localization.md#google"><strong>here</strong></a>.<br><br><mark style="color:$warning;">Note:</mark> If both <code>geo_location</code> and <code>uule</code> parameters are sent, the <code>uule</code> parameter will be used instead.</td><td>-</td><td>String</td></tr><tr><td><strong>locale</strong></td><td>Sets the interface language as described <a href="https://developers.oxylabs.io/scraping-solutions/web-scraper-api/features/localization/domain-locale-results-language#locale-1">here</a>. </td><td>-</td><td>String</td></tr><tr><td><strong>page</strong></td><td>Specifies which page of search results to return.</td><td>1</td><td>Integer</td></tr><tr><td><strong>input_encoding</strong></td><td></td><td>UTF-8</td><td>String</td></tr></tbody></table>
+<table><thead><tr><th width="166.078125">Parameter </th><th width="374.89453125">Description</th><th width="114.39453125">Default value</th><th>Type</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong>query</strong></mark></td><td>The keyword or phrase to search for.</td><td>-</td><td>String</td></tr><tr><td><strong>url</strong></td><td>The URL of the page to scrape directly, as an alternative to the <code>query</code> parameter</td><td>-</td><td>String</td></tr><tr><td><strong>uule</strong></td><td>The UULE (User Location) parameter that will be sent to Google.</td><td>-</td><td>String</td></tr><tr><td><strong>gl</strong></td><td>2-letter country code (stand-alone, not part of UULE).</td><td>-</td><td>String</td></tr><tr><td><strong>geo_location</strong></td><td>The geographical location that the result should be adapted for. Accepts: <strong>Canonical Location Name</strong>, <strong>ISO-3166 Country Code</strong>, and <strong>Country Name</strong>, as described <a href="../features/localization/serp-localization.md#google"><strong>here</strong></a>.<br><br><mark style="color:$warning;">Note:</mark> If both <code>geo_location</code> and <code>uule</code> parameters are sent, the <code>uule</code> parameter will be used instead.</td><td>-</td><td>String</td></tr><tr><td><strong>locale</strong></td><td>Sets the interface language as described <a href="https://developers.oxylabs.io/scraping-solutions/web-scraper-api/features/localization/domain-locale-results-language#locale-1">here</a>. </td><td>-</td><td>String</td></tr><tr><td><strong>page</strong></td><td>Specifies which page of search results to return.</td><td>1</td><td>Integer</td></tr><tr><td><strong>input_encoding</strong></td><td>Specifies the character encoding of the search query.</td><td>UTF-8</td><td>String</td></tr></tbody></table>
-Mandatory parameters are highlighted in <mark style="background-color:green;">green</mark>.
+  – mandatory parameter.
## Structured data
Instructions
Analyze the documentation diff above and update the Python SDK source code to match.
Follow the guidelines in CLAUDE.md for mapping documentation paths to SDK source files.
After making changes:
- Create a new branch named docs-sync/37ff3c2
- Commit your changes
- Open a pull request with a summary of what changed and why
@claude
Documentation Change Detected
A documentation change was pushed to the GitBook repository that may require updates to this SDK.
Commit: 37ff3c2533d09607a05d40b91de10ef1030469c2
Author: Oxylabs
Message: GITBOOK-1499: fast-search-api_fix_samples
Changed documentation paths
Diff
Instructions
Analyze the documentation diff above and update the Python SDK source code to match.
Follow the guidelines in CLAUDE.md for mapping documentation paths to SDK source files.
After making changes: