Linkedin Company Data

GRATIS CON POSSIBILITÀ DI UPGRADE
Da William Barber | Aggiornamento 15 дней назад | Social
Popolarità

9.8 / 10

Latenza

3,021ms

Livello di servizio

95%

Health Check

100%

Torna a tutte le discussioni

Bad Request: There was an error parsing the input (400)

Rapid account: Luke Wilson Storm
LukeWilsonStorm
3 месяца назад

I’m using the code as given to look up company data, but I’m getting an error if I use it anywhere except on this page to test the endpoint.

What am I doing wrong?

This is the result I get:

{"message":"Bad Request: There was an error parsing the input","status_code":400}

const url = 'https://linkedin-company-data.p.rapidapi.com/linkedInCompanyDataJson';
const options = {
	method: 'POST',
	headers: {
		'content-type': 'application/json',
		'X-RapidAPI-Key': 'API_KEY',
		'X-RapidAPI-Host': 'linkedin-company-data.p.rapidapi.com'
	},
	body: {
		liUrls: [
	'https://www.linkedin.com/company/hilton/'
		]
	}
};

try {
	const response = await fetch(url, options);
	const result = await response.text();
	console.log(result);
} catch (error) {
	console.error(error);
}
Rapid account: Luke Wilson Storm
LukeWilsonStorm Commented 3 месяца назад

Could be useful to have something on the “Tutorials” page maybe, as there’s nothing there currently.

Rapid account: Williambarberjr
williambarberjr Commented 3 месяца назад

Yeah, thanks for the heads up, that’s good to know. I don’t think I have the ability to change that code as it’s auto generated by the platform unfortunately but I’ll look into it.

Rapid account: Luke Wilson Storm
LukeWilsonStorm Commented 3 месяца назад

Thanks that worked!

But FYI, that isn’t included or mentioned in the code you can copy from here

Rapid account: Williambarberjr
williambarberjr Commented 3 месяца назад

You forgot JSON.stringify() around the body:

JSON.stringify({
liUrls: [
https://www.linkedin.com/company/hilton/
]
})

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti