@Adnand has probably been solved his issue but I'll leave this here for anyone else who has this problem in the future as I just spent half a day trying to get it working.
It's not made to clear elsewhere but you REALLY need to have a payload specifying the time range for the data you want otherwise you get the statusCode 3 error.
See below python 3 code snipet.
Note that the username and password fields needs to be URL encoded (
URL Decoder/Encoder)
just remember to chang all instances of <ip_address> to the ip address of your camera.
---------------------------
import requests
url = "http://<user>:<password>@<ip_address>/ISAPI/System/Video/inputs/channels/1/counting/search"
payload = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><CountingStatisticsDescription><reportType>daily</reportType><timeSpanList><timeSpan><startTime>2018-12-13T00:00:00</startTime><endTime>2018-12-13T23:59:59</endTime></timeSpan></timeSpanList></CountingStatisticsDescription>"
headers = {
'accept': "*/*",
'origin': "<ip_address>",
'x-requested-with': "XMLHttpRequest",
'if-modified-since': "0",
'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8",
'referer': "http://<ip_address>/doc/page/application.asp",
'accept-encoding': "gzip, deflate",
'accept-language': "en-AU,en;q=0.9",
'cookie': "language=en; language=en",
'cache-control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
---------------------------