{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/es/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Límites de tarifas","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":"límites-de-tarifas","__idx":0},"children":["Límites de tarifas"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["MoreLogin API aplica límites de tarifas para garantizar un uso justo y la estabilidad del sistema."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"límites","__idx":1},"children":["Límites"]},{"$$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":"Tipo de API"},"children":["Tipo de API"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Límite de tarifa"},"children":["Límite de tarifa"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"ventana"},"children":["ventana"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API locales"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["120 solicitudes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["por minuto"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API abierta"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["120 solicitudes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["por minuto"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"respuesta-de-límite-de-velocidad","__idx":2},"children":["Respuesta de límite de velocidad"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cuando excede el límite de tasa, la API devuelve:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Estado HTTP"]},": ",{"$$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":"mejores-prácticas","__idx":3},"children":["Mejores prácticas"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-implementar-reintento-con-retroceso","__idx":4},"children":["1. Implementar reintento con retroceso"]},{"$$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-operaciones-por-lotes","__idx":5},"children":["2. Operaciones por lotes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["En lugar de realizar llamadas API individuales, utilice puntos finales por lotes cuando estén disponibles:"]},{"$$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-respuestas-en-caché","__idx":6},"children":["3. Respuestas en caché"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Para datos que no cambian con frecuencia (por ejemplo, listas de zonas horarias, listas de plataformas), almacene en caché la respuesta localmente:"]},{"$$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":"monitorear-su-uso","__idx":7},"children":["Monitorear su uso"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Realice un seguimiento de la frecuencia de sus llamadas API. Si se acerca constantemente al límite, considere:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Distribuir solicitudes de manera uniforme a lo largo del minuto"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Usar webhooks (próximamente) en lugar de realizar encuestas"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Combinar múltiples operaciones en llamadas por lotes"]}]}]},"headings":[{"value":"Límites de tarifas","id":"límites-de-tarifas","depth":1},{"value":"Límites","id":"límites","depth":2},{"value":"Respuesta de límite de velocidad","id":"respuesta-de-límite-de-velocidad","depth":2},{"value":"Mejores prácticas","id":"mejores-prácticas","depth":2},{"value":"1. Implementar reintento con retroceso","id":"1-implementar-reintento-con-retroceso","depth":3},{"value":"2. Operaciones por lotes","id":"2-operaciones-por-lotes","depth":3},{"value":"3. Respuestas en caché","id":"3-respuestas-en-caché","depth":3},{"value":"Monitorear su uso","id":"monitorear-su-uso","depth":2}],"frontmatter":{"seo":{"title":"Límites de tarifas"}},"lastModified":"2026-06-10T11:47:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/es/api-reference/getting-started/rate-limits","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}