This guide will help you obtain API credentials to fetch real products from 1688.com instead of mock data.
- Visit: https://open.1688.com
- Click 注册 (Register) or 登录 (Login) if you have an Alibaba account
- Complete registration with:
- Company name
- Business license (required for full access)
- Contact information
- Valid email address
- Email verification
- Phone number verification
- Business verification (may take 1-3 business days)
Note: Individual accounts have limited access. Business accounts get full API access.
- Log in to https://open.1688.com
- Go to 应用管理 (Application Management)
- Click 创建应用 (Create Application)
Application Name: [Your App Name] (e.g., "My Sourcing Platform")
Application Type: Web Application
Website URL: http://localhost:3000 (for development)
Callback URL: http://localhost:3000/api/callback
Description: E-commerce platform for browsing 1688 products
- Submit application for review
- Approval usually takes 1-3 business days
- You'll receive notification via email
Once approved, you'll receive:
- App Key (应用Key / appkey)
- App Secret (应用密钥 / secret)
- Go to 应用管理 (Application Management)
- Click on your application
- View 基本信息 (Basic Information)
- Copy App Key and App Secret
Example:
App Key: 12345678
App Secret: 1a2b3c4d5e6f7g8h9i0j
Apply for these API permissions:
-
Product Search API (商品搜索)
- Method:
alibaba.cross.search - For searching products by keyword
- Method:
-
Product Details API (商品详情)
- Method:
alibaba.cross.detail - For getting detailed product information
- Method:
-
Product Images API (商品图片)
- Method:
alibaba.cross.image.query - For fetching product images
- Method:
-
Category API (类目接口)
- Method:
alibaba.category.get - For category listings
- Method:
- Go to API权限管理 (API Permission Management)
- Search for each API
- Click 申请权限 (Apply for Permission)
- Wait for approval (1-3 days per API)
In your project root (/Users/ridafakherlden/www/china/), create .env.local:
# 1688.com API Credentials
ALIBABA_APP_KEY=your_actual_app_key_here
ALIBABA_APP_SECRET=your_actual_app_secret_here
# API Configuration
ALIBABA_API_URL=https://gw.open.1688.com/openapi
NEXT_PUBLIC_SITE_URL=http://localhost:3000ALIBABA_APP_KEY=12345678
ALIBABA_APP_SECRET=1a2b3c4d5e6f7g8h9i0j# Stop current server (Ctrl+C)
npm run devVisit: http://localhost:3000/api/products
You should see:
- Real products from 1688.com
- Actual product images
- Real supplier information
- Authentic pricing and MOQ data
Monitor your terminal for:
✓ Successfully connected to 1688.com API
✓ Fetched 20 products from category: electronics
Endpoint: alibaba.cross.search
Parameters:
{
keyword: string, // Search term
page: number, // Page number (starts at 1)
pageSize: number, // Items per page (max 40)
categoryId: string, // Optional category filter
startPrice: number, // Optional min price
endPrice: number, // Optional max price
}Response:
{
result: {
total: number,
products: [
{
productId: string,
subject: string, // Title
price: number,
imageUrl: string,
supplierName: string,
moq: number,
// ... more fields
}
]
}
}Endpoint: alibaba.cross.detail
Parameters:
{
productId: string, // Product ID from search results
}Response:
{
result: {
productId: string,
subject: string,
description: string,
images: [string], // Array of image URLs
price: number,
priceRange: {
startQuantity: number,
endQuantity: number,
},
supplierInfo: {
name: string,
rating: number,
// ... more fields
}
}
}Error: Access token is invalid
Solution:
- Verify App Key and App Secret are correct
- Check if API permissions are approved
- Ensure account is business-verified
Error: No permission to call this API
Solution:
- Apply for specific API permissions
- Wait for approval (1-3 days)
- Check approval status in console
Error: API rate limit exceeded
Solution:
- Free tier: 100 requests/day
- Basic tier: 1000 requests/day
- Premium tier: 10000+ requests/day
- Upgrade your plan if needed
Error: Signature verification failed
Solution:
- Verify App Secret is correct
- Check timestamp is within 10 minutes
- Ensure parameters are sorted correctly
| Plan | Requests/Day | Requests/Second |
|---|---|---|
| Free | 100 | 1 |
| Basic | 1,000 | 10 |
| Standard | 10,000 | 50 |
| Premium | 100,000+ | 200+ |
If you can't get direct API access, consider these alternatives:
Third-party services that provide 1688.com data:
- APISpace - https://www.apispace.com
- RapidAPI - https://rapidapi.com (search "1688" or "Alibaba")
- APILayer - https://apilayer.com
Cons:
- Violates 1688.com Terms of Service
- Unreliable (page structure changes)
- IP blocking risk
- Legal issues
We don't recommend this approach.
- Registration: Free
- API Access: Free tier available
- Business Verification: May require business license
- Basic: ~¥500/month (higher rate limits)
- Standard: ~¥2000/month (more features)
- Enterprise: Custom pricing
- API Docs: https://open.1688.com/api/apidocdetail.htm
- Developer Forum: https://openclub.1688.com
- API Console: https://console.1688.com
- GitHub Issues: https://github.com/ridaFD/china/issues
- Stack Overflow: Tag [alibaba] or [1688]
- Email: api-support@1688.com
- Phone: +86 571-8502-2088 (Chinese)
- Help Center: https://helpcenter.1688.com
While waiting for API approval, the app uses realistic mock data:
✅ 20 products per page
✅ Real-looking images
✅ Supplier information
✅ Verification badges
✅ All features work
This lets you develop and test the UI before getting real API access.
- ✅ Register on https://open.1688.com
- ✅ Create application
- ✅ Request API permissions
- ✅ Get App Key and Secret
- ✅ Configure
.env.local - ✅ Restart server
- ✅ See real products!
Questions? Check TROUBLESHOOTING.md or open an issue on GitHub.
Last Updated: October 24, 2025