The new company updates API looks really good, but I would be looking for to be able to read multiple companies' updates with one query, so our application can display updates at a list of companies, instead of just one at a time.
This is important to save network traffic and page load time when individuals are monitoring several (potentiall several dozen) companies for any updates.
Company Updates API - read multiple companies with one query?
You can do a bulk call and get that data like this:
Where 1337 and 12345 are the company IDs to be requested. This isn't officially documented, so it can change in the future, but should be as reliable as the main company read API as it's also in preview mode.
This is indeed great news!
When I use the following url - "http://api.linkedin.com/v1/companies::(id1,id2, ..., id55):(updates:(timestamp))" ,
I get a good result, but this result is returned after ~ 8 seconds and that's too long for me.
Is this really the time it suppose to take?
I'm using this query because I want to get the updates count (just the count without the content!) for the last 24 hours for 55 companies,
is there another alternative I can use?
Different operations are more expensive than others depending on our the backend services are optimized. Seems you hit on one that isn't optimized and as such it's expensive. There isn't much we can do about that unfortunately (at least not in a timely manner).
Is a query with multiple ids like 'http://api.linkedin.com/v1/companies::(1337,12345):(updates)' considered as one API call or 2?
I found in the doc that bulk requests are throttled as multiple individual requests(?) if it's the case, is there another alternative to economize the api call?
You're correct, even though you're making one API call, each resource that's returned in your response (so in your case, companies) counts towards your total API limit for a given day.
Hope that helps,
But how about calls like:
This also returns 2 companies... Does it count twice?