The following search query works in any internet browser, like IE, Chrome or Firefox.
http://search.mobile.walmart.com/search?query=bread&store=5461&size=20&offset=0
But, if I use curl POST method with parameters:
curl -d "query=bread&store=5461&size=20&offset=0" -X POST http://search.mobile.walmart.com/search
I got error message:
"StatusCode:404, "error":"Not Found"
If it works in a browser then it's a
GETmethod not aPOSTmethod. But if you run it withGETlike this:curl -d "query=bread&store=5461&size=20&offset=0" -X GET http://search.mobile.walmart.com/search. You'll get the following:Which basically means Walmart does not want you to access its website using anything other then a web browser. But you still can try changing the headers to mimic a browser. Also change the
UserAgentstring. Look in this answer on how to do it. This might help.EDIT Actually I've checked it right now and using just
curl -X GET "http://search.mobile.walmart.com/search?query=bread&store=5461&size=20&offset=0"works fine. You dont need to use-dwithGET. Just add the query string to the URL.