= let
    BaseUrl = "https://api.ldartools.com/v1/Inspections",
    Limit = 10000, // Number of rows per page
    GetPage = (Offset) =>
        let
            Response = Json.Document(Web.Contents(
                BaseUrl,
                [
                    Query =  
                        [limit = Text.From(Limit), 
                         offset = Text.From(Offset),
                         datePerformed.gte = "1/1/2024"],
                    Headers = [
                        Authorization = "Bearer YOUR_API_TOKEN",
                        ContentType = "application/json"
                    ],
                    Timeout = #duration(0, 0, 10, 0)
                ]
            ))
        in
            Response,
    AllPages = List.Generate(
        () => [Offset = 0, Page = GetPage(0)], // Initial state
        each List.Count([Page]) > 0, // Condition to continue fetching
        each [Offset = [Offset] + Limit, Page = GetPage([Offset])], // Next state
        each [Page] // Output
    ),
    CombinedPages = List.Combine(AllPages), // Combine all pages into a single list
    FinalTable = Table.FromList(CombinedPages, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
    FinalTable