### Response Example Source: https://docs.yepapi.com/youtube-api/channel-channels This is an example of a successful JSON response when fetching featured channels. It includes details for each related channel. ```json { "ok": true, "data": { "data": [ { "type": "channel", "channelId": "UCsooa4yRKGN_zEE8iknghZA", "title": "TED-Ed", "channelHandle": "@TEDEd", "subscriberCountText": "1.2M subscribers", "thumbnail": [ { "url": "https://yt3.ggpht.com/", "width": 88, "height": 88 } ] } ] } } ``` -------------------------------- ### XPath Selector Example Source: https://docs.yepapi.com/web-scraping/data-extract Demonstrates using XPath expressions for selectors. Any selector string starting with '/' will be interpreted as an XPath query. ```json {"title": "//h1"} ``` -------------------------------- ### Example API Response Source: https://docs.yepapi.com/amazon-api/products-by-category This is an example of a successful JSON response from the API, detailing product information within a specified category. ```json { "ok": true, "data": { "status": "OK", "request_id": "6dc35479-a1dc-45d4-828d-978ec94ebe61", "parameters": { "category_id": "2478868012", "country": "US", "sort_by": "RELEVANCE", "page": 1 }, "data": { "total_products": 975521, "country": "US", "domain": "www.amazon.com", "products": [ { "asin": "168281808X", "product_title": "Untitled Empyrean (Not Book Four)", "product_price": "$17.49", "product_original_price": "$24.99", "currency": "USD", "product_star_rating": null, "product_num_ratings": 0, "book_format": "Hardcover", "product_url": "https://www.amazon.com/dp/168281808X", "product_photo": "https://m.media-amazon.com/images/I/716ogrQC-4L._AC_UL960_QL65_.jpg", "product_num_offers": 1, "product_minimum_offer_price": "$17.49", "is_best_seller": false, "is_amazon_choice": false, "is_prime": false, "has_variations": false } ] } } } ``` -------------------------------- ### Install YepAPI MCP Server Source: https://docs.yepapi.com/ai-agents/mcp-server Install the MCP server globally using npm. This command makes the mcp executable available on your system. ```bash npm install -g @yepapi/mcp ``` -------------------------------- ### Product Details API Response Example Source: https://docs.yepapi.com/amazon-api/product This is an example of a successful JSON response when retrieving product details. It includes various attributes of the product. ```json { "ok": true, "data": { "status": "OK", "request_id": "56ba58ed-368d-4cf5-8322-6e34a7d0e3d6", "parameters": { "asin": "B07ZPKBL9V", "country": "US" }, "data": { "asin": "B07ZPKBL9V", "product_title": "Apple iPhone 11, 64GB, PRODUCT RED - Unlocked (Renewed)", "product_price": "169.00", "product_original_price": "$174.64", "delivery_price": "FREE", "currency": "USD", "country": "US", "domain": "www.amazon.com", "product_byline": "Visit the Amazon Renewed Store", "product_star_rating": "4.2", "product_num_ratings": 59992, "product_url": "https://www.amazon.com/dp/B07ZPKBL9V", "product_photo": "https://m.media-amazon.com/images/I/514k7uOBMwL._AC_SL1000_.jpg", "product_num_offers": 33, "product_availability": "Only 16 left in stock - order soon.", "product_condition": "Refurbished - Excellent", "offer_box_title": "Refurbished - Good", "offer_box_price": "$159.00", "is_best_seller": false, "is_amazon_choice": false, "is_prime": false, "sales_volume": "200+ bought in past month", "about_product": [ "Unlocked and compatible with any carrier of choice on GSM and CDMA networks.", "Tested for battery health and guaranteed minimum 80% capacity.", "Passed a full diagnostic test ensuring like-new functionality." ], "product_description": "The iPhone 11 features a 6.1-inch LCD 'Liquid Retina HD Display' at 326ppi with True Tone and wide color support.", "product_information": { "Operating System": "iOS 16", "RAM Memory Installed": "4 GB", "Memory Storage Capacity": "64 GB", "Color": "(PRODUCT) RED", "Form Factor": "Smartphone" } } } } ``` -------------------------------- ### Product Offers API Response Example Source: https://docs.yepapi.com/amazon-api/product-offers This is an example of a successful response from the Product Offers API. It includes details about the product, pricing, availability, and seller information. ```json { "ok": true, "data": { "status": "OK", "request_id": "c9845825-48ba-4503-8890-ad17805df07c", "parameters": { "asin": "B07ZPKBL9V", "country": "US", "limit": 100, "page": 1 }, "data": { "asin": "B07ZPKBL9V", "product_title": "Apple iPhone 11, 64GB, PRODUCT RED - Unlocked (Renewed)", "product_price": "169.00", "product_original_price": "$174.64", "delivery_price": "FREE", "currency": "USD", "country": "US", "domain": "www.amazon.com", "product_byline": "Visit the Amazon Renewed Store", "product_star_rating": "4.2", "product_num_ratings": 59992, "product_url": "https://www.amazon.com/dp/B07ZPKBL9V", "product_num_offers": 33, "product_availability": "Only 16 left in stock - order soon.", "product_condition": "Refurbished - Excellent", "is_prime": false, "buy_boxes": [], "sales_volume": "200+ bought in past month" } } } ``` -------------------------------- ### Seller Profile Response Example Source: https://docs.yepapi.com/amazon-api/seller This is an example of a successful response (200 OK) when requesting a seller's profile. It includes metadata about the request and the seller's detailed data. ```json { "ok": true, "data": { "status": "OK", "request_id": "01a5448d-6d26-4beb-a352-ff8eb99205f9", "parameters": { "seller_id": "A02211013Q5HP3OMSZC7W", "country": "US" }, "data": { "seller_id": "A02211013Q5HP3OMSZC7W", "country": "US", "domain": "www.amazon.com", "name": "MemoryWhiz", "seller_link": "https://www.amazon.com/sp?seller=A02211013Q5HP3OMSZC7W", "store_link": "https://www.amazon.com/s?ie=UTF8&marketplaceID=ATVPDKIKX0DER&me=A02211013Q5HP3OMSZC7W", "logo": "https://m.media-amazon.com/images/I/01inXJbpK2L.gif", "phone": "909-610-9170", "business_name": "Alast Corporation", "business_address": "20651 GOLDEN SPRINGS DRIVE Suite 111 Walnut CA 91789 US", "rating": 4.9, "ratings_total": 52177, "ratings_total_percentage": 99, "review_summary": { "thirty_days": { "positive_percent": 94, "neutral_percent": 4, "negative_percent": 2, "count": 45 }, "ninety_days": { "positive_percent": 97, "neutral_percent": 1, "negative_percent": 2, "count": 183 }, "twelve_months": { "positive_percent": 100, "neutral_percent": 0, "negative_percent": 0, "count": 1107 }, "lifetime": { "positive_percent": 99, "neutral_percent": 0, "negative_percent": 0, "count": 52177 } } } } } ``` -------------------------------- ### Content Summary API Response Example Source: https://docs.yepapi.com/seo-content/summary This is an example of a successful response from the Content Summary API, showing the structure of the returned data. ```json { "ok": true, "data": { "avgContentQualityScore": 0.0, "keyword": "nextjs seo", "sentimentDistribution": { "negative": 0, "neutral": 0, "positive": 0 }, "totalCount": 15607 } } ``` -------------------------------- ### WHOIS API Response Example Source: https://docs.yepapi.com/seo-domain/domain-whois This is an example of a successful response from the WHOIS API. It includes the domain, registrar, creation/update/expiry dates, and nameservers. ```json { "ok": true, "data": { "domain": "youtube.com", "registrar": "MarkMonitor Inc.", "createdDate": "", "updatedDate": "", "expiryDate": "", "nameServers": [] } } ``` -------------------------------- ### Domain Availability API Response Example Source: https://docs.yepapi.com/seo-domain/domain-available This is an example of a successful response from the Domain Availability API, showing the status and pricing for checked domains. ```json { "ok": true, "data": { "domains": [ { "domain": "example.com", "available": false, "isPremium": false, "premiumRegistrationPrice": 0, "premiumRenewalPrice": 0, "icannFee": 0, "eapFee": 0 }, { "domain": "some-unique-name-xyz-123.com", "available": true, "isPremium": false, "premiumRegistrationPrice": 0, "premiumRenewalPrice": 0, "icannFee": 0.18, "eapFee": 0 }, { "domain": "cars.ai", "available": true, "isPremium": true, "premiumRegistrationPrice": 2450, "premiumRenewalPrice": 95, "icannFee": 0, "eapFee": 0 } ] } } ``` -------------------------------- ### Streaming Response Example for Kimi K2.5 Source: https://docs.yepapi.com/ai-models/moonshotai/kimi-k2.5 This example shows the format of Server-Sent Events (SSE) when streaming is enabled for the Kimi K2.5 model. Each chunk contains a 'delta' object. ```text data: {"delta":{"content":"B-trees"},"model":"moonshotai/kimi-k2.5","index":0} data: [DONE] ``` -------------------------------- ### Media ID Lookup API Response Example Source: https://docs.yepapi.com/instagram-api/media-id This is an example of a successful response from the media-id endpoint, showing the input shortcode and the corresponding numeric media IDs. ```json { "ok": true, "data": { "shortcode": "C5xAbCdEfGh", "media_id": "3456789012345678901", "media_id_with_owner": "3456789012345678901_787132" } } ``` -------------------------------- ### Prompt Discovery API Response Example Source: https://docs.yepapi.com/ai-visibility/prompt-discovery This is an example of a successful response from the Prompt Discovery API, showing discovered prompts, AI engines, mention details, and overall statistics. ```json { "ok": true, "data": { "brand": "devkit", "prompts": [ { "prompt": "What are the best SEO APIs for developers?", "engines": ["chatgpt", "perplexity"], "brandMentioned": true, "position": 3, "context": "YepAPI is mentioned as a unified API wrapper..." }, { "prompt": "best api for keyword research", "engines": ["perplexity", "gemini"], "brandMentioned": true, "position": 5, "context": "For a simpler approach, YepAPI provides keyword data..." } ], "totalPrompts": 24, "mentionRate": 0.42 } } ``` -------------------------------- ### Streaming Response Example Source: https://docs.yepapi.com/ai-models/nvidia/nemotron-3-super This example shows the format of Server-Sent Events (SSE) when the 'stream' parameter is set to true. Each chunk contains a 'delta' object with content. ```text data: {"delta":{"content":"GPU"},"model":"nvidia/nemotron-3-super-120b-a12b:free","index":0} data: [DONE] ``` -------------------------------- ### YouTube Suggest API Response Example Source: https://docs.yepapi.com/youtube-api/suggest This is an example of a successful response from the YouTube Suggest API, showing the 'ok' status and the 'data' object containing the original query and an array of suggestions. ```json { "ok": true, "data": { "query": "nextjs", "suggestions": [ "next js", "next js 16", "next js conf", "next js project", "nextjs auth", "next js supabase", "next js 15", "next js app", "next js prisma", "next js cve", "nextjs blog", "next js ai", "next js vs react", "next js conf 2025" ] } } ``` -------------------------------- ### YouTube Channel Home API Response Example Source: https://docs.yepapi.com/youtube-api/channel This is an example of a successful response from the YouTube Channel Home API. It includes channel metadata and a structured list of homepage content. ```json { "ok": true, "data": { "meta": { "title": "Google for Developers", "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw", "channelHandle": "@GoogleDevelopers", "description": "Subscribe to join a community of creative developers and learn the latest in Google technology...", "subscriberCount": 2620000, "subscriberCountText": "2.62M", "videosCount": 6300, "videosCountText": "6.3K videos", "isFamilySafe": true, "isUnlisted": false, "tabs": ["Home", "Videos", "Shorts", "Live", "Courses", "Playlists", "Posts", "Search"], "avatar": [{ "url": "https://yt3.ggpht.com/...", "width": 48, "height": 48 }], "banner": [{ "url": "https://yt3.ggpht.com/...", "width": 1060, "height": 175 }] }, "data": [ { "type": "player", "videoId": "bc5X2iVyJc0", "title": "Add Gemini Live agents to your video conferencing with Fishjam", "description": "Adrian from Software Mansion walks through how to connect...", "viewCount": "3174", "publishedTimeText": "5 days ago" }, { "type": "video_listing", "title": "AI Tools & Innovations", "data": [ { "type": "video", "videoId": "zEMXCoqJodE", "title": "AI coding with Gemini CLI", "lengthText": "38:29", "viewCount": "40532" } ] } ] } } ``` -------------------------------- ### Streaming Response Example Source: https://docs.yepapi.com/ai-models/stepfun/step-3.5-flash This example shows the format of Server-Sent Events (SSE) when streaming is enabled for the Step 3.5 Flash model. Each chunk contains a delta object. ```text data: {"delta":{"content":"Here's"},"model":"stepfun/step-3.5-flash","index":0} data: [DONE] ``` -------------------------------- ### YouTube Channel Shorts API Response Example Source: https://docs.yepapi.com/youtube-api/channel-shorts This is an example of a successful response (200 OK) from the channel-shorts endpoint, showing the structure of metadata, shorts data, and the continuation token for pagination. ```json { "ok": true, "data": { "meta": { "channelId": "UCAuUUnT6oDeKwE6v1NGQxug" }, "data": [ { "type": "shorts", "videoId": "abc123", "title": "Quick Tip: Public Speaking", "viewCountText": "5M views", "thumbnail": [ { "url": "https://i.ytimg.com/vi/abc123/hqdefault.jpg", "width": 168, "height": 94 } ] } ], "continuation": "4qmF..." } } ``` -------------------------------- ### Using with fetch Source: https://docs.yepapi.com/getting-started/authentication Example of how to use your API key with the `fetch` API in JavaScript. ```APIDOC ## Using with fetch Example of how to use your API key with the `fetch` API in JavaScript. ### Request Example ```javascript const res = await fetch('https://api.yepapi.com/v1/seo/keywords', { method: 'POST', headers: { 'x-api-key': process.env.YEP_API_KEY!, 'Content-Type': 'application/json', }, body: JSON.stringify({ keywords: ['nextjs seo'] }), }); const { ok, data, error } = await res.json(); ``` ``` -------------------------------- ### Get Seller Profile (Python) Source: https://docs.yepapi.com/amazon-api/seller This Python script uses the requests library to get a seller's profile. Replace 'YOUR_API_KEY' with your key and ensure the requests library is installed. ```python import requests res = requests.post( "https://api.yepapi.com/v1/amazon/seller", headers={"x-api-key": "YOUR_API_KEY"}, json={"seller_id": "A02211013Q5HP3OMSZC7W"}, ) print(res.json()["data"]) ``` -------------------------------- ### OpenAPI Path Item Object Source: https://docs.yepapi.com/openapi.json Defines an individual path and its associated operations. This example shows a path with a GET operation and a 200 response for seller reviews. ```yaml }, "responses": { "200": { "description": "Seller reviews" } } } } } } ``` ``` -------------------------------- ### Get Product Details using cURL Source: https://docs.yepapi.com/amazon-api/product This cURL command demonstrates how to request product details from the API. Replace 'YOUR_API_KEY' with your actual API key. ```bash curl -X POST https://api.yepapi.com/v1/amazon/product \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"asin": "B07ZPKBL9V", "country": "US"}' ``` -------------------------------- ### Get YouTube Transcript Source: https://docs.yepapi.com/youtube-api/transcript This endpoint retrieves the full transcript of a YouTube video. You can optionally specify a language code for the transcript. The response includes segment start and end times, and the text content. ```APIDOC ## POST /v1/youtube/transcript ### Description Get the full video transcript with timestamps. ### Method POST ### Endpoint /v1/youtube/transcript ### Parameters #### Request Body - **id** (string) - Required - YouTube video ID - **lang** (string) - Optional - Language code. Defaults to `en`. ### Request Example ```json { "id": "dQw4w9WgXcQ" } ``` ### Response #### Success Response (200) - **ok** (boolean) - Whether the request succeeded - **data.id** (string) - YouTube video identifier - **data.selected** (object) - Currently selected transcript language - **data.selected.languageCode** (string) - Language code of the selected transcript (e.g. `en`) - **data.selected.title** (string) - Display name of the selected language (e.g. `English (auto-generated)`) - **data.languageMenu** (object) - Default alternative language option - **data.languageMenu.languageCode** (string) - Language code of the alternative (e.g. `es-419`) - **data.languageMenu.title** (string) - Display name of the alternative language - **data.transcript** (object[]) - Array of transcript segments - **data.transcript[].startMs** (string) - Segment start time in milliseconds - **data.transcript[].endMs** (string) - Segment end time in milliseconds - **data.transcript[].startTime** (string) - Human-readable start time (e.g. `0:18`) - **data.transcript[].text** (string) - Transcript text content for this segment #### Response Example ```json { "ok": true, "data": { "id": "dQw4w9WgXcQ", "selected": { "languageCode": "en", "title": "English (auto-generated)" }, "languageMenu": { "languageCode": "es-419", "title": "Spanish (Latin America)" }, "transcript": [ { "startMs": "320", "endMs": "14580", "startTime": "0:00", "text": "[Music]" }, { "startMs": "18800", "endMs": "25960", "startTime": "0:18", "text": "We're no strangers to" }, { "startMs": "21800", "endMs": "29119", "startTime": "0:21", "text": "love. You know the rules and so do" } ] } } ``` ``` -------------------------------- ### Get YouTube Shorts Info Source: https://docs.yepapi.com/youtube-api/shorts-info Use this endpoint to get details for a YouTube Short by providing its ID. ```APIDOC ## POST /v1/youtube/shorts-info ### Description Get details for a YouTube Short. ### Method POST ### Endpoint /v1/youtube/shorts-info ### Parameters #### Request Body - **id** (string) - Required - YouTube video/short ID - **geo** (string) - Optional - Country code for geo-specific results - **lang** (string) - Optional - Language code ### Request Example ```json { "id": "abc123" } ``` ### Response #### Success Response (200) - **ok** (boolean) - Whether the request succeeded - **data.id** (string) - YouTube Short/video identifier - **data.title** (string) - Short title as displayed on YouTube - **data.channelTitle** (string) - Name of the channel that uploaded the Short - **data.channelId** (string) - Unique identifier for the channel - **data.viewCount** (string) - Total view count as a numeric string - **data.likeCount** (number) - Total number of likes - **data.description** (string) - Short description text - **data.publishDate** (string) - Publish date in `YYYY-MM-DD` format #### Response Example ```json { "ok": true, "data": { "id": "abc123", "title": "Funny Short", "channelTitle": "Creator", "channelId": "UCxyz...", "viewCount": "5000000", "likeCount": 250000, "description": "Wait till the end!", "publishDate": "2026-03-15" } } ``` ``` -------------------------------- ### Initialize OpenAI SDK with YepAPI Base URL Source: https://docs.yepapi.com/ai-models/chat-completions Configure the OpenAI SDK to use the YepAPI endpoint by setting the `baseURL`. This allows you to leverage any OpenAI-compatible client with YepAPI's models. ```javascript import OpenAI from "openai"; const client = new OpenAI({ apiKey: "YOUR_API_KEY", baseURL: "https://api.yepapi.com/v1/ai", }); const response = await client.chat.completions.create({ model: "anthropic/claude-sonnet-4.6", messages: [{ role: "user", content: "Explain quantum computing in one paragraph." }], }); console.log(response.choices[0].message.content); ``` -------------------------------- ### Get Music Info Source: https://docs.yepapi.com/tiktok-api/music Use this endpoint to get details about a specific TikTok sound or music track by providing its URL. ```APIDOC ## POST /v1/tiktok/music ### Description Get details about a TikTok sound/music track. ### Method POST ### Endpoint /v1/tiktok/music ### Parameters #### Request Body - **url** (string) - Required - Full TikTok music/sound URL ### Request Example ```json { "url": "https://www.tiktok.com/music/original-sound-7123456789012345678" } ``` ### Response #### Success Response (200) - **ok** (boolean) - Whether the request succeeded - **data.music_id** (string) - Unique music/sound identifier - **data.title** (string) - Sound title - **data.author** (string) - Sound author or artist name - **data.album** (string) - Album name (if applicable) - **data.duration** (number) - Sound duration in seconds - **data.is_original** (boolean) - Whether this is an original sound (not a licensed track) - **data.cover** (string) - Sound cover image URL - **data.play_url** (string) - Audio playback URL - **data.video_count** (number) - Number of videos using this sound #### Response Example ```json { "ok": true, "data": { "music_id": "7123456789012345678", "title": "original sound", "author": "chefmaria", "album": "", "duration": 45, "is_original": true, "cover": "https://p16-sign.tiktokcdn.com/வுகளில்=...", "play_url": "https://sf16-ies-music.tiktokcdn.com/வுகளில்=...", "video_count": 12500 } } ``` ``` -------------------------------- ### List Available Models Source: https://docs.yepapi.com/ai-models/chat-completions Fetches a list of all available AI models, including their pricing, context window limits, and capabilities. This endpoint is free and does not require authentication. ```bash curl https://api.yepapi.com/v1/ai/models ``` -------------------------------- ### Amazon Search API Response Example Source: https://docs.yepapi.com/amazon-api/search This is an example of a successful response from the Amazon Search API, detailing product information. ```json { "ok": true, "data": { "status": "OK", "request_id": "15a2016d-c6a2-4b15-ab0b-7764d1cd25c1", "parameters": { "query": "Phone", "country": "US", "sort_by": "RELEVANCE", "page": 1 }, "data": { "total_products": 135961, "country": "US", "domain": "www.amazon.com", "products": [ { "asin": "B0DM1S54MZ", "product_title": "Samsung Galaxy A16 4G LTE (128GB + 4GB) International Model, Unlocked, 6.7", 50MP Triple Camera, Black", "product_price": "$133.47", "product_original_price": null, "currency": "USD", "product_star_rating": "4.4", "product_num_ratings": 4084, "product_url": "https://www.amazon.com/dp/B0DM1S54MZ", "product_photo": "https://m.media-amazon.com/images/I/61Lp1UcxeLL._AC_UY654_QL65_.jpg", "product_num_offers": 12, "product_minimum_offer_price": "$126.80", "is_best_seller": false, "is_amazon_choice": true, "is_prime": false, "sales_volume": "4K+ bought in past month", "has_variations": true } ] } } } ``` -------------------------------- ### Get Product Offers (Python) Source: https://docs.yepapi.com/amazon-api/product-offers This Python script uses the 'requests' library to fetch product offers. It sends a POST request with the API key in the headers and the ASIN and limit in the JSON payload. The 'data' part of the JSON response is then printed. ```python import requests res = requests.post( "https://api.yepapi.com/v1/amazon/product-offers", headers={"x-api-key": "YOUR_API_KEY"}, json={"asin": "B07ZPKBL9V", "limit": 100}, ) print(res.json()["data"]) ``` -------------------------------- ### Fetch Products by Category (cURL) Source: https://docs.yepapi.com/amazon-api/products-by-category This cURL command demonstrates how to fetch products by category using a POST request. Remember to substitute 'YOUR_API_KEY' with your valid API key. ```curl curl -X POST https://api.yepapi.com/v1/amazon/products-by-category \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"category_id": "2478868012", "country": "US"}' ``` -------------------------------- ### Screenshot API Response Example Source: https://docs.yepapi.com/web-scraping/screenshot This is an example of a successful response from the Screenshot API. The `data.image` field contains the base64-encoded PNG data of the screenshot. ```json { "ok": true, "data": { "url": "https://example.com", "image": "iVBORw0KGgoAAAANSUhEUgAA...(base64 PNG)", "width": 1920, "height": 1080 } } ``` -------------------------------- ### Google Datasets API Response Example Source: https://docs.yepapi.com/serp-api/google-datasets This is an example of a successful response from the Google Datasets API, showing the structure of the returned dataset information. ```json { "ok": true, "data": { "query": "global temperature data", "totalResults": 119, "results": [ { "position": 1, "type": "dataset", "title": "Global Temperature Time Series", "url": "", "description": "", "domain": "" }, { "position": 2, "type": "dataset", "title": "Global land and ocean temperature anomalies 1880-2024", "url": "", "description": "", "domain": "" }, { "position": 3, "type": "dataset", "title": "Global Temperatures by Country", "url": "", "description": "", "domain": "" } ] } } ``` -------------------------------- ### Fetch Amazon Best Sellers using cURL Source: https://docs.yepapi.com/amazon-api/best-sellers This command-line example shows how to request best-selling items. Replace 'YOUR_API_KEY' with your actual API key. ```bash curl -X POST https://api.yepapi.com/v1/amazon/best-sellers \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"category": "software", "type": "BEST_SELLERS"}' ``` -------------------------------- ### Get Product Offers (cURL) Source: https://docs.yepapi.com/amazon-api/product-offers This cURL command demonstrates how to retrieve product offers using a POST request. It includes the necessary headers for authentication and content type, along with the request body specifying the ASIN and limit. ```curl curl -X POST https://api.yepapi.com/v1/amazon/product-offers \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"asin": "B07ZPKBL9V", "limit": 100}' ``` -------------------------------- ### Discover Prompts for Brand Appearance (cURL) Source: https://docs.yepapi.com/ai-visibility/prompt-discovery This cURL command demonstrates how to make a POST request to the Prompt Discovery API. Ensure you replace 'YOUR_API_KEY' with your actual API key. ```bash curl -X POST https://api.yepapi.com/v1/seo/ai-visibility/prompts \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"brand": "devkit", "category": "developer tools"}' ``` -------------------------------- ### Amazon Deals API Response Example Source: https://docs.yepapi.com/amazon-api/deals This is an example of a successful response from the Amazon Deals API, showing the structure of the returned deal data. ```json { "ok": true, "data": { "status": "OK", "request_id": "01ad1c29-5bf1-4f80-b321-009f1a64fa4e", "parameters": { "country": "US", "price_range": "ALL", "discount_range": "ALL" }, "data": { "deals": [ { "deal_id": "64fc3cf8", "deal_type": "BEST_DEAL", "deal_title": "Ring Battery Doorbell, Head-to-Toe Video, Live View with Two-Way Talk", "deal_photo": "https://m.media-amazon.com/images/I/51IswCEoJXL.jpg", "deal_state": "AVAILABLE", "deal_url": "https://www.amazon.com/Ring-Battery-Doorbell/dp/B0BZWRSRWV", "canonical_deal_url": "https://www.amazon.com/deal/64fc3cf8", "deal_starts_at": null, "deal_ends_at": null, "deal_price": { "amount": 59.99, "currency": "USD" }, "list_price": { "amount": 99.99, "currency": "USD" }, "savings_percentage": 40, "savings_amount": { "amount": 40, "currency": "USD" }, "deal_badge": "40% off", "type": "MULTI_ASIN", "product_asin": "B0BZWRSRWV" } ] } } } ``` -------------------------------- ### Amazon Categories API Response Example Source: https://docs.yepapi.com/amazon-api/categories This is an example of a successful response from the Amazon Categories API, showing the structure of the returned category data. ```json { "ok": true, "data": { "status": "OK", "request_id": "e2a81e08-6840-48e0-b793-8490cd956386", "parameters": { "country": "US" }, "data": [ { "name": "All Departments", "id": "aps" }, { "name": "Alexa Skills", "id": "alexa-skills" }, { "name": "Amazon Devices", "id": "amazon-devices" }, { "name": "Appliances", "id": "appliances" }, { "name": "Baby", "id": "baby-products" }, { "name": "Beauty & Personal Care", "id": "beauty" }, { "name": "Books", "id": "stripbooks" }, { "name": "Cell Phones & Accessories", "id": "mobile" }, { "name": "Clothing, Shoes & Jewelry", "id": "fashion" }, { "name": "Electronics", "id": "electronics" }, { "name": "Home & Kitchen", "id": "garden" }, { "name": "Software", "id": "software" } ] } } ``` -------------------------------- ### Step 3.5 Flash API Response Example Source: https://docs.yepapi.com/ai-models/stepfun/step-3.5-flash This is an example of a successful JSON response from the Step 3.5 Flash model, including the model used, the assistant's message, and token usage. ```json { "ok": true, "data": { "model": "stepfun/step-3.5-flash", "message": { "role": "assistant", "content": "Here's a regex for valid IPv4 addresses: ^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$ — each octet matches values from 0 to 255." }, "usage": { "promptTokens": 15, "completionTokens": 86, "totalTokens": 101 } } } ``` -------------------------------- ### Claude Sonnet 4.6 API Response Example Source: https://docs.yepapi.com/ai-models/anthropic/claude-sonnet-4.6 This is an example of a successful JSON response from the Claude Sonnet 4.6 chat completion endpoint. ```json { "ok": true, "data": { "model": "anthropic/claude-sonnet-4.6", "message": { "role": "assistant", "content": "import time import functools def retry(max_retries=3, base_delay=1): def decorator(func): @functools.wraps(func) def wrapper(*args, **kwargs): for attempt in range(max_retries): try: return func(*args, **kwargs) except Exception as e: if attempt == max_retries - 1: raise time.sleep(base_delay * 2 ** attempt) return wrapper return decorator" }, "usage": { "promptTokens": 22, "completionTokens": 187, "totalTokens": 209 } } } ``` -------------------------------- ### API Key Authentication Example Source: https://docs.yepapi.com/getting-started/authentication All requests to YepAPI require an API key passed via the `x-api-key` header. ```APIDOC ## API Key Authentication Example All requests to YepAPI require an API key passed via the `x-api-key` header. ### Request Example ```bash curl https://api.yepapi.com/v1/seo/keywords \ -H "x-api-key: yep_sk_abc123..." ``` ``` -------------------------------- ### Configure Cursor with YepAPI Rules Source: https://docs.yepapi.com/ai-agents/cursor-claude Add this configuration to your project's `.cursorrules` file to guide Cursor when using YepAPI. It specifies the API reference URL and authentication method. ```plaintext When using YepAPI, reference https://docs.yepapi.com/llms.txt for the API specification. All requests use x-api-key header auth. Check the `ok` boolean before accessing `data`. ``` -------------------------------- ### Get YouTube Shorts Feed Source: https://docs.yepapi.com/youtube-api/shorts Fetches a feed of YouTube Shorts. Use the `continuation` token from a previous response to get the next batch of shorts. ```APIDOC ## POST /v1/youtube/shorts ### Description Retrieves a feed of YouTube Shorts for infinite scrolling. ### Method POST ### Endpoint https://api.yepapi.com/v1/youtube/shorts ### Parameters #### Request Body - **params** (string) - Required - Continuation token from previous response ### Request Example ```json { "params": "continuation_token_here" } ``` ### Response #### Success Response (200) - **ok** (boolean) - Whether the request succeeded - **data.data** (object[]) - Array of Shorts objects - **data[].type** (string) - Content type (typically `shorts`) - **data[].videoId** (string) - Unique YouTube video/Short identifier - **data[].title** (string) - Short title as displayed on YouTube - **data[].viewCountText** (string) - Human-readable view count (e.g. `1.2M views`) - **data[].thumbnail** (object[]) - Thumbnail images at various resolutions - **data[].thumbnail[].url** (string) - URL of the thumbnail image - **data[].thumbnail[].width** (integer) - Width of the thumbnail image - **data[].thumbnail[].height** (integer) - Height of the thumbnail image - **data.continuation** (string) - Token to continue fetching the next batch of Shorts #### Response Example ```json { "ok": true, "data": { "data": [ { "type": "shorts", "videoId": "abc123", "title": "Wait for the ending...", "viewCountText": "1.2M views", "thumbnail": [ { "url": "https://i.ytimg.com/vi/abc123/hqdefault.jpg", "width": 168, "height": 94 } ] } ], "continuation": "4qmF..." } } ``` ``` -------------------------------- ### YouTube Subtitles API Response Example Source: https://docs.yepapi.com/youtube-api/subtitles This is an example of a successful response from the YouTube Subtitles API, detailing available subtitle tracks and translation languages. ```json { "ok": true, "data": { "format": "srv1", "subtitles": [ { "languageName": "English", "languageCode": "en", "isTranslatable": true, "url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&lang=en&fmt=srv1" }, { "languageName": "English (auto-generated)", "languageCode": "en", "isTranslatable": true, "url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&kind=asr&lang=en&fmt=srv1" }, { "languageName": "Japanese", "languageCode": "ja", "isTranslatable": true, "url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&lang=ja&fmt=srv1" } ], "translationLanguages": [ { "languageCode": "af", "languageName": "Afrikaans" }, { "languageCode": "sq", "languageName": "Albanian" } ] } } ``` -------------------------------- ### Qwen 3 Coder Next Response Example Source: https://docs.yepapi.com/ai-models/qwen/qwen3-coder-next This is an example of a successful JSON response from the Qwen 3 Coder Next model. It includes the model used, the assistant's message content, and token usage details. ```json { "ok": true, "data": { "model": "qwen/qwen3-coder-next", "message": { "role": "assistant", "content": "package main\n\nimport (\n\t"context"\n\t"net/http"\n\t"os"\n\t"os/signal"\n\t"syscall"\n\t"time"\n)\n\nfunc main() {\n\tmux := http.NewServeMux()\n\tmux.HandleFunc(\"/health\", func(w http.ResponseWriter, r *http.Request) {\n\t\tw.WriteHeader(http.StatusOK)\n\t\tw.Write([]byte(`{\"status\":\"ok\"}`))\n\t})\n\t// ... graceful shutdown with signal handling\n}" }, "usage": { "promptTokens": 18, "completionTokens": 112, "totalTokens": 130 } } } ``` -------------------------------- ### YouTube Screenshot API Response Example Source: https://docs.yepapi.com/youtube-api/screenshot This is an example of a successful response from the YouTube Screenshot API, indicating the screenshot has been processed and providing a link to the image. ```json { "ok": true, "data": { "link": ["https://screenshot-url.jpg"], "status": "done" } } ``` -------------------------------- ### Configure Claude Desktop for MCP Server Source: https://docs.yepapi.com/ai-agents/mcp-server Add this configuration to your Claude Desktop settings file to enable the YepAPI MCP server. Ensure you replace 'yep_sk_your_key_here' with your actual API key. Restart Claude Desktop after applying the changes. ```json { "mcpServers": { "yepapi": { "command": "npx", "args": ["-y", "@yepapi/mcp"], "env": { "YEP_API_KEY": "yep_sk_your_key_here" } } } } ``` -------------------------------- ### Sonar Model Response Example Source: https://docs.yepapi.com/ai-models/perplexity/sonar This is an example of a successful JSON response from the Sonar model, including the assistant's message and token usage details. ```json { "ok": true, "data": { "model": "perplexity/sonar", "message": { "role": "assistant", "content": "As of early 2025, the top AI companies by market cap are: Apple (~$3.4T), Microsoft (~$3.1T), NVIDIA (~$2.9T), Alphabet (~$2.1T), and Amazon (~$2.0T) [1][2]." }, "usage": { "promptTokens": 19, "completionTokens": 118, "totalTokens": 137 } } } ``` -------------------------------- ### Fetch Keyword Data with YepAPI (Node.js) Source: https://docs.yepapi.com/ai-agents/cursor-claude Example of making a POST request to the YepAPI `/v1/seo/keywords` endpoint using Node.js `fetch`. Ensure you have your `YEP_API_KEY` set in your environment variables. Always check the `ok` status before processing the `data`. ```javascript const res = await fetch('https://api.yepapi.com/v1/seo/keywords', { method: 'POST', headers: { 'x-api-key': process.env.YEP_API_KEY!, 'Content-Type': 'application/json', }, body: JSON.stringify({ keywords: ['your keyword'] }), }); const { ok, data, error } = await res.json(); ```