datalab_shopping_keyword_by_age
Analyze Naver Shopping keyword trends by age groups to understand consumer behavior. Input keyword, category, date range, and age groups for targeted insights.
Instructions
Perform a trend analysis on Naver Shopping keywords by age. (네이버 쇼핑 키워드 연령별 트렌드 분석)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ages | Yes | Age groups | |
| category | Yes | Category code | |
| endDate | Yes | End date (yyyy-mm-dd) | |
| keyword | Yes | Search keyword | |
| startDate | Yes | Start date (yyyy-mm-dd) | |
| timeUnit | Yes | Time unit |
Implementation Reference
- src/handlers/datalab.handlers.ts:188-199 (handler)Handler function that maps tool arguments to client method parameters and calls the Naver DataLab API for shopping keyword trends by age.export async function handleShoppingKeywordByAgeTrend( params: DatalabShoppingKeywordAge ) { return client.datalabShoppingKeywordByAge({ startDate: params.startDate, endDate: params.endDate, timeUnit: params.timeUnit, category: params.category, keyword: params.keyword, ages: params.ages, }); }
- Client method that performs the HTTP POST request to Naver DataLab API endpoint for shopping keyword by age trends.async datalabShoppingKeywordByAge( params: DatalabShoppingKeywordRequest ): Promise<DatalabShoppingResponse> { return this.post( `${this.datalabBaseUrl}/shopping/category/keyword/age`, params ); }
- src/index.ts:408-423 (registration)MCP server registration of the 'datalab_shopping_keyword_by_age' tool, including description, input schema, and execution handler.server.registerTool( "datalab_shopping_keyword_by_age", { description: "👶👦👨👴🔍 Analyze keyword performance by age groups within shopping categories. Use find_category first to get category codes. Perfect for age-targeted marketing and understanding generational shopping preferences. (쇼핑 키워드 연령별 트렌드 - 먼저 find_category 도구로 카테고리 코드를 찾으세요)", inputSchema: DatalabShoppingKeywordAgeSchema.shape, }, async (args) => { const result = await datalabToolHandlers.datalab_shopping_keyword_by_age( args ); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } );
- src/schemas/datalab.schemas.ts:82-88 (schema)Zod schema defining the input parameters for the datalab_shopping_keyword_by_age tool: startDate, endDate, timeUnit, category, keyword, ages.export const DatalabShoppingKeywordAgeSchema = DatalabBaseSchema.extend({ category: z.string().describe("Category code"), keyword: z.string().describe("Search keyword"), ages: z .array(z.enum(["10", "20", "30", "40", "50", "60"])) .describe("Age groups"), });
- src/handlers/datalab.handlers.ts:56-59 (registration)Entry in datalabToolHandlers map that registers the tool handler function, logs args, and delegates to the main handler.datalab_shopping_keyword_by_age: (args) => { console.error("datalab_shopping_keyword_by_age called with args:", JSON.stringify(args, null, 2)); return handleShoppingKeywordByAgeTrend(args); },