Skip to content

Find a segment and fetch the list

A segment is a list of companies, persons or properties that match your filters. Through the API you can size a segment before you buy it, and fetch the full list afterwards.

1. Size the segment with a filter lookup

A filter lookup returns the total count and the first 3 matches. This is every company in bankruptcy proceedings:

Terminal window
curl "https://ownr.dk/api/v2/company/segments?statuses[]=UNDER%20KONKURS" \
-H "Authorization: Bearer ACCESS_TOKEN"
{ "status": "success", "data": { "items": [ ], "count": 7364 } }
  • There is one endpoint per entity type: /company/segments, /person/segments and /property/segments. Every filter is in the reference.
  • Filters your plan does not include are ignored, so count reflects only the filters your plan covers.
  • An unknown parameter gives 400.
  • Filter lookups count against the API quota.

2. Buy the segment in ownr

The purchase itself happens in ownr, not through the API. Build the same segment under Segmenter and buy it there.

3. Fetch the list

GET /segments/downloads lists your purchased segments. Fetch one by its id:

Terminal window
curl "https://ownr.dk/api/v2/segments/downloads/42" \
-H "Authorization: Bearer ACCESS_TOKEN"
  • The answer has 20 rows per page. Use page to move through them.
  • The rows have the same columns as the CSV and XLSX export.
  • A segment that is not paid answers 402.
  • A purchased segment can be fetched for 3 years. An unpaid one expires after 30 days.
  • Downloads of purchased segments do not count against the API quota.

4. Follow the changes

If you subscribe to a segment, ownr sends a webhook when items enter or leave it. See Segment events. In the download, items that have left keep their row, with afgangsdato set.