Búsqueda de fábricas en 1688
Utiliza la API de Búsqueda de fábricas en 1688 para integración de API para ecommerce. Consulta los parámetros, los campos de respuesta y los ejemplos de código.
/v1 /alibaba /1688 /factories /searchEjemplos de datos de la API
Consulta el cuerpo de la solicitud y la estructura completa de la respuesta de este endpoint.
{
"keyword": "瑜伽裤"
}{
"request_id": "5d2c1b0e-7c1f-4a52-9a54-0d6f3a1b8e22",
"data": {
"factories": [
{
"supplier_id": "b2b-2189087086",
"company_name": "浦江福衣特服饰有限公司",
"shop_name": "福衣特旗舰店",
"city": "金华",
"main_categories": [
"瑜伽服",
"运动内衣",
"运动紧身裤"
],
"tier": "金牌制造",
"membership_years": 13,
"repurchase_rate": "72%",
"response_rate": "74%",
"on_time_rate": "97%",
"interested_buyers": 520,
"featured_product_id": "615525856856",
"image_url": "https://cbu01.alicdn.com/img/ibank/O1CN01MwlsgO22DRfL8jk0W_!!2189087086-0-cib.jpg",
"shop_url": "https://sale.1688.com/sale/zgc/scene/4qh0hacz.html?__pageId__=227132&cms_id=227132&wh_pha=true&__existtitle__=1&memberId=b2b-2189087086"
},
{
"supplier_id": "b2b-22159869642183f8d6",
"company_name": "义乌市灵苒服饰有限公司",
"shop_name": "义乌市钦熹服装厂",
"city": "金华",
"main_categories": [
"打底裤",
"瑜伽服",
"瑜伽长裤"
],
"tier": "金牌制造",
"membership_years": 4,
"repurchase_rate": "55%",
"response_rate": "92%",
"on_time_rate": "100%",
"interested_buyers": 122,
"featured_product_id": "899212867563",
"image_url": "https://cbu01.alicdn.com/img/ibank/O1CN01VlAMOc1h1tfM9DivA_!!2215986964218-0-cib.jpg",
"shop_url": "https://sale.1688.com/sale/zgc/scene/4qh0hacz.html?__pageId__=227132&cms_id=227132&wh_pha=true&__existtitle__=1&memberId=b2b-22159869642183f8d6"
}
],
"page": 1,
"total": 2000
}
}Esta página documenta el contrato público de Ecommerce Data API. Conserva los nombres de campos, las rutas y los ejemplos técnicos para que puedas integrarla directamente.
Availability: Available
This endpoint is active in the v1 gateway, OpenAPI, and subscription catalog. A successful call consumes 2 billing units.
POST /v1/alibaba/1688/factories/search
The request and response fields below match the current public contract.
Mapeo de la API
| Item | Value |
|---|---|
| MCP Code | alibaba_1688_factories_search |
Llamada rápida
First create an API key, then store it in a server-side environment variable:
export ECOMMERCE_DATA_API_KEY="your_api_key"curl --request POST \
--url https://ecommercedataapi.com/v1/alibaba/1688/factories/search \
--header "Content-Type: application/json" \
--header "X-API-Key: ${ECOMMERCE_DATA_API_KEY}" \
--data '{
"keyword": "瑜伽裤"
}'Integrate with an AI CLI
Copy for your AI CLI
Paste this task into Codex, Claude Code, Gemini CLI, or another coding agent.
Integrate the "1688 Factory Search" endpoint from Ecommerce Data API into the current repository. Make the changes directly instead of only returning sample code.
API documentation: https://ecommercedataapi.com/es/docs/alibaba/1688/factory-search
Endpoint: POST https://ecommercedataapi.com/v1/alibaba/1688/factories/search
API key environment variable: ECOMMERCE_DATA_API_KEY
Example request:
{
"keyword": "瑜伽裤"
}
Requirements:
1. Read the API documentation first, then inspect the repository's language, framework, HTTP client, directory structure, and environment-variable conventions.
2. Reuse the existing API client and error-handling patterns. If none exist, add the smallest reusable Ecommerce Data API client and an endpoint-specific wrapper.
3. Read the key from the server-side ECOMMERCE_DATA_API_KEY environment variable and send Content-Type: application/json plus the X-API-Key header. Never write a real key into source code, browser code, logs, test snapshots, or Git.
4. If the environment variable is missing, tell me to configure ECOMMERCE_DATA_API_KEY myself. Do not request, print, or invent the real key, and continue implementing code and tests that do not require a live request.
5. Implement request and response types from the documentation. Handle non-2xx responses, request_id, error.code, error.message, and 429 rate limits.
6. Add a minimal usage example or test that follows the repository's conventions. Run one minimal live request only when the key is already configured and external requests are allowed; otherwise use mocks or static validation.
7. Run the relevant formatter, type checker, and tests. Report changed files, usage, verification results, and any environment variable I still need to configure.Open this request in Postman
Download the preconfigured collection for this endpoint, then import it into Postman.
Node.js example
const response = await fetch(
'https://ecommercedataapi.com/v1/alibaba/1688/factories/search',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': process.env.ECOMMERCE_DATA_API_KEY,
},
body: JSON.stringify({
keyword: '瑜伽裤',
}),
}
);
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error?.code}: ${result.error?.message}`);
}
console.log(result.data);Python example
import os
import requests
response = requests.post(
"https://ecommercedataapi.com/v1/alibaba/1688/factories/search",
headers={
"Content-Type": "application/json",
"X-API-Key": os.environ["ECOMMERCE_DATA_API_KEY"],
},
json={
"keyword": "瑜伽裤",
},
timeout=30,
)
response.raise_for_status()
print(response.json()["data"])Request body
Send the fields below directly in the JSON body without an extra wrapper. Undefined fields are rejected.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
keyword | String | Yes | Product keyword. Chinese keywords match far more factories than English ones. | 瑜伽裤 |
page | Integer | No | Page number, starting at 1. Each page holds 20 results. | 1 |
Response structure
| Field | Type | Description |
|---|---|---|
request_id | String | Unique identifier for this request. |
data | Object | Endpoint business data. |
The fields below are inside data. For array endpoints they describe one array item; for paginated endpoints they describe one record in items[].
Response fields
| Field | Type | Description | Example |
|---|---|---|---|
factories.supplier_id | String | Supplier ID; pass it to 1688 Factory Profile or 1688 Supplier Products. | b2b-2189087086 |
factories.company_name | String | Registered company name, in Chinese. | 浦江福衣特服饰有限公司 |
factories.shop_name | String | Shop name on 1688. | 福衣特旗舰店 |
factories.city | String | City the factory is in. | 金华 |
factories.main_categories | Array | Categories the factory mainly makes. | - |
factories.tier | String | Factory tier badge shown by 1688, in Chinese. Null when the factory has none. | 金牌制造 |
factories.membership_years | Integer | Years as a paying verified 1688 member. | 13 |
factories.repurchase_rate | String | Share of buyers who ordered again, as a percentage string. | 72% |
factories.response_rate | String | Share of buyer enquiries the factory answers, as a percentage string. | 74% |
factories.on_time_rate | String | Share of orders shipped on time, as a percentage string. | 97% |
factories.interested_buyers | Integer | Buyers who recently showed interest in ordering. | 520 |
factories.featured_product_id | String | A product the factory features; pass it to 1688 Product Details. | 615525856856 |
factories.image_url | String | Image of that featured product. | - |
factories.shop_url | String | Factory page URL on 1688. | - |
page | Integer | Page number returned. | 1 |
total | Integer | Number of matching factories the search can page through, at most 2000. | 2000 |
Response example
{
"request_id": "5d2c1b0e-7c1f-4a52-9a54-0d6f3a1b8e22",
"data": {
"factories": [
{
"supplier_id": "b2b-2189087086",
"company_name": "浦江福衣特服饰有限公司",
"shop_name": "福衣特旗舰店",
"city": "金华",
"main_categories": ["瑜伽服", "运动内衣", "运动紧身裤"],
"tier": "金牌制造",
"membership_years": 13,
"repurchase_rate": "72%",
"response_rate": "74%",
"on_time_rate": "97%",
"interested_buyers": 520,
"featured_product_id": "615525856856",
"image_url": "https://cbu01.alicdn.com/img/ibank/O1CN01MwlsgO22DRfL8jk0W_!!2189087086-0-cib.jpg",
"shop_url": "https://sale.1688.com/sale/zgc/scene/4qh0hacz.html?__pageId__=227132&cms_id=227132&wh_pha=true&__existtitle__=1&memberId=b2b-2189087086"
},
{
"supplier_id": "b2b-22159869642183f8d6",
"company_name": "义乌市灵苒服饰有限公司",
"shop_name": "义乌市钦熹服装厂",
"city": "金华",
"main_categories": ["打底裤", "瑜伽服", "瑜伽长裤"],
"tier": "金牌制造",
"membership_years": 4,
"repurchase_rate": "55%",
"response_rate": "92%",
"on_time_rate": "100%",
"interested_buyers": 122,
"featured_product_id": "899212867563",
"image_url": "https://cbu01.alicdn.com/img/ibank/O1CN01VlAMOc1h1tfM9DivA_!!2215986964218-0-cib.jpg",
"shop_url": "https://sale.1688.com/sale/zgc/scene/4qh0hacz.html?__pageId__=227132&cms_id=227132&wh_pha=true&__existtitle__=1&memberId=b2b-22159869642183f8d6"
}
],
"page": 1,
"total": 2000
}
}See Errors and rate limits for error payloads, request tracing, and rate-limit headers.