nexscope-cli 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nexscope_cli/__init__.py +4 -0
- nexscope_cli/api-contract.json +37 -0
- nexscope_cli/capabilities/__init__.py +3 -0
- nexscope_cli/capabilities/catalog.py +73 -0
- nexscope_cli/capabilities/mock.py +53 -0
- nexscope_cli/capabilities/plan.py +142 -0
- nexscope_cli/catalog.json +69 -0
- nexscope_cli/compat/__init__.py +4 -0
- nexscope_cli/compat/legacy.py +143 -0
- nexscope_cli/core/__init__.py +3 -0
- nexscope_cli/core/auth.py +81 -0
- nexscope_cli/core/datasets.py +305 -0
- nexscope_cli/core/errors.py +11 -0
- nexscope_cli/core/evidence.py +134 -0
- nexscope_cli/core/execution.py +171 -0
- nexscope_cli/core/remote.py +22 -0
- nexscope_cli/core/transport.py +61 -0
- nexscope_cli/dependencies.lock +282 -0
- nexscope_cli/dependency-lock.json +371 -0
- nexscope_cli/doctor.py +136 -0
- nexscope_cli/main.py +313 -0
- nexscope_cli/reports/__init__.py +3 -0
- nexscope_cli/reports/compare.py +135 -0
- nexscope_cli/reports/formats.py +99 -0
- nexscope_cli/resources/__init__.py +3 -0
- nexscope_cli/resources/fields.json +33 -0
- nexscope_cli/resources/mock-products.json +9 -0
- nexscope_cli/resources/products-sample.csv +5 -0
- nexscope_cli/resources/products-sample.json +6 -0
- nexscope_cli/resources/products-template.csv +1 -0
- nexscope_cli/resources/products.schema.json +182 -0
- nexscope_cli/resources/report.html +15 -0
- nexscope_cli/runner.py +43 -0
- nexscope_cli/skills/amazon-product-detail/SKILL.md +170 -0
- nexscope_cli/skills/amazon-product-detail/references/api.md +239 -0
- nexscope_cli/skills/amazon-product-detail/requirements.txt +1 -0
- nexscope_cli/skills/amazon-product-detail/scripts/amazon_product_detail.py +26 -0
- nexscope_cli/skills/amazon-search/SKILL.md +197 -0
- nexscope_cli/skills/amazon-search/references/api.md +189 -0
- nexscope_cli/skills/amazon-search/requirements.txt +1 -0
- nexscope_cli/skills/amazon-search/scripts/amazon_search.py +26 -0
- nexscope_cli/workflows/__init__.py +3 -0
- nexscope_cli/workflows/compare.py +213 -0
- nexscope_cli-0.1.0.dist-info/METADATA +257 -0
- nexscope_cli-0.1.0.dist-info/RECORD +74 -0
- nexscope_cli-0.1.0.dist-info/WHEEL +5 -0
- nexscope_cli-0.1.0.dist-info/entry_points.txt +2 -0
- nexscope_cli-0.1.0.dist-info/licenses/ASSET-NOTICES.md +9 -0
- nexscope_cli-0.1.0.dist-info/licenses/LICENSE +202 -0
- nexscope_cli-0.1.0.dist-info/licenses/NOTICE +20 -0
- nexscope_cli-0.1.0.dist-info/licenses/THIRD-PARTY-NOTICES.md +27 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/backports-tarfile/LICENSE +17 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/certifi/LICENSE +20 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/cffi/LICENSE +23 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/charset-normalizer/LICENSE +21 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/cryptography/LICENSE +3 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/cryptography/LICENSE.APACHE +202 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/cryptography/LICENSE.BSD +27 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/idna/LICENSE.md +31 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/importlib-metadata/LICENSE +73 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/jaraco-classes/LICENSE +17 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/jaraco-context/LICENSE +18 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/jaraco-functools/LICENSE +18 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/jeepney/LICENSE +21 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/keyring/LICENSE +18 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/more-itertools/LICENSE +19 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/pycparser/LICENSE +27 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/pywin32-ctypes/LICENSE.txt +28 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/requests/LICENSE +175 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/requests/NOTICE +2 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/secretstorage/LICENSE +25 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/urllib3/LICENSE.txt +21 -0
- nexscope_cli-0.1.0.dist-info/licenses/third-party-notices/zipp/LICENSE +18 -0
- nexscope_cli-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# Copyright 2026 Nexscope
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
"""Independent Skill compatibility entrypoint; install the paired local wheel."""
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
INDEPENDENT_COMPAT_API = 1
|
|
8
|
+
REQUIRED_VERSION = '0.1.0'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def main():
|
|
12
|
+
try:
|
|
13
|
+
from nexscope_cli import __version__
|
|
14
|
+
from nexscope_cli.compat import COMPAT_API_VERSION
|
|
15
|
+
from nexscope_cli.compat.legacy import main as run
|
|
16
|
+
except ImportError:
|
|
17
|
+
print('Dependency missing: install nexscope-cli==0.1.0 from the paired local wheel using this Python interpreter. No request was sent.', file=sys.stderr)
|
|
18
|
+
return 1
|
|
19
|
+
if __version__ != REQUIRED_VERSION or COMPAT_API_VERSION != INDEPENDENT_COMPAT_API:
|
|
20
|
+
print('Dependency mismatch: this adapter requires nexscope-cli==0.1.0 and compatibility API 1. Install the paired wheel or restore the previous Skill directory. No request was sent.', file=sys.stderr)
|
|
21
|
+
return 1
|
|
22
|
+
return run('amazon-product-detail')
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
if __name__ == '__main__':
|
|
26
|
+
sys.exit(main())
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ecommerce.amazon-search
|
|
3
|
+
description: Simulates a real user searching on Amazon's storefront to get real-time keyword ranking and search results page data. Use when the user mentions Amazon product search, search result scraping, keyword ranking on search pages, ASIN ranking position check, competitor discovery, search page price comparison, sponsored product analysis, new product monitoring, or storefront search simulation. Even if the user does not explicitly mention "search simulation", trigger this skill whenever their need involves real-time Amazon search results, product ranking data, or storefront SERP analysis.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Amazon Product Search
|
|
7
|
+
|
|
8
|
+
This skill guides you on how to perform Amazon storefront search simulations, helping Amazon sellers retrieve real-time search result data including product rankings, prices, ratings, and more.
|
|
9
|
+
|
|
10
|
+
## Core Concepts
|
|
11
|
+
|
|
12
|
+
This tool simulates a real user searching on Amazon's storefront. It returns live search result page (SERP) data: product listings with their positions, prices, ratings, review counts, brands, delivery info, sponsored flags, and more. This is **real-time** data directly from the Amazon frontend, not historical analytics.
|
|
13
|
+
|
|
14
|
+
**Key distinction from ABA data**: ABA data is aggregated historical search term analytics. This tool returns the actual product listings a user would see when searching a keyword on Amazon right now.
|
|
15
|
+
|
|
16
|
+
**Keyword language**: Keywords should be in the language of the target marketplace. For example, use English keywords for amazon.com, German keywords for amazon.de, Japanese keywords for amazon.co.jp, etc.
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
|
|
20
|
+
| Parameter | Type | Required | Description | Default |
|
|
21
|
+
|-----------|------|----------|-------------|---------|
|
|
22
|
+
| keyword | string | No | Search keyword (translate to the target marketplace's language) | - |
|
|
23
|
+
| amazonDomain | string | No | Amazon marketplace domain | amazon.com |
|
|
24
|
+
| node | string | No | Amazon category node ID for category-scoped searches | - |
|
|
25
|
+
| language | string | No | Language locale code (e.g., en_US, de_DE, ja_JP) | - |
|
|
26
|
+
| sort | string | No | Sort order for results | relevanceblender |
|
|
27
|
+
| page | integer | No | Page number (starting from 1, ~20 results per page) | 1 |
|
|
28
|
+
| deliveryZip | string | No | Postal/zip code for delivery location simulation | - |
|
|
29
|
+
| device | string | No | Device type: desktop, mobile, or tablet | desktop |
|
|
30
|
+
|
|
31
|
+
### Supported Marketplaces
|
|
32
|
+
|
|
33
|
+
| Domain | Country |
|
|
34
|
+
|--------|---------|
|
|
35
|
+
| amazon.com | United States |
|
|
36
|
+
| amazon.co.uk | United Kingdom |
|
|
37
|
+
| amazon.de | Germany |
|
|
38
|
+
| amazon.fr | France |
|
|
39
|
+
| amazon.it | Italy |
|
|
40
|
+
| amazon.es | Spain |
|
|
41
|
+
| amazon.co.jp | Japan |
|
|
42
|
+
| amazon.ca | Canada |
|
|
43
|
+
| amazon.com.au | Australia |
|
|
44
|
+
| amazon.com.br | Brazil |
|
|
45
|
+
| amazon.in | India |
|
|
46
|
+
| amazon.nl | Netherlands |
|
|
47
|
+
| amazon.se | Sweden |
|
|
48
|
+
| amazon.pl | Poland |
|
|
49
|
+
| amazon.sg | Singapore |
|
|
50
|
+
| amazon.sa | Saudi Arabia |
|
|
51
|
+
| amazon.ae | United Arab Emirates |
|
|
52
|
+
| amazon.com.mx | Mexico |
|
|
53
|
+
| amazon.com.tr | Turkey |
|
|
54
|
+
| amazon.com.be | Belgium |
|
|
55
|
+
| amazon.cn | China |
|
|
56
|
+
| amazon.eg | Egypt |
|
|
57
|
+
|
|
58
|
+
Default marketplace is **amazon.com**. Use amazon.com when the user doesn't specify a marketplace.
|
|
59
|
+
|
|
60
|
+
### Sort Options
|
|
61
|
+
|
|
62
|
+
| Value | Description |
|
|
63
|
+
|-------|-------------|
|
|
64
|
+
| relevanceblender | Featured / Relevance (default) |
|
|
65
|
+
| price-asc-rank | Price: Low to High |
|
|
66
|
+
| price-desc-rank | Price: High to Low |
|
|
67
|
+
| review-rank | Average Customer Review |
|
|
68
|
+
| date-desc-rank | Newest Arrivals |
|
|
69
|
+
| exact-aware-popularity-rank | Best Sellers |
|
|
70
|
+
|
|
71
|
+
## Local migration candidate dependency
|
|
72
|
+
|
|
73
|
+
This Skill requires Python 3.11+ and exactly `nexscope-cli==0.1.0` (compatibility API 1). Build or obtain the matching wheel from https://github.com/nexscope-ai/nexscope-cli and verify its SHA-256 before installation. Install it with `python -m pip install --no-index --no-deps /absolute/path/nexscope_cli-0.1.0-py3-none-any.whl` in the interpreter used by this script. The independent adapter uses the standard library; browser/plugin dependencies are installed separately. Do not auto-install an unverified similarly named package. Keep the current published Skill until the paired wheel and old command compatibility have passed acceptance.
|
|
74
|
+
|
|
75
|
+
The original `NEXSCOPE_API_KEY`, `NEXSCOPE_PROXY_BASE`, JSON object argument, `--inline` and `--no-cache` remain supported. No OS keyring, browser login, or `/api/cli/account` preflight is required. Search page numbers and batch detail parameters are forwarded once without the pilot workflow's one-page/three-ASIN limit. Inspect outer response code/error: JSON API failures preserve the legacy output and exit-code behavior.
|
|
76
|
+
|
|
77
|
+
Use an HTTPS API origin (HTTP loopback is supported for local tests). Redirects are refused. Missing/wrong dependencies fail before any request. Missing credentials, invalid output paths and malformed JSON also fail without calling the service. Never silently fall back to the old implementation. Cache is isolated to the selected credential context and process; existing `.cache` files are left untouched but ignored. Payloads above 2 MiB are refused; ambiguous failures are never retried.
|
|
78
|
+
|
|
79
|
+
Upgrade the wheel first, then replace the entire Skill directory. Roll back the Skill directory first, then restore the previous wheel if needed. Use the paired rollback artifacts, preserve user output/credentials, and use `--no-cache` with old scripts when switching Keys. This candidate has only local mock verification; no production or paid validation and no public release is claimed.
|
|
80
|
+
|
|
81
|
+
## Usage
|
|
82
|
+
|
|
83
|
+
- **API Endpoint**: `POST /amazon/search` (see `references/api.md` for full parameters/response/error codes)
|
|
84
|
+
- **Python Script**: `python scripts/amazon_search.py '<JSON params>' [--inline]`
|
|
85
|
+
- **Cost Constraint**: Invoking this Skill consumes credits. No automatic retry, pagination or scope expansion. The migrated adapter uses only in-memory session caching; a new script process makes a new request, even with identical parameters. The old 24h disk cache is not read or written. Keep --no-cache for an explicit cache bypass. Obtain user scope before additional paid queries.
|
|
86
|
+
|
|
87
|
+
**Output Strategy (default script behavior)**:
|
|
88
|
+
- **Always** write the full response to `<cwd>/nexscope/<YYYY-MM-DD>/<session>/data/ecommerce.amazon-search-amazon_search-<timestamp>.json`. The current directory must be writable; output is reserved before requesting data. No home/temp fallback. SESSION_ID, if supplied, must be a safe directory name.
|
|
89
|
+
- Response ≤ 8 KB: print full JSON to stdout after saving
|
|
90
|
+
- Response > 8 KB: stdout prints only a summary (top-level fields, counts like `total`/`costToken`, length of largest list fields + first 3 samples)
|
|
91
|
+
- Add `--inline` to force full stdout output (still saves to disk)
|
|
92
|
+
|
|
93
|
+
**Data Reading Tip**: Check the summary first. Use `jq` or `ConvertFrom-Json` to extract specific fields from the saved JSON file, avoiding loading the full payload into context.
|
|
94
|
+
|
|
95
|
+
## Authentication and Credits
|
|
96
|
+
|
|
97
|
+
If authentication fails or credits are depleted:
|
|
98
|
+
- Ensure `NEXSCOPE_API_KEY` is set as an environment variable.
|
|
99
|
+
- For 401/402 errors or insufficient balance messages, direct the user to https://www.nexscope.ai/help/skills-external-access?co-from=skillNS to top up credits.
|
|
100
|
+
|
|
101
|
+
## How to Build Queries
|
|
102
|
+
|
|
103
|
+
Construct the request parameters based on the user's intent:
|
|
104
|
+
|
|
105
|
+
1. **Determine the marketplace**: Map the user's target country to the correct `amazonDomain` value
|
|
106
|
+
2. **Set the keyword**: Translate the search term into the target marketplace's language
|
|
107
|
+
3. **Choose sort order**: If the user wants results sorted by price, reviews, or newness, set the `sort` parameter
|
|
108
|
+
4. **Pagination**: Use the `page` parameter to fetch additional result pages if needed
|
|
109
|
+
5. **Category scope**: If the user wants to search within a specific category, provide the `node` parameter
|
|
110
|
+
6. **Delivery simulation**: Use `deliveryZip` to see location-specific availability and delivery info
|
|
111
|
+
|
|
112
|
+
### Usage Examples
|
|
113
|
+
|
|
114
|
+
**1. Basic keyword search on US marketplace**
|
|
115
|
+
```json
|
|
116
|
+
{"keyword": "wireless earbuds", "amazonDomain": "amazon.com"}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**2. Search on German marketplace with German keyword**
|
|
120
|
+
```json
|
|
121
|
+
{"keyword": "kabellose Kopfhoerer", "amazonDomain": "amazon.de", "language": "de_DE"}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**3. Search sorted by price (low to high)**
|
|
125
|
+
```json
|
|
126
|
+
{"keyword": "phone case", "amazonDomain": "amazon.com", "sort": "price-asc-rank"}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**4. Search for best sellers in a category**
|
|
130
|
+
```json
|
|
131
|
+
{"keyword": "yoga mat", "amazonDomain": "amazon.com", "sort": "exact-aware-popularity-rank"}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**5. Search for newest arrivals on Japan marketplace**
|
|
135
|
+
```json
|
|
136
|
+
{"keyword": "USB charger", "amazonDomain": "amazon.co.jp", "language": "ja_JP", "sort": "date-desc-rank"}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**6. Multi-page search to analyze deeper results**
|
|
140
|
+
```json
|
|
141
|
+
{"keyword": "laptop stand", "amazonDomain": "amazon.com", "page": 2}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**7. Mobile device search simulation**
|
|
145
|
+
```json
|
|
146
|
+
{"keyword": "running shoes", "amazonDomain": "amazon.com", "device": "mobile"}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**8. Category-scoped search with delivery zip**
|
|
150
|
+
```json
|
|
151
|
+
{"keyword": "office chair", "amazonDomain": "amazon.com", "deliveryZip": "10001"}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Display Rules
|
|
155
|
+
|
|
156
|
+
1. **Present data clearly**: Show search results in well-structured tables with key fields: position, ASIN, title, price, rating, review count, brand
|
|
157
|
+
2. **Highlight sponsored products**: Clearly mark which results are sponsored ads vs organic listings
|
|
158
|
+
3. **Price formatting**: Display prices with the correct currency symbol for the marketplace
|
|
159
|
+
4. **Position context**: Remind users that position reflects the actual ranking on the search result page
|
|
160
|
+
5. **Pagination notice**: When results span multiple pages, inform the user how many total results were found and suggest fetching additional pages if needed
|
|
161
|
+
6. **Error handling**: When a query fails, explain the reason based on the error response and suggest adjusting parameters
|
|
162
|
+
7. **Image links**: If image URLs are available, mention them but do not attempt to render them inline unless the user requests it
|
|
163
|
+
## Important Limitations
|
|
164
|
+
|
|
165
|
+
- **Real-time only**: This tool returns live search results, not historical data. For historical search term analytics, use ABA data instead
|
|
166
|
+
- **Rate awareness**: Each call simulates a real search request; avoid excessive rapid-fire calls
|
|
167
|
+
- **~20 results per page**: Each page returns approximately 20 product listings
|
|
168
|
+
- **Keyword language matters**: Results quality depends on using the correct language for the target marketplace
|
|
169
|
+
|
|
170
|
+
## User Expression & Scenario Quick Reference
|
|
171
|
+
|
|
172
|
+
**Applicable** -- Real-time Amazon search result queries:
|
|
173
|
+
|
|
174
|
+
| User Says | Scenario |
|
|
175
|
+
|-----------|----------|
|
|
176
|
+
| "Search for XX on Amazon" | Basic product search |
|
|
177
|
+
| "What products appear for keyword XX" | Keyword SERP analysis |
|
|
178
|
+
| "Where does my ASIN rank for XX keyword" | Position / ranking check |
|
|
179
|
+
| "Show me the top results for XX" | Competitive landscape |
|
|
180
|
+
| "What's the price range for XX" | Price comparison |
|
|
181
|
+
| "Any sponsored products for XX keyword" | Sponsored ad analysis |
|
|
182
|
+
| "New products for XX keyword" | New arrival monitoring |
|
|
183
|
+
| "Search XX on Amazon Germany/Japan/UK" | Cross-marketplace search |
|
|
184
|
+
| "What are the best sellers for XX" | Best seller discovery |
|
|
185
|
+
| "Compare search results on mobile vs desktop" | Device-specific SERP |
|
|
186
|
+
|
|
187
|
+
**Not applicable** -- Needs beyond real-time search results:
|
|
188
|
+
- Historical search term volume or ranking trends (use ABA data)
|
|
189
|
+
- Advertising campaign management or bid optimization
|
|
190
|
+
- Product review analysis or sentiment analysis
|
|
191
|
+
- Sales estimation or revenue analytics
|
|
192
|
+
- Listing optimization or copywriting suggestions
|
|
193
|
+
- Inventory or supply chain data
|
|
194
|
+
|
|
195
|
+
**Boundary judgment**: When users say "product research" or "competitor analysis", if it boils down to seeing what currently appears on Amazon search results for a keyword (product positions, prices, ratings), then this skill applies. If they want historical trends, search volume data, or aggregated analytics, ABA data is more appropriate.
|
|
196
|
+
|
|
197
|
+
*For more high-quality, professional cross-border e-commerce skills, set [Nexscope Skills](https://www.nexscope.ai/skillhub?co-from=skillNS).*
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Amazon Frontend Search Simulation API Reference
|
|
2
|
+
|
|
3
|
+
## API Specification
|
|
4
|
+
|
|
5
|
+
- **Endpoint**: `${NEXSCOPE_PROXY_BASE}/api/v1/tools/research/amazon/search`
|
|
6
|
+
- **HTTP Method**: POST, Content-Type: application/json
|
|
7
|
+
- **Authentication**: Header `Authorization: <api_key>`, read api_key from environment variable `NEXSCOPE_API_KEY` or `NEXSCOPE_API_KEY` (if not configured, follow **## Resolving Authentication and Credit Issues** in SKILL.md)
|
|
8
|
+
|
|
9
|
+
## Request Parameters
|
|
10
|
+
|
|
11
|
+
POST Body (JSON):
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Required | Description |
|
|
14
|
+
|------|------|------|------|
|
|
15
|
+
| keyword | string | No | Keyword; please translate to the language of the target country whenever possible, e.g., use English keywords for the US, German keywords for Germany, etc. (max length 1024) |
|
|
16
|
+
| amazonDomain | string | No | Amazon country site, default `amazon.com` |
|
|
17
|
+
| node | string | No | Amazon category node (max length 1000) |
|
|
18
|
+
| language | string | No | Language/region code, e.g., en_US, de_DE, ja_JP, fr_FR (max length 1000) |
|
|
19
|
+
| sort | string | No | Sort order: `relevanceblender` (Featured, default), `price-asc-rank` (Price low to high), `price-desc-rank` (Price high to low), `review-rank` (Avg. customer review), `date-desc-rank` (Newest arrivals), `exact-aware-popularity-rank` (Best sellers) |
|
|
20
|
+
| page | integer | No | Page number (starting from 1, ~20 items per page), default `1` |
|
|
21
|
+
| deliveryZip | string | No | Delivery zip code, used to simulate Amazon frontend address. It is recommended to use commonly used zip codes for major cities in the target country, e.g., New York zip code 10001 for the US site (max length 1000) |
|
|
22
|
+
| device | string | No | Device type: `desktop`, `mobile`, `tablet`, default `desktop` (max length 1000) |
|
|
23
|
+
|
|
24
|
+
### Supported amazonDomain Values
|
|
25
|
+
|
|
26
|
+
| Domain | Country |
|
|
27
|
+
|------|------|
|
|
28
|
+
| amazon.com | United States |
|
|
29
|
+
| amazon.co.uk | United Kingdom |
|
|
30
|
+
| amazon.de | Germany |
|
|
31
|
+
| amazon.fr | France |
|
|
32
|
+
| amazon.it | Italy |
|
|
33
|
+
| amazon.es | Spain |
|
|
34
|
+
| amazon.co.jp | Japan |
|
|
35
|
+
| amazon.ca | Canada |
|
|
36
|
+
| amazon.com.au | Australia |
|
|
37
|
+
| amazon.com.br | Brazil |
|
|
38
|
+
| amazon.in | India |
|
|
39
|
+
| amazon.nl | Netherlands |
|
|
40
|
+
| amazon.se | Sweden |
|
|
41
|
+
| amazon.pl | Poland |
|
|
42
|
+
| amazon.sg | Singapore |
|
|
43
|
+
| amazon.sa | Saudi Arabia |
|
|
44
|
+
| amazon.ae | UAE |
|
|
45
|
+
| amazon.com.mx | Mexico |
|
|
46
|
+
| amazon.com.tr | Turkey |
|
|
47
|
+
| amazon.com.be | Belgium |
|
|
48
|
+
| amazon.cn | China |
|
|
49
|
+
| amazon.eg | Egypt |
|
|
50
|
+
|
|
51
|
+
### Common language Values
|
|
52
|
+
|
|
53
|
+
| Region Code | Description |
|
|
54
|
+
|----------|------|
|
|
55
|
+
| en_US | US English |
|
|
56
|
+
| en_GB | UK English |
|
|
57
|
+
| de_DE | Germany German |
|
|
58
|
+
| fr_FR | France French |
|
|
59
|
+
| it_IT | Italy Italian |
|
|
60
|
+
| es_ES | Spain Spanish |
|
|
61
|
+
| ja_JP | Japan Japanese |
|
|
62
|
+
| en_CA | Canada English |
|
|
63
|
+
| fr_CA | Canada French |
|
|
64
|
+
| en_AU | Australia English |
|
|
65
|
+
| pt_BR | Brazil Portuguese |
|
|
66
|
+
| en_IN | India English |
|
|
67
|
+
| hi_IN | India Hindi |
|
|
68
|
+
| nl_NL | Netherlands Dutch |
|
|
69
|
+
| sv_SE | Sweden Swedish |
|
|
70
|
+
| pl_PL | Poland Polish |
|
|
71
|
+
| en_SG | Singapore English |
|
|
72
|
+
| ar_AE | UAE/Saudi Arabia/Egypt Arabic |
|
|
73
|
+
| en_AE | UAE/Saudi Arabia/Egypt English |
|
|
74
|
+
| tr_TR | Turkey Turkish |
|
|
75
|
+
| nl_BE | Belgium Dutch |
|
|
76
|
+
| fr_BE | Belgium French |
|
|
77
|
+
| zh_CN | China Chinese |
|
|
78
|
+
| pt_MX | Mexico Spanish |
|
|
79
|
+
|
|
80
|
+
### Common deliveryZip Values
|
|
81
|
+
|
|
82
|
+
| Country | City | Zip Code |
|
|
83
|
+
|------|------|------|
|
|
84
|
+
| United States | New York | 10001 |
|
|
85
|
+
| United Kingdom | London | EC1A 1BB |
|
|
86
|
+
| Germany | Berlin | 10115 |
|
|
87
|
+
| France | Paris | 75001 |
|
|
88
|
+
| Italy | Rome | 00100 |
|
|
89
|
+
| Spain | Madrid | 28001 |
|
|
90
|
+
| Japan | Tokyo | 100-0001 |
|
|
91
|
+
| Canada | Toronto | M5A 1A1 |
|
|
92
|
+
| Australia | Sydney | 2000 |
|
|
93
|
+
| Brazil | Sao Paulo | 01000-000 |
|
|
94
|
+
| India | New Delhi | 110001 |
|
|
95
|
+
| Netherlands | Amsterdam | 1012 |
|
|
96
|
+
| Sweden | Stockholm | 111 22 |
|
|
97
|
+
| Poland | Warsaw | 00-001 |
|
|
98
|
+
| Singapore | Singapore | 018989 |
|
|
99
|
+
| Saudi Arabia | Riyadh | 11564 |
|
|
100
|
+
| UAE | Abu Dhabi | 00000 |
|
|
101
|
+
| Mexico | Mexico City | 01000 |
|
|
102
|
+
| Turkey | Istanbul | 34349 |
|
|
103
|
+
| Belgium | Brussels | 1000 |
|
|
104
|
+
| China | Beijing | 100000 |
|
|
105
|
+
| Egypt | Cairo | 11511 |
|
|
106
|
+
|
|
107
|
+
## Nexscope response envelope
|
|
108
|
+
|
|
109
|
+
These research endpoints return a platform object with numeric `code`, nullable `msg`, and business `data`. Only outer `code: 0` means success; `200`, string codes, missing codes, and HTTP 200 alone do not. A nonzero code is a platform error: show `msg` and do not interpret the payload as a successful result.
|
|
110
|
+
|
|
111
|
+
`msg` preserves the upstream message when available; Chinese messages are translated to English by Nexscope. A successful response without a message has `msg: null`. Do not infer success or retry behavior from the message text. On both success and failure, the direct fields `code`, `errcode`, `errorCode`, `msg`, `errmsg`, `message`, and `errorMsg` are removed from public `data`. Read the message only from outer `msg`; deeper business fields are preserved, including nested `code` and `status`.
|
|
112
|
+
|
|
113
|
+
Business field tables and abbreviated business examples below describe `data`, unless explicitly labeled as a complete platform response. For example, a business `products` field is at HTTP `data.products`, and a business `data` array is at HTTP `data.data`. The research endpoints already had this outer envelope; no additional wrapper is added.
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{"code":0,"msg":null,"data":{}}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Metadata includes string `ts` (epoch milliseconds), string `cost` (elapsed milliseconds, not credits), `time`, and nullable `traceId`. Handle network/HTTP failures before the platform code; gateway failures may not be platform JSON. Keep the existing billing-header guidance separate from elapsed time.
|
|
120
|
+
|
|
121
|
+
## Response Structure
|
|
122
|
+
|
|
123
|
+
| Field | Type | Description |
|
|
124
|
+
|------|------|------|
|
|
125
|
+
| total | integer | Total rows |
|
|
126
|
+
| keyword | string | Search keyword |
|
|
127
|
+
| type | string | Render style |
|
|
128
|
+
| columns | array | Rendered column definitions |
|
|
129
|
+
| costToken | integer | Token consumption |
|
|
130
|
+
| products | array | Search result list (see below) |
|
|
131
|
+
|
|
132
|
+
### Product Object Fields in products
|
|
133
|
+
|
|
134
|
+
| Field | Type | Description |
|
|
135
|
+
|------|------|------|
|
|
136
|
+
| asin | string | ASIN |
|
|
137
|
+
| title | string | Title |
|
|
138
|
+
| brand | string | Brand |
|
|
139
|
+
| price | number | Price |
|
|
140
|
+
| extractedPrice | number | Parsed price |
|
|
141
|
+
| oldPrice | number | Strikethrough price |
|
|
142
|
+
| extractedOldPrice | number | Parsed strikethrough price |
|
|
143
|
+
| currency | string | Currency |
|
|
144
|
+
| priceUnit | string | Price unit |
|
|
145
|
+
| extractedPriceUnit | number | Parsed price unit |
|
|
146
|
+
| rating | number | Rating |
|
|
147
|
+
| ratings | integer | Number of ratings |
|
|
148
|
+
| position | integer | Position |
|
|
149
|
+
| sponsored | boolean | Whether sponsored |
|
|
150
|
+
| imageUrl | string | Thumbnail |
|
|
151
|
+
| asinUrl | string | Link |
|
|
152
|
+
| delivery | string | Delivery information |
|
|
153
|
+
| fulfillment | string | Fulfillment information (e.g., FBA) |
|
|
154
|
+
| availableDate | string (date) | Listing time |
|
|
155
|
+
| monthlySalesUnits | integer | Monthly sales units |
|
|
156
|
+
| monthlySalesRevenue | string | Monthly sales revenue |
|
|
157
|
+
| sellerNation | string | Seller nationality |
|
|
158
|
+
| dimension | string | Dimensions |
|
|
159
|
+
| weight | string | Weight |
|
|
160
|
+
| options | string | Options |
|
|
161
|
+
| offers | string | Offer information |
|
|
162
|
+
| badges | string | Amazon frontend search badges |
|
|
163
|
+
| tags | string | Tags |
|
|
164
|
+
| snapEbtEligible | boolean | SNAP/EBT eligibility |
|
|
165
|
+
| sourceType | string | Source type: amazon |
|
|
166
|
+
| sourceTool | string | Source tool |
|
|
167
|
+
| keyword | string | Keyword |
|
|
168
|
+
|
|
169
|
+
## Error Codes
|
|
170
|
+
|
|
171
|
+
HTTP 200 does not prove business success. Read only the numeric outer platform `code`: `0` succeeds and any other value fails. Show outer `msg`; never test removed provider codes or nested business `code` as the platform status. Authentication, permissions, balance, and validation failures may be platform errors even with HTTP 200; also handle non-2xx HTTP and non-JSON responses.
|
|
172
|
+
|
|
173
|
+
### Recovery guidance
|
|
174
|
+
|
|
175
|
+
| Condition | Action |
|
|
176
|
+
|---|---|
|
|
177
|
+
| Authentication failed | HTTP 401 or authorized error: follow **## Resolving Authentication and Credit Issues** in SKILL.md. |
|
|
178
|
+
| Insufficient credits | HTTP 402: follow **## Resolving Authentication and Credit Issues** in SKILL.md. |
|
|
179
|
+
|
|
180
|
+
## curl Example
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
curl -X POST ${NEXSCOPE_PROXY_BASE}/api/v1/tools/research/amazon/search \
|
|
184
|
+
-H "Authorization: Bearer ${NEXSCOPE_API_KEY}" \
|
|
185
|
+
-H "Content-Type: application/json" \
|
|
186
|
+
-d '{"keyword": "wireless earbuds", "amazonDomain": "amazon.com", "page": 1}'
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nexscope-cli==0.1.0
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# Copyright 2026 Nexscope
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
"""Independent Skill compatibility entrypoint; install the paired local wheel."""
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
INDEPENDENT_COMPAT_API = 1
|
|
8
|
+
REQUIRED_VERSION = '0.1.0'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def main():
|
|
12
|
+
try:
|
|
13
|
+
from nexscope_cli import __version__
|
|
14
|
+
from nexscope_cli.compat import COMPAT_API_VERSION
|
|
15
|
+
from nexscope_cli.compat.legacy import main as run
|
|
16
|
+
except ImportError:
|
|
17
|
+
print('Dependency missing: install nexscope-cli==0.1.0 from the paired local wheel using this Python interpreter. No request was sent.', file=sys.stderr)
|
|
18
|
+
return 1
|
|
19
|
+
if __version__ != REQUIRED_VERSION or COMPAT_API_VERSION != INDEPENDENT_COMPAT_API:
|
|
20
|
+
print('Dependency mismatch: this adapter requires nexscope-cli==0.1.0 and compatibility API 1. Install the paired wheel or restore the previous Skill directory. No request was sent.', file=sys.stderr)
|
|
21
|
+
return 1
|
|
22
|
+
return run('amazon-search')
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
if __name__ == '__main__':
|
|
26
|
+
sys.exit(main())
|