facets
Pack: opendatasoft · Endpoint: https://gateway.pipeworx.io/opendatasoft/mcp
Retrieve distinct values and counts for a named facet field within an Opendatasoft dataset; useful for enumerating categories or filtering options before querying records.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dataset_id | string | yes | |
facet | string | yes | |
instance | string | no |
Example call
Arguments
{
"dataset_id": "world-cities",
"facet": "country"
}
curl
curl -X POST https://gateway.pipeworx.io/opendatasoft/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"facets","arguments":{"dataset_id":"world-cities","facet":"country"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('facets', {
"dataset_id": "world-cities",
"facet": "country"
});
More examples
{
"dataset_id": "us-census-data",
"facet": "state",
"instance": "public.opendatasoft.com"
}
Response shape
| Field | Type | Description |
|---|---|---|
facets | array | Array of facet items |
Full JSON Schema
{
"type": "object",
"description": "Facet distinct values and counts",
"properties": {
"facets": {
"type": "array",
"description": "Array of facet items",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Facet value"
},
"count": {
"type": "number",
"description": "Number of records with this value"
}
}
}
}
}
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"opendatasoft": {
"url": "https://gateway.pipeworx.io/opendatasoft/mcp"
}
}
}
See Getting Started for client-specific install steps.