Find visually similar or matching products in Temu's public marketplace from one product image. Use the returned product, sales, pricing, review, inventory, shop, and category fields for visual competitor discovery and product research.
Core Concepts
- The search input is one image URL. The gateway accepts a LinkFox OSS URL, not an arbitrary external image URL.
- Upload local images with
scripts/upload_image.py. For an external image URL, download it locally first, then upload it through the same helper. - The endpoint returns a non-paginated
itemslist plus rendering metadata incolumns. Result count depends on the source image: live tests have returned both 100 rows and a successful empty result, so never assume a fixed or non-zero count. - Rows are live third-party marketplace data. Fields may be absent, null, duplicated by
goodsId, garbled, or internally inconsistent; preserve the source values and disclose material quality issues.
Data Fields
| Group | Fields |
|---|---|
| Identity | goodsId, mallId, goodsName, goodsNameCn, goodsNameEn, brand, thumbnail |
| Category | catIds, catItems |
| Demand | sold, mallSold, daySold, weekSold, monthSold, corresponding *SoldRate fields |
| Revenue | sales, daySales, weekSales, monthSales, corresponding *SalesRate fields |
| Price and supply | minPrice, maxPrice, supplyPrice, minSupplyPrice, medianSupplyPrice, maxSupplyPrice |
| Quality and stock | goodsScore, reviewNum, quantity, sku |
| Status and timing | hostingMode, status, isAd, isCustom, isPresale, similarNum, onSaleTime, mallOpenTime, createTime, updateTime |
Parameter Guide
| Parameter | Required | Description |
|---|---|---|
imageUrl |
Yes | LinkFox OSS image URL returned by scripts/upload_image.py; maximum 2048 characters; an arbitrary external URL is rejected |
contentType |
No | Image MIME type, maximum 100 characters; only image/jpeg, image/png, image/gif, image/webp, or image/bmp; when supplied, it must match both the OSS response type and the actual image bytes |
Do not add pagination, sorting, filtering, region, Base64, or keyword fields: they are not part of this endpoint's verified request contract. The downloaded image must be JPEG, PNG, GIF, WebP, or BMP and no larger than 10 MB.
How to call
- API endpoint:
POST /geekbi/temu/goodsImageSearch(for full parameters/response/error codes seereferences/api.md) - Python script:
python scripts/geekbi_temu_goods_image_search.py '<JSON 参数>' [--inline] - Cost constraints: image search consumes 150 compute units per call; the same endpoint with the same parameter combination uses a 24h local cache, and the same session by default calls only once.
--inlinedoes not bypass the cache;--no-cacheskips cache reads and writes and forces a real request, which may consume another 150 compute units. Failures, empty results, or transient errors must not be automatically retried, nor must different images be automatically tried in succession; when another paid search is needed, first explain to the user that additional consumption will occur.
Output strategy (default script behavior):
- Alwayswrite the full response to
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-geekbi-temu-search-by-image-<timestamp>.json;<cwd>is the current working directory when the script runs,<session>is taken from the environment variableSESSION_ID, and is automatically generated when not set. If the current directory is not writable, report an error directly; do not fall back to the user directory or the system temporary directory. - Response body ≤ 8 KB: after writing to disk, print the full JSON to stdout
- Response body > 8 KB: after writing to disk, stdout outputs only a summary (top-level status fields, common business counts, ignoring
columnsthe length of the largest business list + the first 3 samples) - Add
--inlineto force full printing to stdout (also written to disk)
Data reading suggestions: first look at the summary to judge whether it is sufficient; when specific fields are needed, prefer to use jqorConvertFrom-Json to extract on demand from the saved json file, avoiding putting the entire JSON into the context.
Resolve authentication and compute unit issues
When the following abnormal situations occur, use references/onboarding.md to guide resolution:
Abnormal situation
- API Key not configured: the environment variable is not configured
LINKFOX_AGENT_API_KEYor the compatible keyLINKFOXAGENT_API_KEY。 - Response 401 or 402 status code。
- Response indicates insufficient compute units or balance: the message contains “insufficient compute unit balance / insufficient billing / insufficient balance / quota exceeded / insufficient balance / package expired / recharge required / please recharge” or similar meaning.
Local Image Upload
This endpoint requires an image hosted on LinkFox OSS. When the user provides a local file or an external image URL, obtain a local image file and run:
python scripts/upload_image.py /path/to/product.jpg
The helper requests a presigned PUT URL from ${LINKFOX_TOOL_GATEWAY}/oss/file/presignedPut, uploads a JPG/JPEG, PNG, GIF, WebP, or BMP image to that URL, removes the private query string, and prints JSON containing url and contentType. It uses only the Python standard library. Never print the presigned query string or the API key.
Usage Examples
# Upload once and capture the returned LinkFox OSS URL and MIME type
LINKFOX_UPLOAD_RESULT="$(python scripts/upload_image.py ./product.jpg)"
LINKFOX_OSS_URL="$(printf '%s' "${LINKFOX_UPLOAD_RESULT}" | jq -r '.url')"
LINKFOX_CONTENT_TYPE="$(printf '%s' "${LINKFOX_UPLOAD_RESULT}" | jq -r '.contentType')"
# Search Temu with exactly that URL and its MIME type
python scripts/geekbi_temu_goods_image_search.py "{\"imageUrl\":\"${LINKFOX_OSS_URL}\",\"contentType\":\"${LINKFOX_CONTENT_TYPE}\"}"
User requests include “use this image to find Temu identical products”, “find visually similar Temu competitors”, and “search Temu products by this image”.
Display Rules
- Present a compact table with image, title, product ID, price, total/monthly sales, rating, reviews, hosting mode, and update time when available.
- Display
thumbnailimages inline when the client supports images. - Treat
minPriceandmaxPriceas marketplace-local currency values; do not invent a currency when the response does not identify it. Supply-price fields are CNY only when the API reference explicitly says so. - Prefer
goodsNameEnwhen Chinese title fields are visibly garbled. Do not invent a repaired translation. - Do not silently deduplicate repeated
goodsIdrows or repair contradictory values. Explain the issue, or group rows only when the user asks and state the grouping rule. - Keep
columnsas rendering metadata; do not include all column definitions unless the user asks for schema details.
Important Limitations
- Only a LinkFox OSS
imageUrlis accepted. Direct Amazon, CDN, data URI, Base64, or arbitrary public URLs are rejected. The image must be JPEG, PNG, GIF, WebP, or BMP and no larger than 10 MB. - The verified endpoint exposes no pagination, sorting, filtering, keyword, or marketplace-region controls.
- Search results are live public-market data and may contain missing, null, duplicate, stale, garbled, or inconsistent fields.
skumay be a JSON-encoded string rather than a parsed array; parse it only when needed and handle malformed content safely.- This skill does not fetch a separate product-detail/history record. Use
linkfox-geekbi-temu-productwhen the user explicitly needs details or history for a returnedgoodsId. - Do not automatically retry with another image after failure or an empty result; another search may incur cost.
User Expression & Scenario Quick Reference
Applicable -- visual discovery on Temu:
| User Says | Scenario |
|---|---|
| “Use this image to find Temu identical products” | Find matching products |
| “See whether there are visually similar competitors on Temu” | Visual competitor discovery |
| “Select products by image without keywords” | Image-led product research |
| “reverse image search this on Temu” | Visual product search |
Not applicable -- route elsewhere:
- Keyword, category, sales, or price-filtered Temu search without an image: use
linkfox-temu-product-query. - Temu product detail or 30-day history: use
linkfox-geekbi-temu-product. - Finding 1688 suppliers from an image: use
linkfox-1688-search-by-image. - Image recognition, prompt extraction, generation, or editing: use the relevant multimodal skill.
Boundary judgment: If the user provides an image and wants visually similar products specifically on Temu, use this skill. For text filters use linkfox-temu-product-query; for detailed records or history of known product IDs use linkfox-geekbi-temu-product.
Compute unit consumption rules
Image search consumes 150 compute units each time.
Users pay fees due to compute unit consumption. When other images need to be searched repeatedly, you must first explain that additional consumption will occur and let the user decide whether to continue.
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply:
- The functionality or purpose described in this skill does not match actual behavior
- The skill's results do not match the user's intent
- The user expresses dissatisfaction or praise about this skill
- Anything you believe could be improved
Call the feedback API as specified in references/api.md. Do not interrupt the user's flow.
For more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.