Below is the partial M code that only returns 48,000 rows. But I have a workaround. I split into 2 queries, one is {1..30} and the other one is {31..85}. Then I combined the 2 queries and I was able to get all rows (305K now. It used to be 280K). Could the issue be related to "buffers"? Don't know much about it but I thought it might have something to do with that since splitting the query into 2 page sets made it work. Also traced when it stopped working. It was working fine without the need to split until 1/6/2020. On 1/7/2020, it started giving only 48,000 rows.
let
Source = Table.FromColumns({{1..85},{"Forecast"}},{"Page","Version"}),
#"Filled Down" = Table.FillDown(Source, {"Version"}),
#"Changed Type" = Table.TransformColumnTypes(#"Filled Down", {{"Page", type text}, {"Version", type text}}),
#"Invoked Custom Function" = Table.AddColumn(#"Changed Type", "API Pull", each #"API Pull"([Page], [Version])),
#"Removed Errors" = Table.RemoveRowsWithErrors(#"Invoked Custom Function", {"API Pull"}),
#"Expanded API Pull" = Table.ExpandTableColumn(#"Removed Errors", "API Pull", {"Plan", "ID", "Last Name", "First Name", "Pay Rate", "Bonus %", "Commission Annual Amt", "Original Hire Date", "Start Date", "End Date", "Is_Term_Date", "Hired Status", "Offered CTC", "Reason for Hire", "DOJ", "Project Allocation", "Funding", "Benefit_Level", "Excluded_From_Benefits", "Job Title", "Job Function", "Monthly T&E", "Type", "Commission %", "Tier", "Work Location", "Employee_Location", "Hr/Week", "Shift Annual Amount", "Auto Allowance", "Merit %", "Special Adjustment Date", "Special Adjustment %", "Req Nbr", "Contractor's Agency", "Vendor", "Additional Recruitment Cost", "Notes", "BOD Initiative", "Project Category", "Project Initiative", "SVP", "VP", "FSC", "Function", "Jan-2017", "Feb-2017", "Mar-2017", "Apr-2017", "May-2017", "Jun-2017", "Jul-2017", "Aug-2017", "Sep-2017", "Oct-2017", "Nov-2017", "Dec-2017", "Jan-2018", "Feb-2018", "Mar-2018", "Apr-2018", "May-2018", "Jun-2018", "Jul-2018", "Aug-2018", "Sep-2018", "Oct-2018", "Nov-2018", "Dec-2018", "Jan-2019", "Feb-2019", "Mar-2019", "Apr-2019", "May-2019", "Jun-2019", "Jul-2019", "Aug-2019", "Sep-2019", "Oct-2019", "Nov-2019", "Dec-2019", "Jan-2020", "Feb-2020", "Mar-2020", "Apr-2020", "May-2020", "Jun-2020", "Jul-2020", "Aug-2020", "Sep-2020", "Oct-2020", "Nov-2020", "Dec-2020"}, {"Plan", "ID", "Last Name", "First Name", "Pay Rate", "Bonus %", "Commission Annual Amt", "Original Hire Date", "Start Date", "End Date", "Is_Term_Date", "Hired Status", "Offered CTC", "Reason for Hire", "DOJ", "Project Allocation", "Funding", "Benefit_Level", "Excluded_From_Benefits", "Job Title", "Job Function", "Monthly T&E", "Type", "Commission %", "Tier", "Work Location", "Employee_Location", "Hr/Week", "Shift Annual Amount", "Auto Allowance", "Merit %", "Special Adjustment Date", "Special Adjustment %", "Req Nbr", "Contractor's Agency", "Vendor", "Additional Recruitment Cost", "Notes", "BOD Initiative", "Project Category", "Project Initiative", "SVP", "VP", "FSC", "Function", "Jan-2017", "Feb-2017", "Mar-2017", "Apr-2017", "May-2017", "Jun-2017", "Jul-2017", "Aug-2017", "Sep-2017", "Oct-2017", "Nov-2017", "Dec-2017", "Jan-2018", "Feb-2018", "Mar-2018", "Apr-2018", "May-2018", "Jun-2018", "Jul-2018", "Aug-2018", "Sep-2018", "Oct-2018", "Nov-2018", "Dec-2018", "Jan-2019", "Feb-2019", "Mar-2019", "Apr-2019", "May-2019", "Jun-2019", "Jul-2019", "Aug-2019", "Sep-2019", "Oct-2019", "Nov-2019", "Dec-2019", "Jan-2020", "Feb-2020", "Mar-2020", "Apr-2020", "May-2020", "Jun-2020", "Jul-2020", "Aug-2020", "Sep-2020", "Oct-2020", "Nov-2020", "Dec-2020"}),
#"Removed Columns" = Table.RemoveColumns(#"Expanded API Pull", {"Page"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Removed Columns", {{"Original Hire Date", type date}, {"Start Date", type date}, {"End Date", type date}, {"Pay Rate", type number}, {"Commission Annual Amt", type number}, {"Plan", type text}, {"ID", type text}, {"Last Name", type text}, {"First Name", type text}, {"Is_Term_Date", type text}, {"Hired Status", type text}, {"Reason for Hire", type text}, {"DOJ", type text}, {"Project Allocation", type text}, {"Funding", type text}, {"Benefit_Level", type text}, {"Excluded_From_Benefits", type text}, {"Job Title", type text}, {"Job Function", type text}, {"Type", type text}, {"Offered CTC", type number}, {"Monthly T&E", type number}, {"Auto Allowance", type number}, {"Shift Annual Amount", type number}, {"Hr/Week", Int64.Type}, {"Tier", type text}, {"Work Location", type text}, {"Special Adjustment Date", type date}, {"Req Nbr", type text}, {"Contractor's Agency", type text}, {"Vendor", type text}, {"Notes", type text}, {"Additional Recruitment Cost", Int64.Type}, {"Employee_Location", type text}}),
#"Changed Type2" = Table.TransformColumnTypes(#"Changed Type1", {{"Jan-2017", type number}, {"Feb-2017", type number}, {"Mar-2017", type number}, {"Apr-2017", type number}, {"May-2017", type number}, {"Jun-2017", type number}, {"Jul-2017", type number}, {"Aug-2017", type number}, {"Sep-2017", type number}, {"Oct-2017", type number}, {"Nov-2017", type number}, {"Dec-2017", type number}, {"Jan-2018", type number}, {"Feb-2018", type number}, {"Mar-2018", type number}, {"Apr-2018", type number}, {"May-2018", type number}, {"Jun-2018", type number}, {"Jul-2018", type number}, {"Aug-2018", type number}, {"Sep-2018", type number}, {"Oct-2018", type number}, {"Nov-2018", type number}, {"Dec-2018", type number}, {"Jan-2019", type number}, {"Feb-2019", type number}, {"Mar-2019", type number}, {"Apr-2019", type number}, {"May-2019", type number}, {"Jun-2019", type number}, {"Jul-2019", type number}, {"Aug-2019", type number}, {"Sep-2019", type number}, {"Oct-2019", type number}, {"Nov-2019", type number}, {"Dec-2019", type number}, {"Special Adjustment %", type number}, {"Merit %", type number}, {"Commission %", type number}, {"Bonus %", type number}, {"Jan-2020", type number}, {"Feb-2020", type number}, {"Mar-2020", type number}, {"Apr-2020", type number}, {"May-2020", type number}, {"Jun-2020", type number}, {"Jul-2020", type number}, {"Aug-2020", type number}, {"Sep-2020", type number}, {"Oct-2020", type number}, {"Nov-2020", type number}, {"Dec-2020", type number}}),
...