Best practices for handling live endpoints in DataForSEO API
Live endpoints in DataForSEO APIs are designed for scenarios where real-time data retrieval is required. Unlike the Standard method, which requires separate POST and GET requests, live endpoints deliver results instantly, making them ideal for applications where immediate data access is critical.
Most DataForSEO APIs offer live endpoints. Some APIs operate exclusively through live endpoints, while others provide them as an additional option to the standard method with POST and GET endpoints. We recommend using standard endpoints whenever they are available. However, for those cases where the live method is your only option, it’s crucial to follow the best practices below to ensure optimal performance.
When to use live endpoints
We recommend using live endpoints only when there’s a direct need for instant data, for example:
➤ Interactive dashboards, when users need real-time updates in a graphical interface.
➤ On-demand analytics use cases where high-speed data retrieval is crucial.
For most other cases, using the Standard method is more efficient and scalable. It allows you to collect data asynchronously, which is better suited for scheduled data retrieval over time. You can learn more about the best practices for using the Standard method in Use case #2 and Use case #3 of the following article: How to Collect SERP Data from DataForSEO API.
Best practices for live endpoint usage
If you still decide to use live endpoints for planned data collection, ensure that requests are made at a consistent rate. We recommend sending a steady flow of a few hundred requests per minute over a longer period. Avoid making 1,500-2,000 requests per minute in short bursts, which can strain the system and lead to service delays or errors.
Review the graphs below illustrating the comparison of request frequency.
➤ Recommended – consistent requests over an extended period of time.
➤ Avoid – spikes in requests, which can lead to issues.
Handling errors
While live endpoints are reliable when used as recommended, errors can occasionally occur. These typically indicate that the request couldn’t be processed. Common error messages include:
"code": 50000, "message": "Internal Error."
"code": 50401, "message": "Internal Error - Timeout."
- HTTP code
500
or504
If you encounter a single error, retry the request with the same payload.
If you receive multiple errors (e.g., dozens or hundreds per minute), it’s recommended to pause the requests for 5-10 minutes to allow the system to recover. After this break, you can resume requests at a consistent rate.
See the list of possible DataForSEO API errors and general status codes in our docs.
SERP API timeout recommendations
For SERP API calls, set a timeout of 120 seconds to prevent the request from being prematurely terminated.
API rate limits for live endpoints
Live endpoints have a general rate limit of 2,000 requests per minute.
However, there are specific limits for:
- Google Ads Keywords Data API: 12 requests per minute per client.
- Google Trends Keywords Data API: 250 requests per minute across all clients (live usage of this endpoint is not recommended).
In addition, there is a limit of 30 concurrent requests for live endpoints of the following APIs:
- Clickstream Keywords Data API
- DataForSEO Trends Keywords Data API
- DataForSEO Labs API
- Backlinks API
- Content Analysis API
- Domain Analytics API
- OnPage API (Content Parsing, Instant Pages).
This means you can send no more than 30 simultaneous requests at any given time. Please refer to our documentation for further details on usage limits for each endpoint.
Final notes
Using live endpoints effectively requires careful planning and adherence to best practices:
- Use live endpoints for real-time and on-demand scenarios only.
- If your use case involves frequent, planned data collection, consider using the Standard method with Task POST and GET to ensure efficiency and system stability.
- Monitor error patterns and adjust your request flow to prevent disruptions.
If you have any questions or need more detailed information about API usage, refer to our API documentation or reach out to our support team!