### Recommended Agent Workflow Source: https://zpi.web.id/mcp Illustrates the recommended 3-step workflow for an agent using MCP tools. This workflow involves searching for scrapers, optionally getting the schema, and then running the scraper. ```bash # The recommended 3-step workflow for your agent: search_scrapers query="instagram profile" # 1) find an endpoint get_scraper_schema scraper="..." endpoint="..." # 2) only if flagged needsSchemaCall run_scraper scraper="..." endpoint="profile" params={ "username": "zaadevofc" } ``` -------------------------------- ### SDK Client Initialization and Usage Source: https://zpi.web.id/mcp Demonstrates how to initialize the MCP client and use its methods like `listTools` and `callTool`. ```APIDOC ## SDK client From TypeScript, skip the client config entirely — `zpi-sdk/mcp` is a zero-dependency MCP client for the same server: JSON-RPC over Streamable HTTP, protocol version `2025-06-18`, session tracked via the `mcp-session-id` header. The initialize handshake runs lazily on first call. mcp.ts ```typescript import { createMcpClient } from "zpi-sdk/mcp"; const mcp = createMcpClient({ apiKey: "zpi_...", baseURL: "https://api.zpi.web.id", }); const tools = await mcp.listTools(); const result = await mcp.callTool("run_scraper", { scraper: "instagram-scraper", endpoint: "profile", params: { username: "zaadevofc" }, }); ``` `listTools()` returns the 8 tool definitions; `callTool(name, args)` invokes one. RPC failures throw `ZpiMcpError` (with `code` and `data`). See the SDK docs for the full client reference. ``` -------------------------------- ### Create MCP Client and Call Tools (TypeScript) Source: https://zpi.web.id/mcp Demonstrates creating a zero-dependency MCP client in TypeScript and making calls to list tools and execute a scraper. The client initializes lazily on the first call. RPC failures throw ZpiMcpError. ```typescript import { createMcpClient } from "zpi-sdk/mcp"; const mcp = createMcpClient({ apiKey: "zpi_...", baseURL: "https://api.zpi.web.id", }); const tools = await mcp.listTools(); const result = await mcp.callTool("run_scraper", { scraper: "instagram-scraper", endpoint: "profile", params: { username: "zaadevofc" }, }); ``` -------------------------------- ### Continue MCP Configuration Source: https://zpi.web.id/mcp Configuration for Continue using 'mcpServers' with 'type: streamable-http'. Ensure 'docs.continue.dev' for verification. ```json { "mcpServers": [ { "name": "zapi", "type": "streamable-http", "url": "https://mcp.zpi.web.id/mcp", "requestOptions": { "headers": { "Authorization": "Bearer zpi_xxx" } } } ] } ``` -------------------------------- ### Claude Desktop/Claude.ai MCP Configuration with mcp-remote Source: https://zpi.web.id/mcp Configuration for Claude Desktop/Claude.ai using 'mcp-remote' as a stdio bridge. Ensure 'command' and 'args' are correctly formatted, with '--header' and its value as separate array elements. ```json { "mcpServers": { "zapi": { "command": "npx", "args": [ "-y", "mcp-remote", "https://mcp.zpi.web.id/mcp", "--header", "Authorization: Bearer zpi_xxx" ] } } } ``` -------------------------------- ### JetBrains AI Assistant MCP Configuration Source: https://zpi.web.id/mcp Configuration for JetBrains AI Assistant using 'context_servers' for MCP servers. ```json { "context_servers": { "zapi": { "url": "https://mcp.zpi.web.id/mcp", "headers": { "Authorization": "Bearer zpi_xxx" } } } } ``` -------------------------------- ### bulk_submit Source: https://zpi.web.id/mcp Submits a batch job for processing. Requires a Pro+ plan and `bulkEnabled` on the target endpoint. Returns immediately with a job ID. ```APIDOC ### bulk_submit bills per itempro plan or higher Submits a batch job. Requires a Pro+ plan _and_ `bulkEnabled` on the target endpoint, with per-tier item caps. Returns immediately with `{ jobId, status: "queued", total }` — it never waits; poll with `bulk_status`. Param| Type| Required| Purpose ---|---|---|--- scraper| string| yes| Scraper slug. endpoint| string| yes| Endpoint slug. urls| array| yes| URL strings or per-item param objects; duplicates are removed. idempotencyKey| string| no| Same key returns the same job — no double submission. ``` -------------------------------- ### VS Code / Copilot MCP Configuration Source: https://zpi.web.id/mcp Configuration for VS Code and GitHub Copilot using 'servers' with 'type: http' for MCP servers. ```json { "servers": { "zapi": { "type": "http", "url": "https://mcp.zpi.web.id/mcp", "headers": { "Authorization": "Bearer zpi_xxx" } } } } ``` -------------------------------- ### Antigravity/Windsurf Client MCP Configuration Source: https://zpi.web.id/mcp Configuration for Antigravity and Windsurf clients using the 'serverUrl' key for MCP servers. ```json { "mcpServers": { "zapi": { "serverUrl": "https://mcp.zpi.web.id/mcp", "headers": { "Authorization": "Bearer zpi_xxx" } } } } ``` -------------------------------- ### Cursor Client MCP Configuration Source: https://zpi.web.id/mcp Configuration for the Cursor client using the 'url' key for MCP servers. ```json { "mcpServers": { "zapi": { "url": "https://mcp.zpi.web.id/mcp", "headers": { "Authorization": "Bearer zpi_xxx" } } } } ``` -------------------------------- ### Gemini CLI MCP Configuration Source: https://zpi.web.id/mcp Configuration for the Gemini CLI using the 'httpUrl' key for MCP servers. ```json { "mcpServers": { "zapi": { "httpUrl": "https://mcp.zpi.web.id/mcp", "headers": { "Authorization": "Bearer zpi_xxx" } } } } ``` -------------------------------- ### get_account Source: https://zpi.web.id/mcp Retrieves account information including tier, plan status, expiration date, and API key details. Does not return the API key secret. ```APIDOC ### get_account read-only · free No input. Returns your `tier`, `planStatus` (`free | active | expired`), `planExpiresAt`, and the API key label (`{ name, keyPrefix, enabled }`). The key secret is never returned. Quota numbers live in `get_usage`, not here. ``` -------------------------------- ### get_usage Source: https://zpi.web.id/mcp Provides a summary of API usage, including total requests, requests and errors in the last 24 hours, success rate, and quota details. ```APIDOC ### get_usage read-only · free No input. Returns a summary (`{ totalRequests, requests24h, errors24h, successRate24h }`) plus your quota (`{ tier, used, limit, remaining, resetAt }`— `resetAt` is the 1st of next month, UTC). Check it before `run_scraper` to avoid burning quota blind. ``` -------------------------------- ### run_scraper Source: https://zpi.web.id/mcp Executes a specified scraper endpoint with provided parameters. This tool bills per call and clients should not auto-approve its execution. ```APIDOC ### run_scraper bills per call Executes one scraper endpoint. Marked `readOnlyHint: false` — clients should **not auto-approve** it. Path params in `params` fill the URL template automatically and the HTTP method is chosen for you. Param| Type| Required| Purpose ---|---|---|--- scraper| string| yes| Scraper slug. endpoint| string| yes| Endpoint slug. params| object| no| Endpoint params; path params (username, slug, …) go here too. Success returns `{ data, project, cache, meta }` where `meta` is `{ billed, costUnits, remaining, resetAt }`. Failures set `isError` with a code from the error table — including `plan_upgrade_required` when the endpoint's `minPlan` is above your tier. ``` -------------------------------- ### Add MCP Transport via CLI Source: https://zpi.web.id/mcp Use this command to add the MCP transport with a specific URL and authorization header. ```bash claude mcp add --transport http zapi https://mcp.zpi.web.id/mcp \ --header "Authorization: Bearer zpi_xxx" ``` -------------------------------- ### Zapi MCP Endpoint and Authentication Headers Source: https://zpi.web.id/mcp This snippet shows the Zapi MCP server endpoint and the three acceptable headers for authentication using an API key. ```text # Zapi MCP endpoint (Streamable HTTP) https://mcp.zpi.web.id/mcp # Auth via header — any of these three: Authorization: Bearer zpi_xxx x-api-key: zpi_xxx api-key: zpi_xxx ``` -------------------------------- ### search_scrapers Source: https://zpi.web.id/mcp Performs a natural-language fuzzy search over the catalog of available scrapers and endpoints. Returns zero results with did-you-mean suggestions if no matches are found. ```APIDOC ### search_scrapers read-only · free Natural-language fuzzy search over the catalog. Zero results return did-you-mean suggestions. Each row includes the endpoint's params inline plus `minPlan` and `bulkEnabled`. Categories: `ai, bypass-tools, downloader, food, games, search-tools, social-media, web-tools`. Param| Type| Required| Purpose ---|---|---|--- query| string| no| Free-text search, e.g. "instagram profile". category| string| no| Filter to one category. cursor| string| no| Pagination cursor. ``` -------------------------------- ### list_categories Source: https://zpi.web.id/mcp Lists all available categories in the scraper catalog, along with the count of scrapers within each category. Useful for scoping searches. ```APIDOC ### list_categories read-only · free No input. Returns every catalog category with its scraper count — useful for scoping before a search. ``` -------------------------------- ### get_scraper_schema Source: https://zpi.web.id/mcp Retrieves the full parameter schema for a specific scraper endpoint. Useful for understanding the required and optional parameters for an endpoint. ```APIDOC ### get_scraper_schema read-only · free Full parameter schema for one endpoint: fields with `name / type / required / example`, plus `minPlan` and `bulkEnabled`. Unknown scraper or endpoint returns an error steering back to `search_scrapers`. Param| Type| Required| Purpose ---|---|---|--- scraper| string| yes| Scraper slug. endpoint| string| yes| Endpoint slug. ``` -------------------------------- ### bulk_status Source: https://zpi.web.id/mcp Polls the status of a bulk submission job using its job ID. Returns details about the job's progress, success, and failures. ```APIDOC ### bulk_status read-only · free Polls one job. Returns `{ jobId, status, total, succeeded, failed, scraperSlug, endpointSlug, items }` where each item is `{ url, status, error? }`. Unknown or other-account jobs return `job_not_found` — job ids can't be enumerated. Param| Type| Required| Purpose ---|---|---|--- jobId| string| yes| Id from bulk_submit. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.