Skip to main content
The OpenAlex API uses standard HTTP status codes to indicate success or failure.

HTTP Status Codes

Error Response Format

Error responses include a message explaining what went wrong:

Common Errors

Invalid Filter Syntax

Fix: Ensure values match expected types. publication_year expects an integer.

Unknown Filter Field

Fix: Use the correct filter field. For authors, use authorships.author.id with an ID, not a name. See Resolve IDs.

Rate Limit Exceeded

Fix:
  • Check rate limit headers to see your remaining allowance
  • Add delays between requests
  • Use per_page=100 to reduce total requests
  • Consider a paid plan for higher limits

Entity Not Found

Fix: Verify the ID exists. The entity may have been merged—check if you’re being redirected.

Retry Logic

Implement exponential backoff for transient errors:

Rate Limit Headers

Every response includes headers showing your current status:
Use these to:
  • Monitor your usage
  • Pause before hitting limits
  • Calculate when limits reset (seconds until midnight UTC)

Best Practices

  1. Always set timeouts — Use 30-second timeouts to avoid hanging requests
  2. Implement backoff — Don’t retry immediately; wait 1s, 2s, 4s, etc.
  3. Check headers — Monitor X-RateLimit-Remaining to avoid hitting limits
  4. Log errors — Record failures for debugging
  5. Use bulk endpoints — Batch requests to reduce total API calls