Write me a "GET" API that grab the government regulation data based on topic and publish date. Two key value needed:
- topic (string)
- publication_date (string) The response would be array of regulation data.
The regulation data object is
- abstract (string)
- agencies (array of agency)
- document_number (string)
- excerpts (string)
- html_url (string)
- pdf_url (string)
- public_inspection_pdf_url (string)
- publication_date (string)
- title (string)
- type (string)
In order to get the data:
- You need to hit this government regulation provider which is => https://www.federalregister.gov/api/v1/documents/?conditions[topics]=xxxxx&format=json (GET)
- Pass the topic from your API into the "conditions[topics]".
- Prohibited to pass the publication_date value into the API parameters: "conditions[publication_date][gte]" and "conditions[publication_date][lte]". Use for double checking the result.
Sample of topic:
- air-pollution-control
- agricultural-commodities
- food-additives
- chemicals