Amazon

FREEMIUM
(Ким) Anthony | Оновлено 4日前 | eCommerce
Популярність

9.4 / 10

Затримки

3,267ms

Рівень обслуговування

100%

Health Check

N/A

Повернутися до всіх обговорень

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object

Rapid account: Gtardy
gtardy
2年前

I keep getting the same error (see title above), yet RapidAPI treats it as any other chargeable API call.

As I understand it, the error is raised by ScrapeNinja. Yet the “data” argument should be unnecessary for a GET request, according to API Documentation.

The environment is Node.js using request with the following options :

{
method: ‘POST’,
uri: ‘https://scrapeninja.p.rapidapi.com/scrape’,
headers: {
‘content-type’: ‘application/json’,
‘X-RapidAPI-Host’: ‘scrapeninja.p.rapidapi.com’,
‘X-RapidAPI-Key’: ‘MY_API_KEY_HERE’,
useQueryString: true
},
body: {
geo: ‘de’,
url: ‘https://ANY_WEBSITE_HERE’,
headers: [
‘User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36’,
‘Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8’,
‘Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7,de;q=0.6,de-CH;q=0.5’,
]
},
useQueryString: true,
json: true
encoding: null,
gzip: true,
forever: true,
jar: true,
timeout: 60000,
simple: false,
resolveWithFullResponse: true,
}

Rapid account: Restyler
restyler Commented 2年前

Hi! This is the Amazon API support forum, and not ScrapeNinja API support 😃

I see you are doing successful requests now, hopefully you figured out this one.

“data” is indeed only required for POST so it’s probably something wrong with your payload.
If you are still in trouble, please send your code to https://t.me/instalyze so I can investigate.

Good luck!

Приєднуйтесь до обговорення — додайте повідомлення нижче:

Вхід / Реєстрація, щоб публікувати нові повідомлення