LibraryOfCongress / api.congress.gov

congress.gov API
601 stars 38 forks source link

Where to place amendment actions in the bill action list #226

Open avalatea opened 2 months ago

avalatea commented 2 months ago

Hi! Might end up being more of a question than an issue, but I noticed that congress.gov includes amendment actions at strategic points (sample: HR2882)

Screenshot 2024-04-10 at 10 48 29 AM

However, the /bill/{congress}/{billType}/{billNumber}/actions endpoint does not have this information by itself (HR2882)

Screenshot 2024-04-10 at 10 48 00 AM

I am fairly certain that the actions list in congress.gov comes from composing the amendment actions with the bill actions. However, I am unsure how the system can place the order correctly, especially when so many actions fall on 03/23/2024. How do you guys do this? Can the bill endpoint be updated to also include the amendment actions?

rbram commented 2 months ago

Thank you for reaching out. You are correct that “bill actions” and “amendment actions” are two distinct entities that are concatenated in Congress.gov. Currently, the Congress.gov API doesn’t support displaying both amendment actions and bill actions in the bill actions endpoint. We will add this to our “possible future development” milestone.

avalatea commented 2 months ago

@rbram Thank you for your thoughts. Do you happen to know how congress.gov orders these two different sets of actions when displayed on the congress.gov website?

rbram commented 2 months ago

On Congress.gov, actions are ordered by date/time with the newest action displaying first by default. Users have the ability to sort by “oldest action first,” as well.

For example, if “Action 1” was on 4/10/2024 at 9:00am with the and “Action 2” was on 4/10/2024 at 9:55am, the following list would be how they display by default: • 4/10/2024 Action 2 • 4/10/2024 Action 1 If you add a third action to the list (let’s call it “Amendment Action” that was dated 4/10/2024 at 9:32 am), the list would be: • 4/10/2024 Action 2 • 4/10/2024 Amendment Action • 4/10/2024 Action 1

Here is an example: https://www.congress.gov/bill/118th-congress/house-bill/2882/all-actions?s=4&r=1

avalatea commented 2 months ago

Ahh, thank you! What would be the best way to get the datetime information?

apreiter18 commented 2 months ago

The /amendment/{congress}/{amendmentType}/{amendmentNumber}/actions endpoint provides specific dates for amendments actions. We will discuss the feasibility of adding time to these with our developers. Thanks.

An example: https://api.congress.gov/v3/amendment/117/samdt/2137/actions?api_key=