diff --git a/gitlab_deps/deps.py b/gitlab_deps/deps.py
index 1839e75ac870b11eb5ee2881f7a772ff72785454..de7b44db9bff08909e5509b483bcdb45f1b68c58 100644
--- a/gitlab_deps/deps.py
+++ b/gitlab_deps/deps.py
@@ -14,10 +14,9 @@ def split_project_branch(project_with_branch):
 
 def list_projects(gl, search_pattern):
     projects = gl.projects.list(
-        all=True,
         search=search_pattern,
         search_namespaces=True,
-        as_list=False,
+        iterator=True,
         simple=True,
         archived=False,
     )
@@ -29,7 +28,7 @@ def get_branches(gl, project_names):
     for path_with_namespace in project_names:
         p = gl.projects.get(path_with_namespace)
         try:
-            branches = p.branches.list()
+            branches = p.branches.list(iterator=True)
         except Exception as e:
             logging.error('error getting branches for %s: %s',
                           path_with_namespace, e)