Skip to content
Console(opens in a new tab)

SearchInput

The input to `search` and `aggregate`.

Match. This input describes the records that you want to find. You pass it to search(searchInput) and aggregate(searchInput).

The input to search and aggregate. Describe the entities to find in fields and set the kind of entity in entityType, or ask a question in plain English in prompt. Use conditions to limit the results. Use output to write the results to a file.

Field Type Part Description
prompt String Match A question in plain English about a business, such as “Give me a company profile for chipotle.com.” The API writes a search query from the question and runs that query in place of this one, and ignores the other fields of the input. Write the question inline, not in a variable, and do not add a selection set to a search that has a prompt. The aggregate query does not accept prompt.
fields [SearchFieldGroupInput] Match A list of field groups to match. Each group describes one identity, such as one business or one person. Do not combine fields with the top-level match fields.
id String Match The ID of the entity to return, of the kind that entityType sets. Prefer fields.
name String Match The name of the business to match. Prefer fields.
address AddressInput Match One address to match. Do not combine it with addresses. Prefer fields.
addresses [AddressInput] Match A list of addresses to match. The search makes one field group for each address and copies the other top-level match fields into each group. Prefer fields.
person PersonInput Match The details of a person to match. Prefer fields.
phoneNumber String Match The phone number to match. Prefer fields.
website String Match The website to match, such as enigma.com. Prefer fields.
tin TinInput Match The taxpayer identification number (TIN) of the business. A tin requires name. Prefer fields.
conditions Conditions Condition Filters, sorts, and limits the results. When the search matches on fields or on the top-level match fields, only limit has an effect.
matchThreshold Float Match The lowest match score, from 0 to 1, that a result must reach. If you omit it, the API picks a threshold from the entity type and the inputs.
entityType EntityType Subject The kind of entity to search for. If you omit it, the search returns brands. One of BRAND, OPERATING_LOCATION, LEGAL_ENTITY, PERSON, ADDRESS.
dataLayer DataLayer Subject Whether the search returns grounded results alone, or ungrounded records too. One of GROUNDED, UNGROUNDED. Default: GROUNDED. See the values.
output OutputSpec File Runs the search as a background task that writes the results to a file, and returns no results in the response. The response lists the task under extensions.backgroundTasks. Use backgroundTask to check the progress of the task.
enrichmentIdsS3Path String File S3 path to parquet file containing internal_id column for filtering
Value Meaning
GROUNDED Resolved entities, and through them the gov-archive records resolved to them, in each entity’s records; Record results come only with UNGROUNDED. The default.
UNGROUNDED GROUNDED results followed by gov-archive records found through links not resolved to an entity, as Record results; select ... on Record to receive them. A record the same search also returns under one of its entities is left out of those records.
query {
search(searchInput: {
entityType: BRAND
name: "Safeway"
conditions: { limit: 1 }
}) {
... on Brand {
id
names(first: 1) { edges { node { name } } }
}
}
}

Response, as returned:

{
"data": {
"search": [
{
"id": "0f26fbef-3436-4f85-8bcd-31fe12a4f99a",
"names": {
"edges": [
{
"node": {
"name": "SAFEWAY"
}
}
]
}
}
]
}
}