Lumirank API docs

Errors

What an error response looks like, what each status code means, and the list of every error code.

What an error looks like

Every error has a body in the same format, whatever went wrong:

{
  "error": {
    "code": "filter_value_invalid",
    "message": "Unknown engine \"chatgpt4\". Valid values: chatgpt, gemini, perplexity, ai_mode, copilot, google_ai_overview, claude.",
    "param": "engine"
  }
}
FieldMeaning
codeA fixed code for your program to check. Check the HTTP status first, then this code.
messageA sentence for a person to read. The wording can change, so your program should not read it.
paramThe query parameter or body field that caused the error, or null when the error is not about 1 field.

Status codes

StatusMeaning
400A parameter or body field is not valid, or a change would go over a limit of your plan.
401The request has no key, or the key has the wrong format, is unknown, or was revoked.
403A read key called a write endpoint, the plan does not include API access, or the request used plain HTTP.
404The item does not exist, or it belongs to another brand. Both cases return the same body.
409The brand already has a prompt with this text.
429The brand went over the rate limit, or is running too many reports at once.
500, 503An error on our side. You can send the request again.

After a 429, wait the number of seconds in the Retry-After header, then send the request again. After a 500 or a 503, wait and retry, and wait twice as long after each failure. Do not send a request that got 400, 401, 403, 404, or 409 again without changing it: it gets the same error. See Rate limits.

Every error code

CodeStatusMeaning
parameter_invalid400A parameter or body field has a wrong value or format. param names it.
parameter_missing400A required parameter is missing.
body_invalid400The body is not JSON, or Content-Type: application/json is missing.
filter_value_invalid400A filter has an unknown value: an engine, a country, or an id that is not in your brand. The message names the value. You also get this code for the prompt_id of an archived prompt without include_archived=true.
filter_field_invalid400The report does not accept this filter, for example domain on the visibility report.
date_range_invalid400end_date is before start_date, or the range is longer than 90 days.
dimension_invalid400A dimension is unknown or repeated, the request has 2 time dimensions or more than 3 dimensions, or it has both domain and url.
order_field_invalid400order_by names a column the report does not return, or a direction other than asc or desc.
effective_prompt_quota_exceeded400The change would track more prompts than the plan allows. 1 prompt in 1 country counts as 1.
onboarding_prompt_cap_reached400The brand is still being set up, and the change would go over the limit for setup.
unsupported_region400A country Lumirank does not track.
cannot_modify_self400The id is your own brand. Its competitor status cannot change.
api_key_missing401The request has no Authorization header.
api_key_invalid401The key has the wrong format, is unknown, or was revoked.
insufficient_permission403A read key called a write endpoint.
plan_upgrade_required403The organization's plan does not include API access.
https_required403The request used plain HTTP. Use https://.
resource_missing404Your brand has no item with this id.
prompt_already_exists409The brand already has a prompt with this text, in any status. The message gives that prompt's id and status.
rate_limited429The brand made more than 200 requests this minute.
too_many_concurrent_reports429The brand already has 4 reports running.
internal_error500Something failed on our side.
report_timeout503The report took too long. Send it again, or ask for a shorter date range or fewer dimensions.

New error codes can be added to v1. If you get a code you do not know, handle it by its HTTP status.

On this page