openapi: 3.0.1 info: title: Trax Codes description: Access the largest collection of up-to-date Canadian building codes and other regulatory information for the construction industry. version: "v1" servers: - url: https://app.trax.co/ai paths: /search: get: operationId: search summary: Search the Canadian Building Codes. parameters: - in: query name: q schema: type: string required: true description: Search Query - in: query name: limit schema: type: integer required: false description: Number of results to return. - in: query name: offset schema: type: integer required: false description: Number of results to skip. - in: query name: jurisdiction schema: type: string required: false description: Jurisdiction to search in. default: "All" enum: [ "All", "Ontario", "Alberta", "National" ] - in: query name: type schema: type: string required: false description: Type of search to perform. All, Figures, Tables use keyword search, searching everthing, just figures or just tables respectivly, while semantic search uses embeddings. default: "All" enum: [ "all", "figures", "tables", "semantic" ] responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/searchResponse" "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' components: responses: BadRequest: title: Bad Request description: Bad Request content: application/json: schema: type: object properties: detail: title: Detail type: string Unauthorized: title: Unauthorized description: Unauthorized content: application/json: schema: type: object properties: detail: title: Detail type: string schemas: searchResponse: type: object properties: docs: type: array items: type: object properties: title: type: string description: The title of the section. content: type: string description: The content of the section. jurisdiction: type: string description: The jurisdiction of the document. url: type: string description: Link to the document section. description: The list of results. totalCount: type: integer description: The total number of results.