Retrieving Documents
To retrieve a list of documents, send aGET request to the /documents endpoint. For example, the following request retrieves Maryland documents published since October that mention data centers:
/documents endpoint accepts the jurisdiction, publisher, category, q, published_after, published_before, topic, and updated_since query parameters. They behave just like their bill counterparts.
The Document Object
A document looks like the following. The values below are illustrative:Document Text
TheGET /documents/{id}/text endpoint returns a document’s plain text. Depending on the source, this is either the text the publisher released or the text we extracted from its files, using OCR for scans. As with bill texts, the text_method attribute tells you which.
Publishers
TheGET /publishers endpoint returns the sources your account may access, along with the jurisdiction each one belongs to. You may pass a publisher’s id to the publisher parameter of the /documents endpoint.
Events
When a document announces a meeting, a hearing, or a comment deadline, PolicyMate records it as an event linked to that document. TheGET /events endpoint accepts the jurisdiction, type, starts_after, and starts_before query parameters. An event’s type is one of meeting, vote, deadline, consultation, or other.