{"openapi":"3.1.0","info":{"title":"Entity Search API","version":"1.0.0","description":"Test-ready API. CAD 29.99/month; 10000 successful requests per paid billing period, 60/minute/account. Partial licensed-source coverage; no owner-name search. Full REQ excluded."},"servers":[{"url":"https://entitysearch.ca"}],"security":[{"bearerAuth":[]}],"paths":{"/api/v1/companies/":{"get":{"operationId":"searchCompanies","summary":"Search licensed sources with the existing unified search engine","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":120},"description":"Name, supported location combination or local licence category. Owner-name search is unavailable."},{"name":"source","in":"query","schema":{"type":"string","enum":["all","federal","racj","calgary-business-licences","bc-liquor-establishments","toronto-business-licences"],"default":"all"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":1}},{"name":"status","in":"query","schema":{"type":"string","enum":["active","inactive"]},"description":"Requires source=federal."},{"name":"province","in":"query","schema":{"type":"string","enum":["AB","BC","MB","NB","NL","NS","NT","NU","ON","PE","QC","SK","YT"]},"description":"Requires source=federal; filed-office geography, not incorporation jurisdiction."}],"responses":{"200":{"description":"Successful query. Empty results consume one request. Pagination is independent per source group.","content":{"application/json":{"schema":{"type":"object","required":["groups","page","page_size","max_page","pagination","excluded_sources","limitations"],"properties":{"groups":{"type":"array","items":{"type":"object","required":["source","total","records"],"properties":{"source":{"type":"string"},"total":{"type":"integer","minimum":0},"records":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/Company"}}}}},"page":{"type":"integer"},"page_size":{"const":20},"max_page":{"const":50},"pagination":{"type":"string"},"excluded_sources":{"type":"array","items":{"type":"string"}},"limitations":{"type":"string"}}}}},"headers":{"X-Quota-Remaining":{"schema":{"type":"integer","minimum":0}}}},"400":{"description":"See error.code and the bilingual documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"See error.code and the bilingual documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"See error.code and the bilingual documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"See error.code and the bilingual documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate or billing-period quota reached. Retry-After is in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"503":{"description":"See error.code and the bilingual documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{id}/":{"get":{"operationId":"getCompany","summary":"Retrieve one source record by its stable namespaced identifier","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":180},"description":"Use exactly the id returned by search. Federal: federal:{number}; other records retain their existing record_key."}],"responses":{"200":{"description":"One source record. Null means not supplied/not covered, never an inferred absence.","content":{"application/json":{"schema":{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/Company"}}}}}},"400":{"description":"See error.code and the bilingual documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"See error.code and the bilingual documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"See error.code and the bilingual documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"See error.code and the bilingual documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate or billing-period quota reached. Retry-After is in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"503":{"description":"See error.code and the bilingual documentation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"es_<random secret>"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}}}}},"Company":{"type":"object","required":["id","source","record_kind","name","status","city","province","source_updated","profile_url","provenance","organization_relationships","relationship_coverage","owner_names","external_registry"],"properties":{"id":{"type":"string"},"source":{"type":"string","enum":["federal","racj","calgary-business-licences","bc-liquor-establishments","toronto-business-licences"]},"record_kind":{"type":"string","enum":["federal-corporation","permit-holder-observation","licence-observation"]},"name":{"type":"string"},"status":{"type":["string","null"]},"city":{"type":["string","null"]},"province":{"type":["string","null"]},"source_updated":{"type":["string","null"]},"profile_url":{"type":"string","format":"uri"},"provenance":{"type":"object","required":["publisher","url","licence","licence_url","adaptation"],"properties":{"publisher":{"type":"string"},"url":{"type":"string","format":"uri"},"licence":{"type":"string"},"licence_url":{"type":"string","format":"uri"},"adaptation":{"type":"string"},"attribution":{"type":"string"}}},"organization_relationships":{"type":"array","description":"Only two reviewed Wikidata organization relationships across Bell Media, Bell Canada and BCE. Empty does not mean none exist.","items":{"type":"object","required":["property","direction","target","source_url","licence","as_of","reviewed_on","expires_on","scope"],"properties":{"property":{"enum":["P127","P749"]},"direction":{"const":"subject-to-target"},"target":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"en":{"type":"string"},"fr":{"type":"string"}}}}},"source_url":{"type":"string","format":"uri"},"licence":{"const":"CC0-1.0"},"as_of":{"type":"string","format":"date"},"reviewed_on":{"type":"string","format":"date"},"expires_on":{"type":"string","format":"date"},"scope":{"type":"string"}}}},"relationship_coverage":{"enum":["limited-reviewed-supplement","not-covered"]},"owner_names":{"type":"null","description":"Natural-person owners are not supplied or searchable."},"external_registry":{"oneOf":[{"type":"null"},{"type":"object","required":["url","integrated"],"properties":{"url":{"type":"string","format":"uri"},"integrated":{"const":false}}}]}}}}}}