Searching

It's also really easy to search for companies, places and people too. The search API is generic, so it works similarly for the various entity types.

Let's try searching for the company Lasso X:

GET api.lassox.com/v2/providers/CVR/company/search?q=lasso x
{
    "continuationToken": null,
    "hasNextPage": false,
    "totalPages": 1,
    "results": [ // adding ?full=true will return full objects (see "Getting entities")
        {
            "name": "LASSO X ApS",
            "localIdentifierTypeName": "CVR-nummer",
            "localIdentifier": "34580820",
            "accountNumber": null,
            "segment": null,
            "statusCode": "NORMAL",
            "statusText": "NORMAL",
            "companyType": "Anpartsselskab",
            "employees": "5-9",
            "primaryIndustry": "Databehandling, webhosting og lignende serviceydelser",
            "primaryIndustryCode": "631100",
            "secondaryIndustry": "Konsulentbistand vedrørende informationsteknologi",
            "secondaryIndustryCode": "620200",
            "primaryContact": null,
            "places": [], // places omitted for brevity
            "people": null,
            "lassoId": "CVR-1-34580820",
            "entityType": "Company",
            "identifiers": null,
            "address1": "Nørrebrogade 36A 1.",
            "address2": null,
            "zipCode": "2200",
            "postalCode": "2200",
            "city": "København N",
            "country": "Danmark",
            "telephone": "71747812",
            "fax": null,
            "email": "kontakt@lasso.dk",
            "website": "www.lassox.com",
            "houseNo": "36",
            "houseLetter": "A",
            "streetName": "Nørrebrogade"
        }
    ],
    "page": 1,
    "pageSize": 3,
    "resultsFound": 1,
    "resultsReturned": 1
}

Use the query parameter q to search for a name. Replace company with place or person to search for places or people instead

The following parameters can be used to control how results are returned

Name Type Default value Description
q String The string to search for
pagesize Integer 3 The number of results returned
full Boolean false Return all data available from the selected data source

Getting the next page of results

If there are more results than your provided pagesize, the next page of results can be fetched using the returned continuationToken property like below:

GET api.lassox.com/v2/providers/CVR/company/search?cToken=continuationToken

The result of this request will contain a new continuation token for the next page, if available.

Filtering the search results

Using simple keywords in your search query, you are able to narrow down your search results by city, postal code and other properties on the requested entity. This works for both companies, places and people.

To filter the results, add one or more of the below filters to the search query q like so:

Filter Description Type Example
city The city String q=lasso x city:københavn
postalcode The postal code Integer q=lasso x postalcode:2200
street The street name String q=lasso x street:Nørrebrogade
streetno The street number String q=lasso x streetno:36
protected Commercially protected (companies only) Boolean q=lasso x protected:false
email The e-mail String q=lasso x email:lassox.com
telephone The telephone number String q=lasso x telephone:71747812
cvr Related CVR number Integer q=lasso x cvr:34580820

Multiple filters can be combined like so

GET api.lassox.com/v2/providers/CVR/company/search?q=lasso x protected:false postalcode:2200

Sometimes it is necessary to know what entities have changed since a specific date. This is useful for instance if you have service that continuously updates your database with the newest changes from CVR.

To get the entities that have been updated since a certain date, use the following endpoint

GET api.lassox.com/v2/providers/VIRK/company/delta

The following parameters are available:

Name Type Description
since Datetime The minimum value for update time
max Datetime The maximum value for update time (optional)
pagesize Integer The number of results returned
page Integer The page to retrieve
cToken string The continuation token to use
full Boolean Return all data available from the selected data source

For ease of use, use the cToken from a previous request to obtain the next page of results. We recommend using cToken, as manual paging will become obsolete due to changes in the CVR registry.

If more advanced search scenarios are required, contact Lasso X for assistance.

Next up, yearly reports and other useful module endpoints! Go to Module APIs.