Skip to content

Latest commit

 

History

History
256 lines (203 loc) · 7.34 KB

File metadata and controls

256 lines (203 loc) · 7.34 KB

🧪 RapidAPI 1688-datahub Endpoint Test Results

Test Date: October 25, 2025
API Key: Configured ✅
Total Endpoints Tested: 11


WORKING ENDPOINTS (9 out of 11)

1. ✅ company_contact - SUCCESS!

  • Status: 200
  • Purpose: Get supplier/company contact information
  • Usage: Supplier verification, contact details
  • Example:
    /company_contact?storeId=b2b-22129686061252fa5d

2. ✅ item_detail - SUCCESS!

  • Status: 200
  • Purpose: Get detailed product information
  • Usage: Product detail pages
  • Returns: Full product data, images, prices, specifications
  • Example:
    /item_detail?itemId=630803790737
  • Data Returned: Title, images, prices, SKU, properties, description, videos, sales

3. ✅ package_detail - SUCCESS!

  • Status: 200
  • Purpose: Get package/shipping details
  • Usage: Shipping information for products
  • Example:
    /package_detail?itemId=630803790737&storeId=xingtaisp

4. ✅ item_detail_simple - SUCCESS!

  • Status: 200
  • Purpose: Get simplified product details (bulk)
  • Usage: Quick product info for multiple items
  • Supports: Multiple item IDs (comma-separated)
  • Example:
    /item_detail_simple?itemId=659554641832,652581240825

5. ✅ store_item_search - SUCCESS! 🎉

  • Status: 200
  • Purpose: Browse products from a specific store
  • Usage: THIS CAN REPLACE KEYWORD SEARCH!
  • Returns: Product listings with pagination
  • Data Structure: result.resultList[].item
  • Example:
    /store_item_search?page=1&pageSize=30&sort=default&storeId=b2b-221162226231463a5d
  • Sample Products Found:
    • ID: 854358383685 - Winter boots (211 sales)
    • ID: 837411947039 - Men's sports shoes (1,025 sales)
  • Total Results: 501 products, 51 pages available!

6. ✅ item_review - SUCCESS!

  • Status: 200
  • Purpose: Get product reviews
  • Usage: Display customer feedback
  • Example:
    /item_review?itemId=630803790737&sellerTitle=xingtaisp&page=1&pageSize=10

7. ✅ item_review_filter - SUCCESS!

  • Status: 200
  • Purpose: Get review filter options
  • Usage: Filter reviews by rating, type, etc.
  • Example:
    /item_review_filter?itemId=630803790737&sellerTitle=xingtaisp&source=item

8. ✅ item_search_image - SUCCESS!

  • Status: 200
  • Purpose: Search products by image URL
  • Usage: Image-based product search
  • Example:
    /item_search_image?imgUrl=https%3A%2F%2Fi.ebayimg.com%2Fimages%2Fg%2FOaUAAOSw7aJlfSCB%2Fs-l1600.jpg&page=1

9. ✅ item_search_image_2 - SUCCESS!

  • Status: 200
  • Purpose: Alternative image search endpoint
  • Usage: Image-based product search (v2)
  • Example:
    /item_search_image_2?imgUrl=https%3A%2F%2Fi.ebayimg.com%2Fimages%2Fg%2FOaUAAOSw7aJlfSCB%2Fs-l1600.jpg&page=1

FAILED ENDPOINTS (2 out of 11)

1. ❌ item_search - FAILED

  • Status: 205
  • Error: "request successfully formed, but no results were found"
  • Cause: Free tier limitation
  • Solution: Use store_item_search instead!

2. ❌ item_detail_2 - FAILED

  • Status: 5008
  • Error: Unknown error
  • Cause: API error or subscription limitation
  • Solution: Use item_detail instead (works perfectly)

🎯 RECOMMENDED IMPLEMENTATION STRATEGY

For Product Listings/Search:

Since item_search (keyword search) doesn't work on the free tier, use store_item_search instead:

Approach:

  1. Create a list of popular/verified store IDs
  2. Use store_item_search to browse products from these stores
  3. Implement store-based browsing instead of keyword search
  4. Each store has hundreds of products!

Example Stores to Use:

  • b2b-221162226231463a5d - 501 products (shoes/footwear)
  • b2b-22129686061252fa5d - (company_contact verified)
  • Find more stores by browsing 1688.com directly

For Product Details:

  • ✅ Use item_detail - works perfectly!
  • ✅ Returns full product data with images, prices, specs

For Image Search:

  • ✅ Use item_search_image or item_search_image_2
  • ✅ Both work on free tier!

For Reviews:

  • ✅ Use item_review for customer feedback
  • ✅ Use item_review_filter for filtering options

📊 Success Rate: 82% (9 out of 11 working)

What Works:

  • ✅ Product details (full and simple)
  • Store-based product browsing (great alternative!)
  • ✅ Image search (both versions)
  • ✅ Reviews and filters
  • ✅ Supplier/company info
  • ✅ Package/shipping details

What Doesn't Work:

  • ❌ Keyword search (item_search) - Free tier limitation
  • item_detail_2 - Use item_detail instead

💡 SOLUTION FOR YOUR APP

Instead of keyword search, implement:

  1. Store Browser - Featured Stores Page

    const featuredStores = [
      { id: 'b2b-221162226231463a5d', name: 'Footwear Store', products: 501 },
      { id: 'b2b-22129686061252fa5d', name: 'General Store', products: '...' },
      // Add more stores
    ];
  2. Browse by Store - Use store_item_search API

    // Fetch products from a store
    GET /store_item_search?storeId={id}&page=1&pageSize=30
  3. Product Details - Use item_detail API

    // Get full product info
    GET /item_detail?itemId={productId}
  4. Image Search - Use item_search_image API

    // Search by image URL
    GET /item_search_image?imgUrl={url}&page=1

🚀 NEXT STEPS

  1. Update /api/products route to use store_item_search
  2. Create a store directory with popular store IDs
  3. Implement store-based browsing UI
  4. Keep product detail pages (already working!)
  5. Add image search feature (API works!)

📝 Sample Implementation

Store-Based Product Listing:

// /api/products/route.ts
export async function GET(request: NextRequest) {
  const storeId = request.nextUrl.searchParams.get('storeId') || 'b2b-221162226231463a5d';
  const page = request.nextUrl.searchParams.get('page') || '1';
  
  const response = await fetch(
    `https://1688-datahub.p.rapidapi.com/store_item_search?storeId=${storeId}&page=${page}&pageSize=20`,
    {
      headers: {
        'x-rapidapi-host': '1688-datahub.p.rapidapi.com',
        'x-rapidapi-key': process.env.RAPIDAPI_KEY!,
      }
    }
  );
  
  const data = await response.json();
  const products = data.result.resultList.map(item => item.item);
  
  return NextResponse.json({ products, total: data.result.base.totalResults });
}

CONCLUSION

Your RapidAPI subscription works great!

  • 9 out of 11 endpoints working (82% success rate)
  • Product browsing is possible via store_item_search
  • Image search works!
  • Product details work perfectly!
  • Reviews and supplier info work!

The only limitation is keyword search, but we can work around it by:

  1. Using store-based browsing (works great!)
  2. Using image search (works!)
  3. Building a store directory

Your app can be fully functional with real 1688.com data! 🎉


Ready to implement the store-based approach? Let me know and I'll update the code!