Hi,
Looking at the api
curl “https://epsteinexposed.com/api/v1/persons/donald-trump”
returns a blob where “stats”:{“flights”:3,“documents”:200,“connections”:17,“emails”:374}
however on the site Donald Trump - Epstein Files Connection | Epstein Exposed
3 Flights 3,020 Documents 374 Emails 17 Connections
Same with Bill Clinton - Epstein Files Connection | Epstein Exposed and curl “https://epsteinexposed.com/api/v1/persons/bill-clinton”
“stats”: {
“flights”: 38,
“documents”: 200,
“connections”: 14,
“emails”: 195
},
but Bill’s document count is 3,565 Documents
Good catch @VigorousMilkyPenguin. You found a legitimate bug. The /api/v1/persons/:slug endpoint uses a function that has a default query limit of 200 documents, and the stats were being calculated from the length of that result set instead of doing a proper COUNT query. So any person with more than 200 linked documents just shows 200.
I am pushing a fix that uses a dedicated count query instead of fetching all documents and counting the array. Should be live within a day or two.
Thanks for the detailed report, this is exactly the kind of thing that helps us improve the API.
Update: The fix is in. Changed the endpoint to use a dedicated COUNT(*) query against the document_persons table instead of fetching 200 documents and counting the array. Will be live after the next deployment (building now).
Donald Trump should show 3,020+ documents, Bill Clinton 3,565+, etc. The bulk endpoint is also fixed to pull fresh counts from the database on each request instead of using cached startup values.
1 Like