Codefact Research Data API
Send an API key in the X-API-Key header for full data access. Create one in the console.
GET/v1/datasetsSearch datasets
Returns complete dataset metadata. Use q for words or an exact dataset id. Results have a stable order and fixed pages of 100; add 100 to offset until the response is empty.
Parameters
| Name | Type | Description |
|---|---|---|
qquery | string | Words or an exact dataset id. |
offsetquery | integer | Results to skip. |
Request
curl "https://data-api.codefact.xyz/v1/datasets?q=beef"Responses
- 200
- Successful Response
- 422
- Validation Error
Datasets
[
{
"id": "worldbank__pink_sheet_monthly__monthly_prices~4aad80e58c91458f",
"type": "series",
"name": "Palm kernel oil",
"source": "worldbank",
"category": "oilseeds-oils",
"attribution": "Data remains attributed to each source named in the table metadata.",
"table_id": "worldbank/pink_sheet_monthly/monthly-prices",
"commodity": "palm-oil",
"measure": "price",
"unit": "tonne",
"currency": "USD",
"location": "Global",
"location_type": "global",
"region": "Global",
"price_basis": "spot",
"frequency": "monthly",
"source_label": "Palm kernel oil",
"value_column": "Palm kernel oil",
"first_period": "1996-01-01",
"last_period": "2026-09-01",
"point_count": 369,
"status": "active"
},
{
"id": "worldbank/pink_sheet_monthly/monthly-prices",
"type": "table",
"name": "monthly-prices",
"source": "worldbank",
"attribution": "Data remains attributed to each source named in the table metadata.",
"columns": [
{
"name": "period",
"type": "DATE",
"nullable": "true",
"role": "date"
},
{
"name": "Crude oil, Brent",
"type": "DECIMAL(38,12)",
"nullable": "true",
"role": "value"
}
],
"row_count": 801,
"retrieved_at": "2026-10-03T00:00:48.003632Z",
"partitions": [
"all"
],
"schema_version": "1"
}
]GET/v1/datasets/{dataset_id}Get dataset data
Returns a series' values in time order, or a table's rows. start and end select a date range: on a table they apply to its time column, which must hold dates. columns, filter, and sort apply to tables only. Add limit to offset until the response is empty. Without an API key the data is a preview.
Parameters
| Name | Type | Description |
|---|---|---|
dataset_idpath | stringrequired | A series id, or a table id in the form provider/dataset/table. |
startquery | string (date) | First date, inclusive. |
endquery | string (date) | Last date, inclusive. |
columnsquery | stringtable only | Table columns to return, comma-separated, such as beginDate,memberStateCode,price. |
filterquery | string[]table only | Table rows where a column has a value, as column:value, such as memberStateCode:FR. Repeat a column to match any of its values. |
sortquery | stringtable only | Table column to sort by, such as price; prefix - to reverse. |
limitquery | integer | Rows per page; 1,000 by default and up to 10,000. A table may have a lower account limit. |
offsetquery | integer | Rows to skip. |
Request
curl "https://data-api.codefact.xyz/v1/datasets/worldbank__pink_sheet_monthly__monthly_prices~4aad80e58c91458f?start=2025-01-01&end=2025-12-31" \
-H "X-API-Key: YOUR_API_KEY"Responses
- 200
- Successful Response
- 400
- A parameter is invalid.
- 401
- The API key is missing or invalid.
- 403
- The account has no active subscription.
- 404
- The dataset does not exist.
- 422
- Validation Error
- 429
- The daily request quota is used up.
[
{
"period_start": "2026-07-01",
"value": 2413
},
{
"period_start": "2026-08-01",
"value": 2264
},
{
"period_start": "2026-09-01",
"value": 2355
}
]