{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Rate Limits","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"rate-limits","__idx":0},"children":["Rate Limits"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["MoreLogin API enforces rate limits to ensure fair usage and system stability."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"limits","__idx":1},"children":["Limits"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"API Type"},"children":["API Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Rate Limit"},"children":["Rate Limit"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Window"},"children":["Window"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Local API"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["120 requests"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["per minute"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Open API"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["120 requests"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["per minute"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"rate-limit-response","__idx":2},"children":["Rate Limit Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you exceed the rate limit, the API returns:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP Status"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429 Too Many Requests"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"code\": 429,\n  \"msg\": \"Rate limit exceeded\",\n  \"data\": null,\n  \"requestId\": \"...\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"best-practices","__idx":3},"children":["Best Practices"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-implement-retry-with-backoff","__idx":4},"children":["1. Implement Retry with Backoff"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import time\nimport requests\n\ndef api_request_with_retry(url, payload, max_retries=3):\n    for attempt in range(max_retries):\n        response = requests.post(url, json=payload)\n        if response.status_code == 429:\n            wait_time = 2 ** attempt  # 1s, 2s, 4s\n            print(f\"Rate limited. Retrying in {wait_time}s...\")\n            time.sleep(wait_time)\n            continue\n        return response\n    raise Exception(\"Max retries exceeded\")\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-batch-operations","__idx":5},"children":["2. Batch Operations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Instead of making individual API calls, use batch endpoints when available:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"# Bad: 100 individual calls\nfor env_id in env_ids:\n    requests.post(f\"{BASE}/api/env/start\", json={\"envId\": env_id})\n\n# Good: Use batch endpoints\nrequests.post(f\"{BASE}/api/env/updateGroup/batch\", json={\n    \"envIds\": env_ids,\n    \"groupId\": \"target-group\"\n})\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-cache-responses","__idx":6},"children":["3. Cache Responses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For data that doesn't change frequently (e.g., timezone lists, platform lists), cache the response locally:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"# Cache timezone/language data — it rarely changes\ntimezone_data = requests.post(f\"{BASE}/api/env/advanced/timezone\").json()\n# Reuse timezone_data for subsequent profile creations\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"monitoring-your-usage","__idx":7},"children":["Monitoring Your Usage"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Keep track of your API call frequency. If you consistently approach the limit, consider:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Spreading requests evenly across the minute"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Using webhooks (coming soon) instead of polling"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Combining multiple operations into batch calls"]}]}]},"headings":[{"value":"Rate Limits","id":"rate-limits","depth":1},{"value":"Limits","id":"limits","depth":2},{"value":"Rate Limit Response","id":"rate-limit-response","depth":2},{"value":"Best Practices","id":"best-practices","depth":2},{"value":"1. Implement Retry with Backoff","id":"1-implement-retry-with-backoff","depth":3},{"value":"2. Batch Operations","id":"2-batch-operations","depth":3},{"value":"3. Cache Responses","id":"3-cache-responses","depth":3},{"value":"Monitoring Your Usage","id":"monitoring-your-usage","depth":2}],"frontmatter":{"seo":{"title":"Rate Limits"}},"lastModified":"2026-05-13T06:44:05.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/api-reference/getting-started/rate-limits","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}