HTTP Status Codes
400 Bad Request
A 400 response indicates that the request couldn’t be processed because one or more parameters were invalid. Common causes include:- Incorrect date format
- Missing required parameters
- Invalid query string
- Malformed request URL
Example Response
How to Fix
- Use the correct endpoint.
- Check that all required parameters are included.
- Ensure dates use the YYYY-MM-DD format.
- Review the Endpoints documentation for the required request format.
401 Unauthorized
A 401 response means the API could not authenticate your request. This is the most common error when getting started.Common Causes
Example Response
403 Forbidden
A 403 response means your API key is valid, but you don’t have permission to access the requested resource. This can happen if:- The project belongs to another account.
- The keyword belongs to another project.
- Your subscription doesn’t include access to the requested feature.
Example Response
404 Not Found
A 404 response means the requested resource couldn’t be found. This usually happens when:- The project ID doesn’t exist.
- The keyword ID doesn’t exist.
- The resource has been deleted.
Example Response
Tip
Retrieve valid IDs using:GET /projects/GET /project-keywords-list/{project_id}/
429 Too Many Requests
A 429 response indicates that your API key has exceeded the hourly request limit. Each API key is limited to 1,000 requests per hour.Example Response
How to Fix
- Wait until the next hour before making additional requests.
- Cache responses where possible.
- Use pagination for large datasets.
- Reduce unnecessary polling.
Note In some situations, rate limit errors may also be returned as a 401 Unauthorized response with a message indicating that the API key rate limit has been exceeded.
500 Internal Server Error
A 500 response indicates an unexpected error on the SERPtag platform. These errors are usually temporary.Example Response
How to Fix
- Wait a few moments.
- Retry your request.
- If the problem continues, contact SERPtag Support.
Handling Errors in Your Application
Always check the HTTP status code before processing the response.JavaScript Example
Best Practices
To reduce API errors:- Always validate user input before sending requests.
- Store your API key securely.
- Cache responses where appropriate.
- Respect the hourly rate limit.
- Handle retry logic for temporary failures.
- Log API errors to help with debugging.
Need Help?
If you’re still experiencing problems after checking the documentation, our team is here to help. 📧 Email: support@serptag.com Please include:- The endpoint you called.
- The HTTP status code.
- The full error message.
- A sample request (without your API key).