LibraryOfCongress / api.congress.gov

congress.gov API
601 stars 38 forks source link

First page of `/members` is missing one item #212

Open Gmanicus opened 3 months ago

Gmanicus commented 3 months ago

I happened to stumble across an odd behavior of the API. The /members endpoint does not return the full set for the requested limit when within the range of the first page. It's always one short. Requesting with a limit of 20 yields 19 items. A limit of 250 yields 249. Example below:

Untitled

This leads to a discrepancy when the full dataset has been paged through:

maxOffset: 2519
returnedDataLength: 2518

I wonder if this is just an indexing error or if there's really an item missing from the list.

I also checked the /bills endpoint, but that behaved as expected. From my limited testing, it seems to just be the /members endpoint.

rbram commented 3 months ago

Thanks. We are creating a ticket to investigate this.