> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcurrent.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# Response structure

> Full reference for every field in the search response

Every search returns a single JSON object. All top-level fields are always present — disabled features return `null` rather than being omitted.

## Top-level shape

```json theme={null}
{
  "meta": { ... },
  "businesses": [ ... ],
  "regulatory": { ... },
  "sanctions": null,       // null when sanctionsScreening is false
  "website": null,         // null when websiteAnalysis is false
  "errors": null           // null when all sources succeeded
}
```

***

## `meta`

Metadata about the search itself. Your original query is nested under `submitted`.

```json theme={null}
{
  "meta": {
    "searchId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "searchedBy": "user@example.com",
    "searchedAt": "2024-01-15T10:30:00Z",
    "submitted": {
      "name": "Shopify Inc",
      "website": "https://shopify.com",
      "params": {
        "businessRegistry": true,
        "regulatoryRegistry": true,
        "sanctionsScreening": false,
        "sanctionsThreshold": 85,
        "websiteAnalysis": false
      }
    },
    "status": "completed",
    "duration": 24318
  }
}
```

| Field               | Description                                                                                                         |
| ------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `searchId`          | UUID — use with `GET /search/{id}` to retrieve this result later                                                    |
| `searchedBy`        | Email of the user who ran the search (may be null for API keys)                                                     |
| `searchedAt`        | ISO 8601 timestamp of when the search was executed                                                                  |
| `submitted.name`    | The company name you submitted                                                                                      |
| `submitted.website` | Website URL if provided (null otherwise)                                                                            |
| `submitted.params`  | The parameters that were used, with defaults applied                                                                |
| `status`            | `completed`, `completed-with-errors`, `error`, or `loading` (a still-running result fetched via `GET /search/{id}`) |
| `duration`          | Total time in milliseconds                                                                                          |

<Note>
  `completed-with-errors` means at least one data source succeeded. Check the
  `errors` object to see which sources failed.
</Note>

***

## `businesses`

An array of business registry matches, sorted by match confidence.

```json theme={null}
{
  "businesses": [
    {
      "legalName": {
        "name": "Shopify Inc.",
        "matchScore": 0.98
      },
      "match": {
        "score": 0.98,
        "baseline": "query",
        "fields": [
          { "field": "name", "label": "Name", "score": 0.98, "status": "matched" }
        ]
      },
      "entityType": "Corporation",
      "jurisdiction": "Federal",
      "status": "Active",
      "incorporationDate": "2011-09-14",
      "registrationNumbers": [
        { "label": "Federal Corporation Number", "value": "796223-2" },
        { "label": "Business Number (CRA)", "value": "837620872" }
      ],
      "addresses": [
        {
          "label": "Registered Office Location",
          "street": "151 O'Connor Street",
          "city": "Ottawa",
          "province": "Ontario",
          "postalCode": "K2P 2L8",
          "country": "Canada"
        }
      ],
      "alternateNames": ["Shopify", "Shopify Commerce"]
    }
  ]
}
```

| Field                  | Description                                                                                                                                                                                                                               |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `legalName.matchScore` | Name-only confidence that this result matches your query (0–1)                                                                                                                                                                            |
| `match`                | Aggregate identity match (0–1 `score`, `baseline`, per-field `fields`). Scored against your linked business record when the search was created with a `businessId`, otherwise against the query name. Richer than `legalName.matchScore`. |
| `jurisdiction`         | `Federal`, `Ontario`, `British Columbia`, etc.                                                                                                                                                                                            |
| `status`               | `Active`, `Dissolved`, `Cancelled`, etc.                                                                                                                                                                                                  |
| `registrationNumbers`  | All registration IDs with human-readable labels                                                                                                                                                                                           |
| `alternateNames`       | Operating names, DBA names, and aliases                                                                                                                                                                                                   |

***

## `regulatory`

Flat arrays of regulatory registry matches. Empty arrays when no matches are found.

```json theme={null}
{
  "regulatory": {
    "craCharities": [],
    "fintracMsb": [],
    "agcoCannabis": [],
    "healthCanadaCannabis": [],
    "mohServiceProviders": [],
    "bankOfCanadaRps": [],
    "wsibClassifications": [],
    "onBusinessLicences": [],
    "torontoBusinessLicences": [],
    "vancouverBusinessLicences": [],
    "rbqLicences": []
  }
}
```

