How to pull data from pagerduty to build custom dashboard outside PD programmatically

I’m looking for a better way to pull data from pagerduty. currently, with the rest API it is restricted to 10k incident max .

It’s restricted to 10K results - per query. So what you need to do is break your query down into smaller query chunks like last day, last week, last month’s timeframes and iterate over those sliding time windows to pull back everything that you need.