Walmart Category API (Async)

This endpoint will retrieve Walmart product list for a specified product category.

Single query request:

require 'net/http'
require 'json'
require 'uri'
uri = URI('https://async.scraperapi.com/structured/walmart/category')
request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
request.body = {
  apiKey: 'APIKEY',
    category: 'CATEGORY',
    tld: 'TLD',
    page: 'PAGE',
    output_format: 'FORMAT',
    callback: {
    type: 'webhook',
    url: 'CALLBACK'
  }
}.to_json
begin
  response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
    http.request(request)
  end
  puts response.body
rescue => e
  puts "Error: #{e.message}"
end

Multiple query request:

require 'net/http'
require 'json'
require 'uri'
uri = URI('https://async.scraperapi.com/structured/walmart/category')
request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
request.body = {
  apiKey: 'APIKEY',
    categories: ['CATEGORY1', 'CATEGORY2'],
    tld: 'TLD',
    page: 'PAGE',
    output_format: 'FORMAT',
    callback: {
    type: 'webhook',
    url: 'CALLBACK'
  }
}.to_json
begin
  response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
    http.request(request)
  end
  puts response.body
rescue => e
  puts "Error: #{e.message}"
end

REQUIRED

APIKEY

User account’s normal API key.

CATEGORY

Walmart category id. Example: 3944_1089430_37807

OPTIONAL

PAGE

Pagination. Example: 3

TLD

Top level domain. Valid values are com and ca

OUTPUT_FORMAT

For structured data methods we offer CSV and JSON output. JSON is default if parameter is not added. Options:

  • csv

  • json

Sample Response

For single query requests:

{
  "id": "ce93d237-4595-4508-8d81-f94365fc542c",
  "status": "running",
  "statusUrl": "https://async.scraperapi.com/jobs/ce93d237-4595-4508-8d81-f94365fc542c",
  "category": "3944_1089430_37807",
}

For multiple query requests:

[
  {
    "id": "ec4a6153-368c-440e-8c02-6c302a661db9",
    "status": "running",
    "statusUrl": "https://async.scraperapi.com/jobs/ec4a6153-368c-440e-8c02-6c302a661db9",
    "category": "3920"
  },
  {
    "id": "8a024945-f74a-4327-80e3-12f26c737ec6",
    "status": "running",
    "statusUrl": "https://async.scraperapi.com/jobs/8a024945-f74a-4327-80e3-12f26c737ec6",
    "category": "3944_1089430_37807"
  }
]

After the job(s) finish, you will find the result under the response key in the response JSON object. The structure is the same as in the corresponding SYNC data endpoint.

Last updated