Datasets API endpoint
Returns value counts for the PitchBook advisors dataset by the required `facet`: `service_type`, `hq_country`, `hq_state` or `run_id`. The counts honour the search filters, including `q`, `min_year_founded` and `max_year_founded`, and list the top 50 values.
/datasets/pitchbook-advisors/facetsReturns terms-aggregation counts for one field over the PitchBook advisors dataset, honoring the same filters as search.
Query parameters:
facet (required) — one of service_type, hq_country, hq_state, run_id.q, service_type, hq_country, hq_state, run_id, min_year_founded, max_year_founded) apply.Returns {dataset, facet, items:[{value, count}]} (top 50 buckets).
| Field | Filled in, of 24 checked | Values in the sample |
|---|---|---|
| value | 24 | |
| count | 24 | 2 to 21,023, median 557 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| facet | string | Yes | Facet enum: service_type, hq_country, hq_state, run_id Allowed values: service_type, hq_country, hq_state, run_id. | service_type | |
| q | string | No | Full-text query over name and description, max 256 characters | ||
| service_type | string | No | Exact service provider type filter, max 128 characters | ||
| hq_country | string | No | Exact headquarters country filter, max 128 characters | ||
| hq_state | string | No | Exact headquarters state/region filter, max 128 characters | ||
| run_id | string | No | Exact crawl run-id filter, max 128 characters | ||
| min_year_founded | integer | No | Minimum founding year | ||
| max_year_founded | integer | No | Maximum founding year | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/datasets/pitchbook-advisors/facets?facet=service_type&q=coffee" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"dataset": "pitchbook-advisors",
"facet": "service_type",
"items": [
{
"value": "Commercial Bank",
"count": 612
},
{
"value": "Investment Bank",
"count": 389
}
]
}
}Request schema
No body schema
Response schema
#/definitions/datasets.pitchbookAdvisorsFacetResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | datasets.PitchbookAdvisorsFacetResponse | No | ||||
| data.dataset | string | No | ||||
| data.facet | string | No | ||||
| data.items | array | No | ||||
| data.items[].count | integer | No | Number of records with this value. | |||
| data.items[].value | string | No | Facet value being counted. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/datasets/pitchbook-advisors/facets?facet=service_type&q=coffee" \
-H "x-api-key: $CRAWLORA_API_KEY"