Comment on page
Real-time product request
To make a simple request for a single market page, use the
/realtime/ecommerce
endpoint with the following syntax:Nimble APIs requires that a base64 encoded credential string be sent with every request to authenticate your account. For detailed examples, see
E-commerce API Authentication.
cURL
Python
Node.js
Go
curl -X POST 'https://api.webit.live/api/v1/realtime/ecommerce' \
--header 'Authorization: Basic <credential string>' \
--header 'Content-Type: application/json' \
--data-raw '{
"vendor": "walmart",
"url": "https://www.walmart.com/ip/Simple-Mobile-Apple....",
"country": "US",
"zip": "90210",
"locale": "en"
}'
import requests
url = 'https://api.webit.live/api/v1/realtime/ecommerce'
headers = {
'Authorization': 'Basic <credential string>',
'Content-Type': 'application/json'
}
data = {
"vendor": "walmart",
"url": "https://www.walmart.com/ip/Simple-Mobile-Apple....",
"country": "US",
"zip": "90210",
"locale": "en"
}
response = requests.post(url, headers=headers, json=data)
print(response.status_code)
print(response.json())
const axios = require('axios');
const url = 'https://api.webit.live/api/v1/realtime/ecommerce';
const headers = {
'Authorization': 'Basic <credential string>',
'Content-Type': 'application/json'
};
const data = {
"vendor": "walmart",
"url": "https://www.walmart.com/ip/Simple-Mobile-Apple....",
"country": "US",
"zip": "90210",
"locale": "en"
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error(error);
});
package main
import (
"bytes"
"fmt"
"net/http"
"encoding/json"
)
func main() {
url := "https://api.webit.live/api/v1/realtime/ecommerce"
payload := []byte(`{
"vendor": "walmart",
"url": "https://www.walmart.com/ip/Simple-Mobile-Apple....",
"country": "US",
"zip": "90210",
"locale": "en"
}`)
headers := map[string]string{
"Authorization": "Basic <credential string>",
"Content-Type": "application/json",
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload))
if err != nil {
fmt.Println(err)
return
}
for key, value := range headers {
req.Header.Set(key, value)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
// Read the response body if needed
// body, err := ioutil.ReadAll(resp.Body)
// fmt.Println(string(body))
}
Every request sent through Nimble API is automatically routed through Nimble IP - our premium proxy network!
Parameter | Required | Description |
---|---|---|
vendor | Required | String walmart, amazon |
url | Required | Enum: URL |
country | Optional (default = all) | |
zip | optional | String A 5-digit US zip code. If provided, the closest store to the provided zip code is selected. |
locale | Optional (default = en) | String LCID standard locale used for the URL request. |
parse | Optional (default = false) | Enum: true | false Instructs Nimble whether to structure the results into a JSON format or return the raw HTML. |
Walmart Options
Parameter | Required | Description |
---|---|---|
store | optional | String If not provided, the closest store to the provided zip code is selected. |
Headers
X-Task-ID: string
Payload examples:
If parsing was disabled or omitted in the request, the result data will be the raw HTML of the requested page. If parsing was enabled, a JSON object with a parsed version of the page will be delivered, with the raw HTML included under the
html_content
property.200 OK
{
"status": "success",
"html_content": "<html>[market page HTML]... </html>",
"parsing": {
"status": "success",
"entities": {
[EntityType1]: [{
...
}, {
...
}],
[EntityType2]: [{
...
}, {
...
}]
},
"total_entities_count": 20,
"entities_count": {
[EntityType1]: 10,
[EntityType2]: 10
},
"metrics": {}
}
}
500 Error
{
"status": "error",
"task_id": "<task_id>",
"msg": "can't download the query response - please try again"
}
400 Input Error
{
"status": "failed",
"msg": error
}
Status | Description |
---|---|
200 | OK |
400 | The requested resource could not be reached |
401 | Unauthorized/invalid credental string |
500 | Internal service error |
501 | An error was encountered by the proxy service |
Last modified 1mo ago