Skip to main content
Ordinances, comprehensive plans, staff reports and meeting minutes are text, not rows, so they have their own calls. Ploti collects a place’s ordinances, its zoning code among them, as documents, and you read them like any other document. Search finds the passage that answers a question across many documents. Read opens one section, with a link you can cite. Each call takes a dataset id from a search.

Search documents

documents search takes exactly one of three kinds of search:
  • question: a question in plain words, such as “minimum lot size for self-storage”, matched by meaning. It searches documents and scanned maps, across up to 500 documents, and returns 10 passages unless you ask for up to 25.
  • text: exact words, such as “self-storage”.
  • pattern: a regular expression, up to 256 characters, such as setback.{0,40}feet.
A text or pattern search reads documents only (not scanned maps), up to 100 documents, and returns 25 matches unless you ask for up to 100. Pass all_matches for true totals. Say where to search with datasets, a list of up to 100 document dataset ids, or a place. With neither, it searches your whole coverage. Each match names its document, section and page, so you can open it next.

Read a document

  • documents outline lists a document’s sections and tables in order, 500 a page. Start here to find your way around a long code.
  • documents read reads one section by its section_id, 20,000 characters a page, with a cursor for the rest.
  • documents tables list lists the tables Ploti found inside the document, 200 a page, and documents tables read reads one by its table_id, 200 rows or 20,000 characters a page. Dimensional standards and use tables usually live here.
  • documents download (CLI and Python) writes the whole text to a file: .md or .txt with headings, or .ndjson with a line per section, its title, path and page. Tables are left out. Read them with documents tables read.
datasets files get with original downloads the file Ploti read the document from, such as the PDF. See stored files.

Collections

A collection holds many documents under one dataset id, such as a town’s meeting minutes. Each document in it has a member key.
  • collections documents list lists its documents, with a total, up to 2,000 at once.
  • collections documents search finds words inside its documents, and names the document and page of each match, up to 60 matches.
  • collections documents read opens one document by its member_key, with the full text of every section in one reply, page labels to cite, and a link to its stored file.
documents search does not reach inside a collection’s documents. Use collections documents search for that.