Make your first request
This walkthrough finds an organization and retrieves its full published record. Use a server, terminal or private development environment.
1. Create a key
Create a DefDex account, verify your email,
and open API keys. Create a key with
data:read. Copy the value when it is shown; it is displayed only once.
Load it privately into the DEFDEX_API_KEY environment variable. Do not put it in
a URL, source file, screenshot or browser bundle. The examples below read that
variable and never contain a real key.
2. Find an organization
Search is case-insensitive substring matching. Compare the returned name, website,
country and identifiers before selecting a match; search does not resolve identity.
An empty data array is a successful query with no matches.
A list response has this shape (values below are illustrative):
Actual attributes follow the organization reference. Do not copy the placeholder ID into a real lookup.
3. Retrieve the exact record
Use record_id from the response, encoded as one URL segment:
Install the Python client using the client guide.
attributes.id is the entity UUID used in relationship filters. record_id is the
opaque lookup identifier used by GET /datasets/{dataset}/{record_id}. They are
different values. Website slugs are another identifier; use an exact slug filter
to resolve one.
4. Continue your workflow
Read agencies, programs or awards. To discover
all collections and allowed fields, call GET /datasets. To read more than one
page, follow pagination.
On an error, inspect the status, JSON error and X-Request-Id; see
errors and retries. Avoid cURL verbose output when sharing diagnostics:
it can include the authorization header.
