Best Practices

Rate Limiting & Request Efficiency

  • Batch Metadata Calls: If you plan to query the same URLs, cache the first response.
  • Backoff Strategy: If you get a 429 status, implement exponential backoff.

Secure API Key Usage

  • Server-Side: Make calls from your back end, not from user-facing front-end code.
  • Environment Variables: Store keys in environment variables or a secure vault.

Handling Large Batches

If you have to import hundreds or thousands of URLs:

  • Queue Up: Add them in batches rather than hitting the API simultaneously.
  • Webhook: Use webhooks to process each completed job to avoid manual polling.