{"id":873,"date":"2025-03-10T10:35:42","date_gmt":"2025-03-10T09:35:42","guid":{"rendered":"https:\/\/www.syntera.ch\/blog\/?p=873"},"modified":"2025-03-12T15:20:54","modified_gmt":"2025-03-12T14:20:54","slug":"how-to-handle-api-pagination-in-power-bi","status":"publish","type":"post","link":"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/","title":{"rendered":"How to Handle API Pagination in Power BI"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-f56f613f wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-post-author has-medium-font-size\"><div class=\"wp-block-post-author__avatar\"><img alt='' src='https:\/\/secure.gravatar.com\/avatar\/bd3589b8a6ccc62e37c3cee8f8e06c73a4085816337ad7d6c154e30dc60cc4c1?s=48&#038;d=mm&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/bd3589b8a6ccc62e37c3cee8f8e06c73a4085816337ad7d6c154e30dc60cc4c1?s=96&#038;d=mm&#038;r=g 2x' class='avatar avatar-48 photo' height='48' width='48' \/><\/div><div class=\"wp-block-post-author__content\"><p class=\"wp-block-post-author__byline\">LEAD DATA ENGINEERING<\/p><p class=\"wp-block-post-author__name\">Dominic Schranz<\/p><\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\">\n<ul class=\"wp-block-outermost-social-sharing alignright has-small-icon-size has-icon-color is-style-logos-only is-content-justification-left is-layout-flex wp-container-outermost-social-sharing-is-layout-fa5e4718 wp-block-outermost-social-sharing-is-layout-flex\"><li style=\"color: #1a4548\" class=\"outermost-social-sharing-link outermost-social-sharing-link-linkedin has-primary-color wp-block-outermost-social-sharing-link\">\n\t<a href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.syntera.ch%2Fblog%2F2025%2F03%2F10%2Fhow-to-handle-api-pagination-in-power-bi%2F&#038;title=How%20to%20Handle%20API%20Pagination%20in%20Power%20BI\" aria-label=\"Share on LinkedIn\" rel=\"noopener nofollow\" target=\"_blank\" class=\"wp-block-outermost-social-sharing-link-anchor\">\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z\"><\/path><\/svg>\t\t<span class=\"wp-block-outermost-social-sharing-link-label screen-reader-text\">\n\t\t\tShare on LinkedIn\t\t<\/span>\n\t<\/a>\n<\/li>\n\n\n<li style=\"color: #1a4548\" class=\"outermost-social-sharing-link outermost-social-sharing-link-mail has-primary-color wp-block-outermost-social-sharing-link\">\n\t<a href=\"mailto:?subject=How%20to%20Handle%20API%20Pagination%20in%20Power%20BI&#038;body=How%20to%20Handle%20API%20Pagination%20in%20Power%20BI%20&mdash;%20https%3A%2F%2Fwww.syntera.ch%2Fblog%2F2025%2F03%2F10%2Fhow-to-handle-api-pagination-in-power-bi%2F\" aria-label=\"Email this Page\"  class=\"wp-block-outermost-social-sharing-link-anchor\">\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M20,4H4C2.895,4,2,4.895,2,6v12c0,1.105,0.895,2,2,2h16c1.105,0,2-0.895,2-2V6C22,4.895,21.105,4,20,4z M20,8.236l-8,4.882 L4,8.236V6h16V8.236z\"><\/path><\/svg>\t\t<span class=\"wp-block-outermost-social-sharing-link-label screen-reader-text\">\n\t\t\tEmail this Page\t\t<\/span>\n\t<\/a>\n<\/li>\n\n\n<li style=\"color: #1a4548\" class=\"outermost-social-sharing-link outermost-social-sharing-link-whatsapp has-primary-color wp-block-outermost-social-sharing-link\">\n\t<a href=\"https:\/\/api.whatsapp.com\/send?text=How%20to%20Handle%20API%20Pagination%20in%20Power%20BI%20&mdash;%20https%3A%2F%2Fwww.syntera.ch%2Fblog%2F2025%2F03%2F10%2Fhow-to-handle-api-pagination-in-power-bi%2F\" aria-label=\"Share on WhatsApp\" rel=\"noopener nofollow\" target=\"_blank\" class=\"wp-block-outermost-social-sharing-link-anchor\">\n\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z\"><\/path><\/svg>\t\t<span class=\"wp-block-outermost-social-sharing-link-label screen-reader-text\">\n\t\t\tShare on WhatsApp\t\t<\/span>\n\t<\/a>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Getting data from web sources in Power BI is often straightforward with an HTTP request to a web service. The Power Query M formula language provides the <code>Web.Contents<\/code> function, which can retrieve results from APIs. However, most APIs impose limits on the number of results returned per request &#8211; a mechanism known as <strong>pagination<\/strong>. To retrieve all available data, the client must send multiple requests to fetch additional pages.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Handling pagination in Power Query for Power BI is an advanced technique that requires some experience. This blog post presents a solution using recursive function calls, which is also supported in the Power BI Service without the dreaded <strong>&#8220;Can&#8217;t Refresh Dynamic Data Source&#8221;<\/strong> error.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#ebf6f7\">All steps are using the open Star Wars API at <a href=\"https:\/\/swapi.dev\">https:\/\/swapi.dev<\/a> so anyone can reproduce the steps on their own.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">The Problem<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">There are two main problems we need to solve to get all the data:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Handle the pagination<\/li>\n\n\n\n<li>Ensure the solution works in Power BI Service<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Lets have a look at the pagination. Via Web.Contents we can get data from an API. Here is an example written in a new  query:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"216\" src=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-1-1024x216.png\" alt=\"\" class=\"wp-image-875\" srcset=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-1-1024x216.png 1024w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-1-300x63.png 300w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-1-768x162.png 768w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-1-1536x324.png 1536w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-1.png 1951w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">From this API Call, we get the first 10 of 60 results and a next link:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"474\" height=\"139\" src=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-2.png\" alt=\"\" class=\"wp-image-876\" srcset=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-2.png 474w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-2-300x88.png 300w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now we need to build a function which starts from our first API call and iteratively calls the next link if it is existing while concatenating the results. This is called a <strong>recursive function<\/strong>: an algorithm that calls itself iteratively with modified parameters. If we implement this in Power Query, we have solved problem 1 and it would work fine in Power BI Desktop.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, in Power BI Service the implementation with a complete next link will raise problem 2: the query can&#8217;t be refreshed within the Power BI Service. This is because it would result in a so called &#8220;Dynamic Data Source&#8221;, a <a href=\"https:\/\/learn.microsoft.com\/en-us\/power-bi\/connect-data\/refresh-data#refresh-and-dynamic-data-sources\">data source in which some or all of the information required to connect can&#8217;t be determined until Power Query runs its query.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To solve the second problem, we can use the query parameters of the Web.Contents function. As long as the base URL for the data source is not completely altered, we are allowed to change the relative path and query parameters freely. Power BI Service will identify the static web URL as the source and therefore won&#8217;t treat it as a dynamic data source:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"278\" src=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-5-1024x278.png\" alt=\"\" class=\"wp-image-881\" srcset=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-5-1024x278.png 1024w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-5-300x81.png 300w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-5-768x208.png 768w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-5-1536x416.png 1536w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-5.png 1804w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So to implement it correctly, we need to extract the next page number from the next link and add it to the query parameters.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">The Solution<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">First we need to build our function which can call itself with changed query parameters (full code to copy paste at the end of the post). The picture below shows a possible implementation of such a function:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"279\" src=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-9-1024x279.png\" alt=\"\" class=\"wp-image-886\" srcset=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-9-1024x279.png 1024w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-9-300x82.png 300w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-9-768x210.png 768w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-9.png 1275w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now we just need to call our function with empty query parameters and Power Query will iterate as long as there is a next link provided. Afterwards, it&#8217;s just converting the results list into a table and expanding the records:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"718\" src=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-10-1024x718.png\" alt=\"\" class=\"wp-image-887\" srcset=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-10-1024x718.png 1024w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-10-300x210.png 300w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-10-768x539.png 768w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-10-1536x1078.png 1536w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-10.png 1629w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To validate the query and its data inside, we pull together some rudimentary visuals in a report. The picture below shows that 60 planets have indeed been retrieved:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"498\" src=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-7-1024x498.png\" alt=\"\" class=\"wp-image-883\" srcset=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-7-1024x498.png 1024w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-7-300x146.png 300w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-7-768x374.png 768w, https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/02\/image-7.png 1091w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">The Conclusion<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">There are multiple ways in which pagination is implemented but all variants should be solvable with the general approach presented here. Note that this solution would terminate early if an API call results in an error because no next link would be retrieved in this case and the function would not retry the current call.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let me know if you want the full Power BI file. <br>Cheers.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Code<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>let\n    \/\/ Recursive function to call a api based on the initial parameters\n    FetchData = (query as nullable record) as list =&gt;\n        let\n            \/\/ Calling the web service with the fixed parameters for headers and relative path while adding the variable query data\n            Source = Json.Document(Web.Contents(url, &#91;Headers = headers, RelativePath = relative_path, Query = query])),\n            \/\/ Store the retrieved results\n            data = try Source&#91;results] otherwise {}, \n            \/\/ Try to get the next link if it is present and extract the page number\n            next_page = try Text.Split(Text.Split(Source&#91;next], \"?page=\"){1}, \"&amp;\"){0} otherwise null,\n            \/\/ if there is a next link, the function calls itself again with the new query parameters to get the next page\n            next_result = if next_page &lt;&gt; null then @FetchData(&#91;page = next_page]) else {}\n        in\n            \/\/ Combine current page data with next page data to a list\n            List.Combine({data, next_result}),\n\n    url = \"https:\/\/swapi.dev\/api\", \/\/ the base url of our api\n    \/\/ using relative paths and query settings we can ensure the function call \n    \/\/ does not result in a dynamic data source and will work in the power bi service\n    relative_path = \"planets\", \/\/ This can also just be in the base url but its a more flexible approach if other endpoints should also be queried\n    query = &#91;], \/\/ This holds query parameters and will be useful once we start iterating. For the moment, just keep an empty record.\n    headers = &#91;#\"Content-Type\" = \"application\/json\"], \/\/ Here you could add authorization parameters if necessary #\"authorization\" = \"Bearer \" &amp; Token\n    \n    \/\/ Call the recursive function starting from the base url\n    results = FetchData(query),\n\n    \/\/ Converting the results into a usable table\n    #\"Converted to Table\" = Table.FromList(results, Splitter.SplitByNothing(), null, null, ExtraValues.Error),\n    #\"Expanded Column1\" = Table.ExpandRecordColumn(#\"Converted to Table\", \"Column1\", {\"name\", \"rotation_period\", \"orbital_period\", \"diameter\", \"climate\", \"gravity\", \"terrain\", \"population\"}, {\"name\", \"rotation_period\", \"orbital_period\", \"diameter\", \"climate\", \"gravity\", \"terrain\", \"population\"}),\n    #\"Replaced Value\" = Table.ReplaceValue(#\"Expanded Column1\",\"unknown\",null,Replacer.ReplaceValue,{\"name\", \"rotation_period\", \"orbital_period\", \"diameter\", \"climate\", \"gravity\", \"terrain\", \"population\"}),\n    #\"Changed Type\" = Table.TransformColumnTypes(#\"Replaced Value\",{{\"population\", Int64.Type}, {\"rotation_period\", type number}, {\"orbital_period\", type number}, {\"diameter\", type number}})\nin\n    #\"Changed Type\"<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>Getting data from web sources in Power BI is often straightforward with an HTTP request to a web service. The Power Query M formula language provides the Web.Contents function, which can retrieve results from APIs. However, most APIs impose limits on the number of results returned per request &#8211; a mechanism known as pagination. To [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":890,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,5,7],"tags":[6],"class_list":["post-873","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allgemein","category-business-intelligence","category-data-engineering","tag-power-bi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Handle API Pagination in Power BI - Syntera<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Handle API Pagination in Power BI - Syntera\" \/>\n<meta property=\"og:description\" content=\"Getting data from web sources in Power BI is often straightforward with an HTTP request to a web service. The Power Query M formula language provides the Web.Contents function, which can retrieve results from APIs. However, most APIs impose limits on the number of results returned per request &#8211; a mechanism known as pagination. To [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/\" \/>\n<meta property=\"og:site_name\" content=\"Syntera\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-10T09:35:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-12T14:20:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/03\/image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1185\" \/>\n\t<meta property=\"og:image:height\" content=\"729\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Dominic Schranz\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dominic Schranz\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/\",\"url\":\"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/\",\"name\":\"How to Handle API Pagination in Power BI - Syntera\",\"isPartOf\":{\"@id\":\"https:\/\/www.syntera.ch\/blog\/#website\"},\"datePublished\":\"2025-03-10T09:35:42+00:00\",\"dateModified\":\"2025-03-12T14:20:54+00:00\",\"author\":{\"@id\":\"https:\/\/www.syntera.ch\/blog\/#\/schema\/person\/e038d1dcebeca2193c5503f78783988d\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.syntera.ch\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Handle API Pagination in Power BI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.syntera.ch\/blog\/#website\",\"url\":\"https:\/\/www.syntera.ch\/blog\/\",\"name\":\"Syntera\",\"description\":\"translating data into business value.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.syntera.ch\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.syntera.ch\/blog\/#\/schema\/person\/e038d1dcebeca2193c5503f78783988d\",\"name\":\"Dominic Schranz\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.syntera.ch\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bd3589b8a6ccc62e37c3cee8f8e06c73a4085816337ad7d6c154e30dc60cc4c1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bd3589b8a6ccc62e37c3cee8f8e06c73a4085816337ad7d6c154e30dc60cc4c1?s=96&d=mm&r=g\",\"caption\":\"Dominic Schranz\"},\"url\":\"https:\/\/www.syntera.ch\/blog\/author\/domi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Handle API Pagination in Power BI - Syntera","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/","og_locale":"en_US","og_type":"article","og_title":"How to Handle API Pagination in Power BI - Syntera","og_description":"Getting data from web sources in Power BI is often straightforward with an HTTP request to a web service. The Power Query M formula language provides the Web.Contents function, which can retrieve results from APIs. However, most APIs impose limits on the number of results returned per request &#8211; a mechanism known as pagination. To [&hellip;]","og_url":"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/","og_site_name":"Syntera","article_published_time":"2025-03-10T09:35:42+00:00","article_modified_time":"2025-03-12T14:20:54+00:00","og_image":[{"width":1185,"height":729,"url":"https:\/\/www.syntera.ch\/blog\/wp-content\/uploads\/2025\/03\/image.png","type":"image\/png"}],"author":"Dominic Schranz","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Dominic Schranz","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/","url":"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/","name":"How to Handle API Pagination in Power BI - Syntera","isPartOf":{"@id":"https:\/\/www.syntera.ch\/blog\/#website"},"datePublished":"2025-03-10T09:35:42+00:00","dateModified":"2025-03-12T14:20:54+00:00","author":{"@id":"https:\/\/www.syntera.ch\/blog\/#\/schema\/person\/e038d1dcebeca2193c5503f78783988d"},"breadcrumb":{"@id":"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.syntera.ch\/blog\/2025\/03\/10\/how-to-handle-api-pagination-in-power-bi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.syntera.ch\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Handle API Pagination in Power BI"}]},{"@type":"WebSite","@id":"https:\/\/www.syntera.ch\/blog\/#website","url":"https:\/\/www.syntera.ch\/blog\/","name":"Syntera","description":"translating data into business value.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.syntera.ch\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.syntera.ch\/blog\/#\/schema\/person\/e038d1dcebeca2193c5503f78783988d","name":"Dominic Schranz","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.syntera.ch\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/bd3589b8a6ccc62e37c3cee8f8e06c73a4085816337ad7d6c154e30dc60cc4c1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bd3589b8a6ccc62e37c3cee8f8e06c73a4085816337ad7d6c154e30dc60cc4c1?s=96&d=mm&r=g","caption":"Dominic Schranz"},"url":"https:\/\/www.syntera.ch\/blog\/author\/domi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/posts\/873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/comments?post=873"}],"version-history":[{"count":6,"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/posts\/873\/revisions"}],"predecessor-version":[{"id":892,"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/posts\/873\/revisions\/892"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/media\/890"}],"wp:attachment":[{"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/media?parent=873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/categories?post=873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.syntera.ch\/blog\/wp-json\/wp\/v2\/tags?post=873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}