amazon_sellers
Scrape Amazon seller data by providing a seller ID. Supports custom domains, device types, and geolocation for tailored results.
Instructions
Scrape Amazon Seller information with automatic parsing
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Amazon seller ID (e.g., "A1R0Z7FJGTKESH") | |
| jsRender | No | Should the request be opened in a headless browser, false by default | |
| domain | No | Amazon domain (e.g., amazon.com, amazon.co.uk) | |
| deviceType | No | Device type to emulate for the request | |
| geo | No | Amazon geo location (e.g., 10001 for US ZIP code) |
Implementation Reference
- The AmazonSellersTool class that implements the tool logic. The register method (lines 25-61) registers the 'amazon_sellers' tool with the MCP server, handling the scraping of Amazon seller information by calling sapiClient.scrape with target 'amazon_sellers'.
export class AmazonSellersTool extends Tool { toolset = TOOLSET.ECOMMERCE; transformResponse = ({ data }: { data: object }) => { return { data: JSON.stringify(data) }; }; register = ({ server, sapiClient, auth }: ToolRegistrationArgs) => { server.registerTool( 'amazon_sellers', { description: 'Scrape Amazon Seller information with automatic parsing', inputSchema: { query: z.string().describe('Amazon seller ID (e.g., "A1R0Z7FJGTKESH")'), jsRender: zodJsRender, domain: zodDomain, deviceType: zodDeviceType, geo: zodGeo, }, annotations: { readOnlyHint: true, openWorldHint: true, }, }, async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => { const params = { ...scrapingParams, target: SCRAPER_API_TARGETS.AMAZON_SELLERS, parse: true, } satisfies ScraperAPIParams; const { data } = await sapiClient.scrape<object>({ auth, scrapingParams: params, extra }); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; } ); }; } - Zod schemas for the tool's input parameters: zodDomain (Amazon domain, optional) and zodGeo (Amazon geo location, optional).
const zodDomain = z .string() .describe('Amazon domain (e.g., amazon.com, amazon.co.uk)') .optional(); const zodGeo = z .string() .describe('Amazon geo location (e.g., 10001 for US ZIP code)') .optional(); - Input schema definition for the amazon_sellers tool including query (seller ID), jsRender, domain, deviceType, and geo parameters.
inputSchema: { query: z.string().describe('Amazon seller ID (e.g., "A1R0Z7FJGTKESH")'), jsRender: zodJsRender, domain: zodDomain, deviceType: zodDeviceType, geo: zodGeo, }, annotations: { - src/server/sapi-base-server.ts:113-117 (registration)The registerAllTools method (line 113-117) iterates over all tools including AmazonSellersTool and calls their register() method to register them with the MCP server.
registerAllTools() { for (const tool of ScraperAPIBaseServer.allTools) { tool.register({ server: this.server, sapiClient: this.sapiClient, auth: this.auth }); } } - src/server/sapi-base-server.ts:66-97 (registration)The allTools static array (line 66-97) instantiates all tools, including new AmazonSellersTool() on line 77, making it available for registration.
static allTools: Tool[] = [ new ScrapeAsMarkdownTool(), new ScreenshotTool(), new GoogleSearchTool(), new GoogleAdsTool(), new GoogleLensTool(), new GoogleAiModeTool(), new GoogleTravelHotelsTool(), new AmazonSearchTool(), new AmazonProductTool(), new AmazonPricingTool(), new AmazonSellersTool(), new AmazonBestsellersTool(), new WalmartSearchTool(), new WalmartProductTool(), new TargetSearchTool(), new TargetProductTool(), new TiktokPostTool(), new TiktokShopSearchTool(), new TiktokShopProductTool(), new TiktokShopUrlTool(), new YoutubeMetadataTool(), new YoutubeChannelTool(), new YoutubeSubtitlesTool(), new YoutubeSearchTool(), new RedditPostTool(), new RedditSubredditTool(), new RedditUserTool(), new BingSearchTool(), new ChatGPTTool(), new PerplexityTool(), ];