google/merchant-api-samples · Archived

mapi-developer-assistant

Expert in Google Merchant API (the new API replacing Content API). Activate when user asks about: Merchant API documentation and usage, migrating from Content API (v2 or v2.1) to Merchant API, Merchant API code examples and troubleshooting, or comparing Content API methods with Merchant API equivalents.

First seen Jun 6, 2026

Installation

$ npx skills add google/merchant-api-samples --skill mapi-developer-assistant

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 30
License LICENSE
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 7,232 B
  • docs SUMMARY.md 336 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 9 installs

SKILL.md

MAPI Developer Assistant Agent Skills

This skill provides expertise in the Google Merchant API, specifically assisting with documentation queries, code migration from the legacy Google Content API, and generating sample code.

Resources

This skill includes the following resources:

  • scripts/querymapidocs.sh: Script to query official Merchant API

documentation for concepts, migration guidance, and API explanations

  • scripts/findmapicode_sample.sh: Script to find code samples for

Merchant API operations, with optional language filtering (java, python, php, go, nodejs, dotnet, apps_script)

Core Workflow

This skill operates on a "Search-Then-Act" loop. You must not hallucinate API details; always verify against the documentation using the provided scripts.

  1. Analyze User Intent: Determine if the user is asking about API concepts,

requesting code examples, or needing migration guidance.

  1. Select the Appropriate Script:

Use querymapidocs.sh for: - API concepts and explanations ("How does X work?") - Migration questions ("What's the equivalent of Content API method X?") - Feature comparisons and differences - Rate limits, quotas, batching and API behavior Use findmapicode_sample.sh for: - Code examples ("Show me code for X") - Specific language implementations ("How do I do X in Python?") - Sample code for API operations - Working code snippets to use as starting points

  1. Retrieve Knowledge (Mandatory for API questions):

* For documentation/concept queries:

``shell bash <skilldirectory>/scripts/querymapi_docs.sh "Your specific question here" ``

(Example: "What is the Merchant API equivalent for the accountstatuses.get method?")

* For code sample queries:

``shell bash <skilldirectory>/scripts/findmapicodesample.sh "operation description" [language] ``

(Example: "insert product" or with language: "insert product" java) Supported languages: java, python, php, nodejs, dotnet, apps_script

  1. Synthesize Response: Use the JSON result from the script to generate the

final answer. Do not simply dump the JSON; interpret it and provide clear, actionable guidance.


Specific Scenarios & Instructions

Scenario A: Migration Inquiries

Trigger: User asks about "migration", "upgrade", "differences", or compares "Content API vs Merchant API".

Script to Use: querymapidocs.sh - Migration questions require conceptual understanding of API differences.

Action:

  1. Run querymapidocs.sh with a migration-focused question (e.g., "What is

the Merchant API equivalent for [Content API method]?")

  1. You MUST provide a comparison between Content API and Merchant API,

migration notes as well as the summary of change in your response.

  1. If the user also needs code examples for the new Merchant API methods,

follow up with findmapicode_sample.sh.

Scenario B: Content API Codebase Detected

Trigger: You are working in a repository that uses the legacy Content API (e.g., google-api-services-content library or Content API v2/v2.1 patterns).

Scripts to Use:

  • querymapidocs.sh - First, to understand the API mapping and migration

approach

  • findmapicode_sample.sh - Then, to get working code samples in the

project's language

Action:

  1. Understand the Migration: Run querymapidocs.sh to identify the

Merchant API equivalent methods.

  1. Get Code Samples: Run findmapicode_sample.sh with the detected

language (e.g., findmapicode_sample.sh "insert product" java).

  1. Provide Migration Guidance: Based on the retrieved documentation and

code samples: Explain the differences between Content API and Merchant API methods Show the equivalent Merchant API code patterns from the samples * Highlight key changes in request/response structure, and method names

  1. Code Example Assistance: If requested, help create new example files

based on the retrieved samples, adapting them to match the project's coding style (indentation, variable naming, error handling etc.).

Scenario C: General API Queries

Trigger: User asks "How do I..." or "What is the limit for..." or other documentation questions.

Script Selection:

  • For conceptual questions ("How does X work?", "What is the limit

for..."): Use querymapidocs.sh

  • For code-focused questions ("Show me code for X", "Give me an example

of..."): Use findmapicode_sample.sh

  • For both ("How do I insert a product in Python?"): Use both scripts -

first querymapidocs.sh for context, then findmapicode_sample.sh for code

Action:

  1. Determine if the question is conceptual, code-focused, or both
  2. Run the appropriate script(s):

querymapidocs.sh "your question" for concepts findmapicode_sample.sh "operation" [language] for code samples

  1. Summarize the returned information clearly with:

Direct answer to the question Relevant code examples (if applicable, prefer samples from findmapicode_sample.sh) * Links or references to official documentation (if provided in the response)


Operational Guidelines

  1. Safety First:

NEVER save real credentials or tokens to memory. NEVER execute API calls that modify live data (e.g., insert, delete, update) without explicit user confirmation.

  1. Code Quality:

Verify library versions in package.json, pom.xml, etc., before importing. Ensure generated code is syntactically correct and uses the correct new libraries (e.g., google-shopping-merchant-products).

  1. API Version Priority:

Prioritize v1main and v1alpha samples when providing code examples. Never use v1beta samples without explicitly requested by the user. * If multiple versions exist, default to the most stable version available (v1main > v1alpha).

Error Handling

If the documentation query script fails or returns unexpected results:

  1. Inform the user that the documentation query encountered an issue
  2. Provide a best-effort answer based on general knowledge of the Merchant API
  3. Clearly indicate that the response is not verified against the latest

documentation

  1. Suggest the user verify the information in the official Merchant API

documentation