Getting started
Whereas Search API returns the top, most relevant places, Scan API specializes in returning all records that match a filter.
Use Scan API with a two step process:
- Initialize a scan by defining a
filter. - Scroll through results with a
scroll_id.
Creating a Scan
POST /v1/profilefuse/scan
A scan is created with a filter defined in a POST request:
The response returns the count of matching results, along with a scroll_id to retrieve results:
{
"scroll_id": "b0f142cc5765b8628162",
"count": 1231
}
Scanning Results
GET /v1/profilefuse/scan/:id
After acquiring a scroll_id, retrieve results in pages of up to 200 records.
curl 'https://api.data-axle.com/v1/profilefuse/scan/b0f142cc5765b8628162'
Response:
Continue to use the same scroll_id to retrieve further results.
Keep Alive Between Pages
If unused for over 60 seconds, the scroll_id expires. This means that each page must be requested in intervals less than one minute.
Parameters
Creation Time Parameters
A description of parameters when scroll is first created:
| Parameter | Use | Description |
filters | Yes | Reduce potential results with the Filter DSL. |
perspective | Yes | Pivot the top level object. |
Scroll Parameters
| Parameter | Use | Description |
fields | No | Select the fields returned in the results. |
packages | No | Select packages of fields returned in the results. |
include_labels | No | Get the labels for encoded fields. |
Filters
The filter parameter reduces results to records matching a specified criteria, using the Filter DSL.
Perspective
The perspective pivots the top level record. Read more about perspectives in Delivery Schema.
Fields
By default, all information about a record is returned. The amount of data returned per result can be adjusted with the fields parameter. This can reduce bandwidth and improve performance.
Packages
Select packages of fields by providing a package param_key to the packages parameter. By default, every field on a package is returned. The packages parameter is combined with the fields parameter to return only specified fields.
Include Labels
The fields returned within records frequently contain encoded values that reference lookup data.
To retrieve the labels for lookups, add the include_labels=true option.
curl 'https://api.data-axle.com/v1/profilefuse/scan/b0f142cc5765b8628162?include_labels=true'
Read the Lookups API documentation for more information.