| Key                         | Registry                          | Regulator                  |
| --------------------------- | --------------------------------- | -------------------------- |
| `craCharities`              | Registered charities              | Canada Revenue Agency      |
| `fintracMsb`                | Money Services Businesses         | FINTRAC                    |
| `agcoCannabis`              | Cannabis retail licences          | AGCO (Ontario)             |
| `healthCanadaCannabis`      | Cannabis production licences      | Health Canada              |
| `mohServiceProviders`       | Health service providers          | Ontario Ministry of Health |
| `bankOfCanadaRps`           | Retail Payments Supervision (RPS) | Bank of Canada             |
| `wsibClassifications`       | Business classifications          | WSIB (Ontario)             |
| `onBusinessLicences`        | Business licences & registrations | Ontario                    |
| `torontoBusinessLicences`   | Business licences & permits       | City of Toronto            |
| `vancouverBusinessLicences` | Business licences                 | City of Vancouver          |
| `rbqLicences`               | Building contractor licences      | Régie du bâtiment (Québec) |

Each item includes `legalName` (`{name, matchScore}`), `registrationNumber`, `status`, `addresses`, and a `sourceUrl` linking to the official registry record.

***

## `sanctions`

Always present in the response. `null` when `sanctionsScreening` is `false`. When enabled, an object with `query`, `totalMatches`, and `matches`. See [Sanctions screening](/guides/sanctions-screening) for full documentation.

<Note>
  This describes the `sanctions` field within a search response. For the standalone `POST /sanctions` endpoint, which has its own `meta`, `screening`, and `sourceCounts` structure, see [Standalone screening](/guides/sanctions-screening#standalone-screening).
</Note>

```json theme={null}
{
  "sanctions": {
    "query": "Shopify Inc",
    "totalMatches": 1,
    "matches": [
      {
        "legalName": {
          "name": "SHOPIFY INC",
          "matchScore": 0.91,
          "matchedName": "SHOPIFY INC",
          "nameScores": [{ "name": "SHOPIFY INC", "score": 0.91 }]
        },
        "alternateNames": [],
        "addresses": [],
        "details": {
          "source": "us-sanctions-ofac-sdn",
          "datasets": ["us-sanctions-ofac-sdn"],
          "countries": ["US"],
          "programs": [],
          "identifiers": [],
          "listingDate": null,
          "dateOfBirth": null,
          "remarks": null
        },
        "sourceUrls": []
      }
    ]
  }
}
```

***

## `website`

Always present in the response. `null` when `websiteAnalysis` is `false` and no `website` URL was provided.

```json theme={null}
{
  "website": {
    "status": "success",
    "url": "https://shopify.com",
    "scrapedAt": "2024-01-15T10:30:00Z",
    "extracted": {
      "legalName": "Shopify Inc.",
      "descriptions": ["Shopify is a commerce platform..."],
      "addresses": [],
      "people": [{ "name": "Tobias Lütke", "roles": ["CEO"] }],
      "contactInfo": { "emails": [], "phoneNumbers": [] },
      "registrations": []
    },
    "industry": {
      "naicsCode": "454110",
      "naicsDescription": "Electronic Shopping and Mail-Order Houses"
    },
    "domain": {
      "url": "https://shopify.com",
      "createdAt": "1996-04-28T00:00:00Z"
    }
  }
}
```

| Field                   | Description                               |
| ----------------------- | ----------------------------------------- |
| `status`                | `success`, `skipped`, `error`, or `empty` |
| `extracted.legalName`   | Legal name found on the website           |
| `extracted.people`      | Named individuals with `roles`            |
| `extracted.contactInfo` | Emails and phone numbers (E.164)          |
| `industry.naicsCode`    | 6-digit NAICS classification code         |
| `domain.createdAt`      | Domain registration date                  |

See [Website analysis](/guides/website-analysis) for full field documentation.

***

## `errors`

Always present in the response. `null` when all sources succeeded. The search can still succeed (`completed-with-errors`) even if some sources fail.

```json theme={null}
{
  "errors": {
    "businessRegistry": {
      "code": "TIMEOUT",
      "message": "Business registry request timed out",
      "retryable": true
    }
  }
}
```

Keys correspond to data sources: `businessRegistry`, `regulatoryRegistry`, `sanctionsScreening`, `websiteAnalysis`. Only failed sources appear — a key's absence means that source succeeded.

See [Error handling](/concepts/errors) for the full list of error codes.
