The LinkedIn API enforces rate limits to prevent abuse and ensure stability of their systems. Error 429 indicates that a rate limit has been exceeded. Specifically, it means “Too Many Requests” – the client has sent too many requests in a given period of time.
What causes error 429?
There are a few key things that can trigger a 429 error on the LinkedIn API:
- Exceeding the per-app rate limits – Each LinkedIn app is allowed a certain number of API calls per day, month, etc based on their access level. Going over those quotas will lead to 429 errors.
- Exceeding per-user rate limits – Some endpoints have rate limits defined per member, not just per app. Doing too many calls for a single user will hit those limits.
- Bursting requests – Even if the total request limit hasn’t been reached, sending too many requests concurrently can sometimes trigger 429s.
- Unauthenticated requests – Unauthenticated requests are very limited, so just a few calls without an access token can start getting 429s.
Essentially any situation where the LinkedIn API is receiving more requests than its configured limits will lead to 429 errors.
What are the rate limits?
The specific rate limits for the LinkedIn API include:
- Basic API Key – 20,000 calls per day, 1,500 calls per hour per key
- Standard API Key – 200,000 calls per day, 15,000 calls per hour per key
- Premium (Plus) API Key – 500,000 calls per day, 30,000 calls per hour per key
- Unauthenticated – 300 calls per hour, 100 calls per 10 minutes
In addition, some endpoints have custom limits documented on the endpoint reference pages. For example, the Share API has much lower limits than the overall API.
How can I avoid error 429?
Here are some tips to avoid hitting LinkedIn’s rate limits:
- Understand the rate limits for your app’s access level, and stay well below them
- Spread API calls out over time instead of bursting them
- Cache data on your end instead of repeatedly calling the API
- If doing lots of calls for one user, watch for per-user limits
- Use exponential backoff and retry logic to smoothly handle 429 errors
- Consider distributing load across multiple API keys if needed
Carefully pacing your requests and having your application gracefully handle rate limiting is key. It’s also smart to build in headroom on usage rather than maxing out every limit.
How long do I need to wait when I get a 429?
When you receive a 429 error, the HTTP response headers will include a Retry-After field. This gives the minimum number of seconds to wait before making another request. The specific retry delay varies based on the type of rate limit exceeded.
As a guideline, here are some typical Retry-After values:
- 1 minute – Exceeded per endpoint limit
- 10 minutes – Exceeded hourly limit
- 1 hour – Exceeded daily limit
It’s important to always follow the Retry-After delay instead of hardcoding or ignoring it. This ensures your app responds appropriately to LinkedIn’s current load and congestion levels.
Will I keep getting 429s forever?
The 429 errors will continue as long as your request rate continues exceeding the limits. However, there are a few cases where the errors can continue for some time, even after fixing the excess load:
- Cached usage counts – The usage stats that determine rate limits are cached up to 24 hours.
- IP-based limits – Some limits such as unauthenticated requests are enforced based on IP address.
So you may need to wait up to a day for limits to fully reset after a spike in traffic. The best approach is obviously to avoid those spikes in the first place by pacing requests.
Are there 429 error codes besides just 429?
The LinkedIn API uses standard HTTP status codes, so 429 is the only code used for rate limiting. However, there are a few other related errors that can occur:
- 403 Forbidden – Indicates an authentication failure if seeing it on an authenticated endpoint.
- 404 Not Found – The requested endpoint doesn’t exist, so not a true 429 situation.
- 510 Not Extended – Indicates you need to upgrade your LinkedIn API access level.
So while 429 is the main status linked to rate limits, a few other codes can also signal related issues.
What are some 429 error examples?
Here are some examples of LinkedIn API requests that could trigger 429 errors:
- Requesting a user’s full profile > 100 times per hour – Hits per member limit.
- Refreshing latest user posts > 1 per second – Exceeds burst rate.
- Running analytics on 200,000 posts in 1 day – Breaks daily API limit.
- Automated bot liking 500 posts per minute – Both per app and per user limits exceeded.
Essentially any scenario where the requests substantially exceed the documented hourly, daily, or per member limits could lead to 429. Paying close attention to those limits for your specific use cases is key.
What happens to my app if I keep getting 429s?
If your application continues making excessive requests that trigger 429 errors, LinkedIn will take measures to protect their API infrastructure and availability:
- Throttling – API calls will be throttled, increasingly slowing down access.
- Blocking – In severe cases of abuse, API access may be temporarily blocked.
- Blacklisting – Apps that chronically exceed limits may get blacklisted and banned.
In addition, continually hitting rate limits will make your application unusable, with requests timing out or getting errors. So proper rate limiting is critical for both LinkedIn’s infrastructure and your app’s reliability.
Should I retry immediately when I get 429?
No, immediately retrying the request when you get a 429 will just further exceed rate limits. Instead, you should:
- Check the Retry-After header value that specifies the minimum wait time.
- Delay any further requests to LinkedIn for at least that retry period.
- Use exponential backoff to slowly increase the delay if 429s continue.
This introduces a delay between retry attempts so that the per hour and per day limits have time to reset.
How can I manage API limits in my application code?
Here are some best practices for handling rate limits and avoiding 429s in your code when using the LinkedIn API:
- Use an API client that can automatically retry with delays when hitting 429.
- Implement exponential backoff with increasing wait times between retries.
- Track number of requests made and limit concurrency to stay under limits.
- Collect analytics on API call frequency and volume to identify limit risks.
- Regularly check for updated rate limit rules and adjust accordingly.
Rate limiting and avoiding 429 should be built into your application logic from the start. Don’t just handle errors as they occur – actively limit request volume based on the documented thresholds.
Should I upgrade my API access level?
Upgrading to a higher tier API key with increased rate limits is an option if you are frequently getting 429 errors and have a legitimate need for high volumes of API calls. The upgrade tiers available are:
- Standard: 200K calls per day, 15K per hour (default)
- Premium (Plus): 500K calls per day, 30K per hour
However, upgrading should not be the only solution – be sure you are also optimizing requests and efficiently using caching. Analyze your usage to make sure an upgrade is warranted and cost-effective.
What is the impact of Linkedin API limits on my app?
If your application exceeds LinkedIn’s API rate limits, it can severely impact reliability and performance:
- Requests start failing once limits are hit, leading to crashes.
- Users experience errors, timeouts, missing data.
- Feature functionality is broken or limited.
- Retries increase latency as requests are throttled.
- Difficult to scale up traffic and usage.
Essentially, your app’s LinkedIn integration will be unreliable, potentially unusable during limit resets, and unable to support more users. Carefully planning usage volumes and limits is crucial.
What are some best practices for avoiding LinkedIn API 429 errors?
Some top best practices for avoiding excessive API calls and 429 errors include:
- Analyze usage patterns and set request budgets well below limits.
- Implement caching and reuse query results whenever possible.
- Scale out requests across multiple API keys if needed.
- Use batch operations instead of individual calls where available.
- Add retry logic and exponential backoff in case of spikes.
- Regulary monitor your usage volumes for spikes.
The key is continuously monitoring and optimizing usage to avoid any surprises or sudden limit exceedances. Also build resilience by handling errors gracefully and scaling limits.
Can I contact LinkedIn support about API limits?
If you are frequently running into API limit issues that are blocking development and usage of your app, you can contact LinkedIn developer support for assistance. Some ways they may be able to help:
- Review your use case and provide guidance on optimizing usage to avoid hitting limits.
- Consider providing temporary higher rate limits if genuinely needed for development/testing.
- Discuss upgrading your API access level if usage warrants it.
- Troubleshoot any issues or unclear errors you are seeing.
Generally LinkedIn support is available to have technical conversations about rate limiting challenges. Be sure to provide detailed examples of endpoints, volumes, and errors seen. But note they will expect you to make efforts to reduce usage first.
Conclusion
LinkedIn’s API rate limiting and 429 errors protect availability and quality of service for all apps by preventing abuse. By understanding the limits, carefully tracking your own usage, retrying gracefully, and optimizing requests, you can avoid 429s. Rate limiting is a normal part of working with web-scale APIs, and having robust controls for it makes your app stable and scalable.