Skip to main content
Every array in a person or company record follows one order, the same in API responses, bulk deliveries, Snowflake and the free dataset, so a record always returns its arrays in the same order.

Person Data

Sorting Rules

  • phones[], emails[], locations[], socials[]: current entries first, then entries whose status is unknown, then entries known to have ended; within each, by confidence (high, then moderate, then low), then most recently seen (last_seen), then the number of sources (num_sources). In locations[], the place the top-level city, state and country_code describe goes first, when one matches
  • experience[]: the job the top-level job fields describe first, when one matches; then ongoing jobs (newest start first), then finished jobs (most recent end first), then undated ones
  • education[]: ongoing first (newest start first), then finished (most recent end first), then undated
  • certifications[]: most recently issued first, then by expiration date (latest first)
  • skills[], languages[]: alphabetical by cleaned
  • raw text lists (every raw array, anywhere in the record): alphabetical, ignoring case
Entries that tie on all of the above are ordered by the rest of their content, so the order never changes between requests or deliveries of the same record.

Contact Data Arrays

Phones, Emails, Locations, Socials

The rules above put the best phone or email first. Example phone array:

Experience & Education

When the record has a top-level job, experience[0] is the job shown in job_title, company_name and company_legion_id. The other jobs, and education, follow the rules above.

Skills & Languages

These arrays are sorted alphabetically by the cleaned value:

Certifications

Sorted by issue date, most recent first, then by expiration date:

Company Data

Sorting Rules

  • legion_employee_count_by_month[]: chronological (oldest month first)
  • domains[]: the top-level domain first (when it is listed), then alphabetical by domain
  • locations[]: the primary location first, then offices still operating, then closed ones; each group newest first by last_seen
  • socials[]: by network, then url
  • tickers[]: by symbol, then exchange
  • raw text lists: alphabetical, ignoring case
Company socials[] do not include confidence, num_sources, last_seen, or current fields, so quality-based sorting does not apply. They are ordered by network and url instead. Person socials[] do include these fields and place current items first.

Headcount History

The legion_employee_count_by_month[] array places the oldest month first, so the last entry is the latest count:

Why Deterministic Ordering Matters

  1. Consistency: Same data always appears in the same order
  2. Predictability: experience[0] is the top-level job, locations[0] the top-level place and domains[0] the top-level domain
  3. Filtering: Easier to find primary contact methods
  4. Testing: Deterministic output makes testing and validation easier