Datasets API endpoint
Returns value counts over the Goodreads authors dataset for the required `facet`, either `genres` or `run_id`. Filters `q`, `name`, `genre`, `run_id`, `min_rating` (0 to 5) and `min_ratings_count` narrow the result, which lists the top 50 values with their counts.
/datasets/goodreads-authors/facetsReturns terms-aggregation counts for one field over the Goodreads authors dataset, honoring the same filters as search.
Query parameters:
facet (required) — one of genres, run_id.q, name, genre, run_id, min_rating, min_ratings_count) apply.Returns {dataset, facet, items:[{value, count}]} (top 50 buckets).
| Field | Filled in, of 50 checked | Values in the sample |
|---|---|---|
| value | 50 | |
| count | 50 | 1,386 to 34,691, median 6,018 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| facet | string | Yes | Facet enum: genres, run_id Allowed values: genres, run_id. | genres | |
| q | string | No | Full-text query over name, about and genres, max 256 characters | ||
| name | string | No | Exact author name filter, max 128 characters | ||
| genre | string | No | Exact genre filter, max 128 characters | ||
| run_id | string | No | Exact crawl run-id filter, max 128 characters | ||
| min_rating | number | No | Minimum average rating, 0 through 5 | ||
| min_ratings_count | integer | No | Minimum number of ratings | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/datasets/goodreads-authors/facets?facet=genres&q=coffee" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"dataset": "goodreads-authors",
"facet": "genres",
"items": [
{
"value": "Fiction",
"count": 312
},
{
"value": "Fantasy",
"count": 180
}
]
}
}Request schema
No body schema
Response schema
#/definitions/datasets.goodreadsAuthorsFacetResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | datasets.GoodreadsAuthorFacetResponse | No | ||||
| data.dataset | string | No | ||||
| data.facet | string | No | ||||
| data.items | array | No | ||||
| data.items[].count | integer | No | ||||
| data.items[].value | string | No | ||||
| 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/goodreads-authors/facets?facet=genres&q=coffee" \
-H "x-api-key: $CRAWLORA_API_KEY"