What Is the LemRank Public API?
REST API for programmatic access to rankings, keywords, and reports — build LemRank data into your own dashboards.
REST API for programmatic access to rankings, keywords, and reports — build LemRank data into your own dashboards.
What the API exposes
The LemRank Public API provides programmatic access to your LemRank data. This includes historical keyword rankings, keyword metrics, project configurations, and report generation. The API is a token-authenticated REST API, allowing you to integrate LemRank functionality and data directly into your own applications, dashboards, or workflows. You can retrieve data such as ranking changes over time for specific keywords or a list of all keywords tracked within a project.
Authentication (API key)
Access to the LemRank Public API requires an API key. This key authenticates your requests and associates them with your LemRank account. You can generate and manage your API keys within your LemRank account settings.
To authenticate a request, include your API key in the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEY
Failure to include a valid API key will result in an HTTP 401 Unauthorized response.
Rate limits per plan
API usage is subject to rate limits, which vary depending on your LemRank subscription plan. These limits ensure fair usage and optimal performance for all users.
| Plan | Requests per Minute (RPM) |
|---|---|
| Free Plan | No API access |
| Pro Plan | 60 RPM |
| Agency Plan | 300 RPM |
| Enterprise | Custom (contact support) |
Exceeding the rate limit will result in an HTTP 429 Too Many Requests response. When this occurs, you should pause your requests and retry after the specified time indicated in the response headers. For example, a Retry-After header might indicate how many seconds to wait before attempting another request.
Common endpoints: rankings, keywords, projects
The LemRank Public API provides several endpoints to access different types of data. Here are some commonly used examples:
Rankings
You can retrieve historical ranking data for individual keywords or entire projects.
-
GET /rankings/{keywordId}: Retrieves the ranking history for a specific keyword.{ "data": [ {"date": "2023-10-26", "rank": 5, "url": "https://example.com/page1"}, {"date": "2023-10-25", "rank": 6, "url": "https://example.com/page1"} ] } -
GET /projects/{projectId}/rankings: Retrieves the current rankings for all keywords within a specific project.{ "data": [ {"keywordId": "kw123", "keyword": "seo tools", "rank": 5, "url": "https://example.com/tools"}, {"keywordId": "kw456", "keyword": "link building", "rank": 12, "url": "https://example.com/link-building-guide"} ] }
Keywords
These endpoints allow you to manage and retrieve information about keywords.
-
GET /keywords/{keywordId}: Retrieves details for a specific keyword.{ "data": { "id": "kw123", "keyword": "seo tools", "project_id": "proj456", "search_volume": 12000, "difficulty": 65 } } -
POST /projects/{projectId}/keywords: Adds a new keyword to a project.{ "keyword": "new keyword phrase", "location": "us", "device": "desktop" }
Projects
Manage your LemRank projects.
-
GET /projects: Lists all projects associated with your account.{ "data": [ {"id": "proj456", "name": "My Client Project A", "domain": "client-a.com"}, {"id": "proj789", "name": "Internal Website", "domain": "mycompany.com"} ] } -
GET /projects/{projectId}: Retrieves details for a specific project.{ "data": { "id": "proj456", "name": "My Client Project A", "domain": "client-a.com", "target_audience": "US, English" } }
Webhooks vs polling
When building integrations with LemRank, you have two primary methods for receiving updates: polling or using webhooks.
Polling involves your application repeatedly making requests to the LemRank API to check for new data or status changes. For example, you might poll the /rankings/{keywordId} endpoint every hour to see if a keyword's rank has changed. While simple to implement, polling can be inefficient as most requests will return no new data. It also counts against your API rate limits for every request made.
Webhooks provide a more efficient and event-driven approach. Instead of your application asking LemRank for updates, LemRank sends an HTTP POST request to a specified URL in your application whenever a relevant event occurs. For instance, you could configure a webhook to be triggered when a keyword's ranking significantly changes or when a report is completed.
Webhooks are generally preferred over polling for event-driven integrations because:
- Real-time updates: Your application receives updates as they happen, enabling immediate responses.
- Reduced API usage: You only receive data when something has actually changed, conserving your API rate limit.
- Lower server load: Your application does not need to constantly make requests.
To use webhooks, you provide LemRank with a public URL where it can send event notifications. LemRank will then send JSON payloads containing information about the event to that URL. It is your responsibility to secure your webhook endpoint and validate the incoming requests.
SDK availability
LemRank currently does not offer official Software Development Kits (SDKs) in various programming languages. You interact with the LemRank Public API directly via standard HTTP requests using the methods described above.
You can use any HTTP client library available in your chosen programming language (e.g., requests in Python, axios in JavaScript, HttpClient in C#) to make calls to the API endpoints. This approach offers flexibility and allows you to integrate the API into virtually any application environment.
Related
Frequently asked questions
Is there a rate limit?
Yes — per plan. Rate-limit headers on every response show your current usage. Exceeding returns 429 with a Retry-After header.
Is there an SDK?
TypeScript and Python SDKs are available. Community-contributed SDKs exist for Ruby and PHP.
Can I use the API on the free plan?
No — API access starts on Pro. This keeps API abuse from the free tier.
Related articles
Was this page helpful?
Try LemRank free
14-day Pro trial. No credit card required.