-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api call to retrieve packages based on 'publication date' #25
Comments
@nirmalapudota -- thanks for this feedback. This is probably something we'll try to handle with our Search Service (#1), but at a minimum I can think about a way to make it more explicit about the lastModified vs. publish date. |
thank you for the response. getting API results based on "published_date" would be very helpful when wanted to extract data daily and only final published packages. Could you please confirm the below:
Thank you so much. I was looking extracting Federal register packages. From collections/packages/granules JSON output |
https://api.govinfo.gov/packages/FR-2012-04-27/premis <event>
<eventIdentifier>
<eventIdentifierType>FDsys:event</eventIdentifierType>
<eventIdentifierValue>8e09a323-f1e4-464e-9b81-47f901832e94</eventIdentifierValue>
</eventIdentifier>
<eventType>Reprocessed for Access</eventType>
<eventDateTime>2018-12-14T14:04:44-05:00</eventDateTime>
<eventDetail>
11002ee180000964 has reprocessed ACP P0b002ee1825e9e09 for access, which includes deleting and regenerating the granule folder and derived renditions. The content has been reparsed and there may be updates to the descriptive metadata in AIP and ACP.
</eventDetail>
<eventOutcomeInformation>
<eventOutcome>Success</eventOutcome>
</eventOutcomeInformation>
<linkingAgentIdentifier>
<linkingAgentIdentifierType>FDsys:agent</linkingAgentIdentifierType>
<linkingAgentIdentifierValue>11002ee180000964</linkingAgentIdentifierValue>
<linkingAgentRole>implementer</linkingAgentRole>
</linkingAgentIdentifier>
<linkingObjectIdentifier>
<linkingObjectIdentifierType>FDsys</linkingObjectIdentifierType>
<linkingObjectIdentifierValue>P0b002ee1825e9e09</linkingObjectIdentifierValue>
<linkingObjectRole>source</linkingObjectRole>
</linkingObjectIdentifier>
</event> As an aside, since the packageid is predictable, you could construct package service requests for any package via: https://api.govinfo.gov/packages/FR-`YYYY`-`MM`-`DD`/ and use the relevant endpoint for you request, such as: Handling this use case will be one of the first tests for the search service as we work on development. |
thank you. This is very helpful. Will be waiting to see these new features in the API process. Thank you. |
Is there any kind of efficient workaround for this with the current API? We're trying to look at the CFR collection which has over 5000 packages. It seems the last modified dates are all within the last few months even for versions of the packages that are several years old. In our use-case, we would want to grab all the CFR volume entries for a given year. The only two options I can think of seem very wasteful of network resources: either (1) query the whole list, lookup the summary, look up the published date, and then filter the whole list accordingly. That would require a large number of round-trips or (2) enumerate all possible URLs and check whether we picked up all the volumes of each title.. |
@aelfric -- we recently republished a large amount of the content on the system to update some data within our search indices. Currently there's not a way within the API to flag the date values to go by publish date instead of lastModified. That's something we're looking at. My suggestion for the moment would be to look at the CFR sitemaps. These are broken down by year. You could pull the package id out of the sitemap Here's an example for 2019: Once you had that list of package ids, you could grab the zips or whatever content version you wanted by inserting the package id into the api packages service Understandably, this isn't perfect, but might be slightly faster than doing either 1 or 2 above. Let me know if there's anything I can clarify. |
Hello, we are currently previewing a new Some additional features:
@cnizzardini -- this may help with #57 |
Format:https:// api.govinfo.gov/published/ Examples:BILLS issued between January and July 2019: Federal Register and CFR packages in 2019: Required parameters
Optional parameters:
|
Hi,
startDate and endDate parameters are used to search against the lastModified value for the individual packages, Could you let me know if there is a way to get packages based on their publication date?
I was trying to get FR issues published on December 10, 2018. Here is the API call I tried and the JSON response I received.
API Call: https://api.govinfo.gov/collections/FR/2018-12-10T00:00:00Z/2018-12-11T00:00:00Z?offset=0&pageSize=100&api_key=DEMO_KEY
JSON Output: {"count":0,"message":"No results found","nextPage":null,"previousPage":null,"packages":[]}
With the change in Start date like this, I got the result am looking for.
API Call: https://api.govinfo.gov/collections/FR/2018-12-08T00:00:00Z/2018-12-11T00:00:00Z?offset=0&pageSize=100&api_key=DEMO_KEY
JSON Output: {"count":1,"message":null,"nextPage":null,"previousPage":null,"packages":[{"packageId":"FR-2018-12-10","lastModified":"2018-12-08T05:24:32Z","packageLink":"https://api.govinfo.gov/packages/FR-2018-12-10/summary","docClass":"FR","title":"Federal Register Volume 83 Issue 236 (December 10, 2018)","congress":null}]}
I understand that since the last modified date of “FR-2018-12-10” package is 8th December, it didn’t come with my first API call.
I am looking for retrieving all packages published on a specific date.
Thank you.
Nirmala
The text was updated successfully, but these errors were encountered: