沃爾瑪產品 API
最后更新于
最后更新于
端點GET https://serpapi.abcproxy.com/search
描述
我們的 沃爾瑪產品API 允許您從沃爾瑪產品頁面抓取結果。該 API 可透過以下端點訪問:
/search?engine=walmart_product
。使用者可以透過GET
請求來查詢https://serpapi.abcproxy.com/search?engine= walmart_product
。可前往 觀看實時且互動的示範。
curl -X GET "https://serpapi.abcproxy.com/search" \
-d "engine=walmart_product" \
-d "product_id=5689919121" \
-d "no_cache=false" \
-d "api_key=YOUR_API_KEY"
import requests
params = {
"engine": "walmart_product",
"product_id": "5689919121",
"no_cache": "false",
"api_key": "YOUR_API_KEY"
}
response = requests.get("https://serpapi.abcproxy.com/search", params=params)
print(response.json())
const axios = require('axios');
const params = {
engine: "walmart_product",
product_id: "5689919121",
no_cache: "false",
api_key: "YOUR_API_KEY"
};
axios.get("https://serpapi.abcproxy.com/search", { params })
.then(response => console.log(response.data));
GET /search?engine=walmart_product&product_id=5689919121&no_cache=false&api_key=YOUR_API_KEY HTTP/1.1
Host: serpapi.abcproxy.com
<?php
$client = new \GuzzleHttp\Client();
$response = $client->get('https://serpapi.abcproxy.com/search', [
'query' => [
'engine' => 'walmart_product',
'product_id' => '5689919121',
'no_cache' => 'false',
'api_key' => 'YOUR_API_KEY'
]
]);
echo $response->getBody();
package main
import (
"net/http"
"io/ioutil"
"log"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://serpapi.abcproxy.com/search", nil)
q := req.URL.Query()
q.Add("engine", "walmart_product")
q.Add("product_id", "5689919121")
q.Add("no_cache", "false")
q.Add("api_key", "YOUR_API_KEY")
req.URL.RawQuery = q.Encode()
resp, _ := client.Do(req)
body, _ := ioutil.ReadAll(resp.Body)
log.Println(string(body))
}
using System;
using System.Net.Http;
class Program
{
static async Task Main()
{
var client = new HttpClient();
var query = System.Web.HttpUtility.ParseQueryString(string.Empty);
query["engine"] = "walmart_product";
query["product_id"] = "5689919121";
query["no_cache"] = "false";
query["api_key"] = "YOUR_API_KEY";
var response = await client.GetAsync(
$"https://serpapi.abcproxy.com/search?{query}"
);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
import java.net.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://serpapi.abcproxy.com/search" +
"?engine=walmart_product" +
"&product_id=5689919121" +
"&no_cache=false" +
"&api_key=YOUR_API_KEY";
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(
new InputStreamReader(conn.getInputStream())
);
String response = in.lines().collect(Collectors.joining());
System.out.println(response);
}
}
搜尋查詢
product_id
字符串
是
此參數定義要取得結果的產品ID。通常可從支援產品的購物結果中找到(例如:https://www.walmart.com/ip/{product_id}
)。可同時傳入 product_id
和 us_item_id
。使用 product_id
時,來自 Walmart.com 的回應會較快。
5689919121
進階過濾條件
store_id
字符串
否
5
SerpApi 參數
engine
字符串
是
設定參數為 walmart_product
以使用沃爾瑪產品 API 引擎。
walmart_product
no_cache
布爾值
否
此參數會強制 SerpApi 重新抓取資料,即使已有快取版本。只有在查詢與所有參數完全相同時才會使用快取。快取會在1小時後過期,且不計入月搜尋次數。可設為 false
(預設)允許使用快取,或 true
禁止使用快取。
true
或false
api_key
字符串
是
定義要使用的 SerpApi 私密金鑰。
123
回應主體
{
"search_parameters": {
"engine": "walmart_product",
"no_cache": true,
"api_key": "YOUR_API_KEY",
"product_id": "5689919121"
},
"search_metadata": {
"raw_html_file": "https://webserp.abcproxy.com/files/b17362856c381221/882d5f1a-8652-4303-9698-a351ad318518.html",
"xray_html_file": "https://webserp.abcproxy.com/files/b17362856c381221/882d5f1a-8652-4303-9698-a351ad318518.xray",
"total_time_taken": "13.0296",
"id": "882d5f1a-8652-4303-9698-a351ad318518",
"json_endpoint": "https://webserp.abcproxy.com/files/b17362856c381221/882d5f1a-8652-4303-9698-a351ad318518.json",
"created_at": "2025-04-02 18:40:28",
"yahoo_url": "https://www.walmart.com/ip/5689919121"
},
"search_information": {
"location": {
"postal_code": "95829",
"province_code": "CA",
"city": "Sacramento",
"store_id": "3081"
}
},
"product_result": {
"price_map": {
"price": 195,
"currency": "USD",
"was_price": {
"price": 249,
"priceString": "$249.00",
"currencyUnit": "USD"
}
},
"product_id": "3RZ5BTN0KR6U",
"categories": [
{
"name": "Electronics",
"url": "/cp/electronics/3944"
},
{
"url": "/browse/audio/3944_133251",
"name": "Audio"
},
{
"url": "/cp/headphones/1095191",
"name": "Headphones"
},
{
"url": "/browse/electronics/shop-headphones-by-type/3944_133251_1095191_1230614",
"name": "Shop Headphones by Type"
},
{
"name": "Noise Cancelling Headphones",
"url": "/browse/electronics/noise-cancelling-headphones/3944_133251_1095191_1230614_6051360"
}
],
"reviews": 18499,
"offer_id": "71A6BE372384314C8273320C5C588357",
"offer_type": "ONLINE_ONLY",
"seller_id": "66656029CC6541CBADDFA17547A98DE0",
"seller_name": "VIPOUTLET",
"product_type_id": "4159",
"delivery_option": {
"arrival_date": 1744149540000,
"display_arrival_date": "2025-04-08T21:59:00.000Z"
},
"specification_highlights": [
{
"value": "Apple",
"name": "Brand"
},
{
"name": "Headphone Feature",
"value": "True Wireless, Voice-Activated"
},
{
"name": "Battery Life",
"value": "6 h"
},
{
"name": "Accessories Included",
"value": "MagSafe charging case with speaker and lanyard loop, USB-C charge cable, 4 pairs of silicone ear tips (extra small, small, medium, large)"
},
{
"name": "Noise Control Technology",
"value": "Active Noise Cancellation"
},
{
"name": "Microphone Included",
"value": "Y"
},
{
"name": "Wireless Technology",
"value": "Bluetooth"
},
{
"value": "MTJV3AM/A",
"name": "Model"
},
{
"value": "In-Ear",
"name": "Headphone Style"
},
{
"name": "Maximum Transmission Range",
"value": "1 ft"
},
{
"name": "Headphone Type",
"value": "Earbuds"
},
{
"value": "MTJV3AM/A",
"name": "Manufacturer Part Number"
},
{
"name": "Color",
"value": "White"
},
{
"name": "Manufacturer",
"value": "Apple"
},
{
"name": "Power Type",
"value": "Battery"
},
{
"value": "1 in",
"name": "Cord Length"
},
{
"name": "Recommended Use",
"value": "Casual Listening, Sports"
},
{
"name": "Assembled Product Dimensions (L x W x H)",
"value": "3.94 x 3.94 x 1.77 Inches"
}
],
"manufacture_number": "MTJV3AM/A",
"product_page_url": "https://www.walmart.com/ip/AirPods-Pro-2nd-generation-with-MagSafe-Case-USB-C/5689919121",
"images": [
"https://i5.walmartimages.com/seo/Apple-AirPods-Pro-2-Wireless-Earbuds-Active-Noise-Cancellation-Hearing-Aid-Feature_4e23623d-94ed-4bac-851a-b1fde7eeb962.1523af65ffb7f2e2be28c8b3f0a008fa.jpeg",
"https://i5.walmartimages.com/asr/757d7f3f-9cea-42f7-950b-4e4b54cb0f9f.7b5c0548ce9e62b090439cdf30898046.jpeg",
"https://i5.walmartimages.com/asr/e0ee6d5d-8d97-4dff-bc55-8c93c352d087.5be509b988a862ca5faba74e264bb5c2.jpeg",
"https://i5.walmartimages.com/asr/1bf4595f-7341-4198-aa7d-912f292fcd59.7bdbf66e1e156e458a577e5fab6246e2.jpeg",
"https://i5.walmartimages.com/asr/c6ff5d9b-f154-43fe-9310-c8e9f93aff8a.5d00caaa47b70a0e2835a850cc5394bd.jpeg",
"https://i5.walmartimages.com/asr/9adda7b8-956f-409b-80dc-748212f101b4.07a388b6a4fd797952b6e48ce2965d0f.jpeg",
"https://i5.walmartimages.com/asr/b5cebdf3-6592-4289-9552-52c36e877d76.dfe99b9e58feb47e9969f1ab718ed6c4.jpeg",
"https://i5.walmartimages.com/asr/ce2fa35b-7447-416e-85be-9de03a05aaf2.bbc8cf94caafb0e608fc32b87241456c.jpeg"
],
"upc": "195949704529",
"title": "Apple AirPods Pro 2, Wireless Earbuds, Active Noise Cancellation, Hearing Aid Feature",
"us_item_id": "5689919121",
"short_description_html": "AirPods Pro 2—featuring pro-level Active Noise Cancellation, Adaptive Audio, Transparency mode, Personalized Spatial Audio, and a breakthrough in hearing health with a scientifically validated Hearing Test, clinical-grade Hearing Aid capability, and active Hearing Protection (coming Fall 2024).",
"product_type": "Headphones",
"rating": 4.6,
"detailed_description_html": "<ul> <li>PIONEERING HEARING—AirPods Pro 2 unlock the world’s first all-in-one hearing health experience: a scientifically validated Hearing Test, clinical-grade Hearing Aid feature, and active Hearing Protection. Coming fall 2024.</li> <li>INTELLIGENT NOISE CONTROL—Active Noise Cancellation removes up to 2x more background noise. Transparency mode lets you hear the world around you, and Adaptive Audio seamlessly blends Active Noise Cancellation and Transparency mode for the best listening experience in any environment. And when you’re speaking with someone nearby, Conversation Awareness automatically lowers the volume of what’s playing.</li> <li>IMPROVED SOUND AND CALL QUALITY—The Apple-designed H2 chip helps to create deeply immersive sound. The low-distortion, custom-built driver delivers crisp, clear high notes and full, rich bass in stunning definition. Voice Isolation improves the quality of phone calls in loud conditions.</li> <li>CUSTOMIZABLE FIT—Includes four pairs of silicone tips (XS, S, M, L) to fit a wide range of ear shapes and provide all-day comfort. The tips create an acoustic seal to help keep out noise and secure AirPods Pro 2 in place.</li> <li>DUST, SWEAT, AND WATER RESISTANT—Both AirPods Pro 2 and the MagSafe Charging Case are IP54 dust, sweat, and water resistant, so you can listen comfortably in more conditions.</li> <li>PERSONALIZED SPATIAL AUDIO—With sound that suits your unique ear shape along with dynamic head tracking, AirPods Pro 2 deliver an immersive listening experience that places sound all around you. You can also listen to select songs, shows, and movies in Dolby Atmos.</li> <li>A HIGHER LEVEL OF CONTROL—Simply swipe, press, and hold the stem to manage playback functions using Touch control. And with Siri Interactions, simply nod your head yes or shake your head no when Siri asks if you’d like to hear a message, answer a call, or manage a notification.</li> <li>LONG BATTERY LIFE—Get up to 6 hours of listening time with Active Noise Cancellation enabled. And get up to 30 hours of total listening time with Active Noise Cancellation enabled, using the case.</li> <li>A MORE CAPABLE CASE—Keep track of AirPods Pro 2 with Precision Finding and a built-in speaker. A lanyard loop helps keep your AirPods Pro 2 close. Charge with an Apple Watch or MagSafe charger, USB-C Charge Cable, or Qi-certified charger.<br> </li> <li><strong>Legal</strong><br> <br> <br> <br> 1Compared with AirPods Pro (1st generation) and AirPods 4 with Active Noise Cancellation.<br> <br> 2Device performance and noise control features like Active Noise Cancellation, Adaptive Audio, and Transparency can be affected by debris or earwax buildup. Clean the device regularly to maintain performance and full feature functionality. Refer to <a href=\"https://support.apple.com/102672\">support.apple.com/102672</a> for cleaning instructions.<br> <br> 3Spatial Audio works with compatible content in supported apps. iPhone with TrueDepth camera required to create personalized profile.<br> <br> 4The Hearing Test and Hearing Aid features are expected fall 2024. They will be supported on AirPods Pro 2 with the latest firmware paired with a compatible iPhone or iPad with iOS 18 or iPadOS 18 and later. The Hearing Aid feature is also supported on Mac running macOS Sequoia and later. It is pending FDA authorization.<br> <br> 5The Hearing Protection feature works with AirPods Pro 2 with the latest firmware when paired with a compatible iPhone, iPad, or Mac with iOS 18, iPadOS 18, or macOS Sequoia and later. Feature is only available in the U.S. and Canada. See <a href=\"https://support.apple.com/120850\">https://support.apple.com/120850</a> for total attenuation and more information.<br> <br> 6Available on compatible devices running iOS 18, iPadOS 18, or macOS Sequoia and later when paired with AirPods 4, AirPods 4 with Active Noise Cancellation, or AirPods Pro 2 with the latest firmware.<br> <br> 7AirPods Pro 2 are dust, sweat, and water resistant for non-water sports and exercise, and they are IP54 rated. Dust, sweat, and water resistance are not permanent conditions.<br> <br> 8Testing conducted by Apple in August 2023 using preproduction AirPods Pro 2 with MagSafe Charging Case (USB-C) and software paired with preproduction iPhone 15 Pro units and software. The playlist consisted of 358 unique audio tracks purchased from the iTunes Store (256-Kbps AAC encoding). Volume was set to 50% and Active Noise Cancellation was enabled. With Spatial Audio and Head Tracking enabled, listening time was up to 5.5 hours. Testing consisted of full AirPods Pro battery discharge while playing audio until the first AirPod Pro stopped playback. Battery life depends on device settings, environment, usage, and many other factors.<br> <br> 9Testing conducted by Apple in August 2023 using preproduction AirPods Pro 2 with MagSafe Charging Case (USB-C) and software paired with preproduction iPhone 15 Pro units and software. The playlist consisted of 358 unique audio tracks purchased from the iTunes Store (256-Kbps AAC encoding). Volume was set to 50% and Active Noise Cancellation was enabled. Testing consisted of full AirPods Pro battery discharge while playing audio until the first AirPod Pro stopped playback. The drained AirPods Pro were charged to 100 percent, then audio playback was resumed until the first AirPod Pro stopped playback. This cycle was repeated until both the AirPods Pro and charging case were fully discharged. Battery life depends on device settings, environment, usage, and many other factors. <br> <br> 10Precision Finding requires a U1-equipped iPhone; availability varies by region.<br> <br> 11MagSafe charging requires a compatible MagSafe charger. Wireless charging requires a Qi-certified wireless charger. AirPods Pro 2 charging case also works with the Apple Watch charger or USB-C connector.<br> <br> </li> <li>Technical specifications<br> <br> Go to <a href=\"https://apple.com/airpods-pro/specs/\">apple.com/airpods-pro/specs/</a> for a complete set.<br> <br> <br> <br> <br> <br> </li> </ul>",
"badges": [
{
"id": "L1600",
"key": "BESTSELLER",
"name": "Best seller"
}
],
"manufacturer": "Apple",
"offers": [
{
"price": 195,
"seller_id": "66656029CC6541CBADDFA17547A98DE0",
"catalog_seller_id": 152,
"seller_name": "VIPOUTLET",
"seller_display_name": "VIPOUTLET"
}
]
}
}
回應欄位
search_parameters
對象
包含查詢參數及搜尋上下文信息
search_metadata
對象
包含時間和狀態相關信息
url
字符串
網址
常見錯誤
200
400
API 金鑰不可為空
200
401
參數錯誤
200
402
API 金鑰錯誤
200
403
餘額不足
200
404
扣款失敗
200
405
記錄使用次數失敗
200
406
不支援的引擎
200
407
網路錯誤
200
408
檔案未找到
200
409
限制參數錯誤
200
410
建立網址錯誤
200
411
查詢最近紀錄失敗
200
412
找不到 JSON
200
413
取得 HTML 失敗
200
414
HTML 內容為空
200
429
請求過於頻繁
錯誤範例
{
"code": 400,
"message": "API Key can not be empty"
}
透過指定店鋪ID來過濾產品。完整支援店鋪清單請參考 。