REST API
The ESG Hub API provides simple HTTP JSON endpoints to search and retrieve ESG content.
Getting Started
The API is completely open and requires no authentication.
https://esg-hub.ascent.partners/api/v1Quick Start
- Choose an endpoint below (e.g.,
/api/v1/pagesfor articles) - Make a request using cURL, JavaScript, or Python
- Parse the JSON response for the data you need
Code Examples
curl -s "https://esg-hub.ascent.partners/api/v1/pages?limit=3" | jq .Authentication
Endpoints
/api/v1/metaGet metadata about the ESG Hub knowledge base, including article counts, section statistics, and database timestamps.
Request Example
curl -s "https://esg-hub.ascent.partners/api/v1/meta"Response
{
"total_pages": 351,
"total_resources": 244,
"sections": [
{ "name": "environmental", "count": 23 },
{ "name": "governance", "count": 65 }
],
"updated_at": "2026-02-24T12:00:00Z"
}/api/v1/pagesList all ESG articles with optional filtering. Supports filtering by section, pillar, and full-text search.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| section | string | Optional | Filter by section (e.g., 'environmental', 'governance') |
| pillar | string | Optional | Filter by pillar: 'Environmental', 'Social', or 'Governance' |
| q | string | Optional | Full-text search in title and description |
| limit | number | Optional | Results per page (default: 20, max: 100) |
| offset | number | Optional | Pagination offset |
Request Example
# List all pages
curl -s "https://esg-hub.ascent.partners/api/v1/pages?limit=5"
# Filter by section
curl -s "https://esg-hub.ascent.partners/api/v1/pages?section=environmental&limit=10"
# Search for climate
curl -s "https://esg-hub.ascent.partners/api/v1/pages?q=climate&limit=5"Response
{
"data": [
{
"id": "page:abc123",
"title": "Climate Change",
"description": "Understanding climate risks...",
"section": "environmental",
"pillar": "Environmental",
"permalink": "/environmental/climate-change/"
}
],
"pagination": {
"total": 351,
"limit": 5,
"offset": 0,
"has_more": true
}
}/api/v1/pages/:idGet a single page by its ID. Returns full content including markdown and metadata.
Request Example
curl -s "https://esg-hub.ascent.partners/api/v1/pages/page:abc123"Response
{
"id": "page:abc123",
"title": "Climate Change",
"content": "# Climate Change\n\nClimate change refers to...",
"keywords": "climate, carbon, emissions",
"created_at": "2024-01-15T10:30:00Z"
}/api/v1/resourcesList curated external ESG resources. These are links to external articles, reports, and tools.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | Optional | Filter by type: 'article', 'report', 'tool', 'dataset' |
| q | string | Optional | Search in title and description |
| limit | number | Optional | Results per page (default: 20) |
Request Example
# List all resources
curl -s "https://esg-hub.ascent.partners/api/v1/resources?limit=5"
# Filter by type
curl -s "https://esg-hub.ascent.partners/api/v1/resources?type=report&limit=10"Response
{
"data": [
{
"id": "resource:xyz789",
"title": "TCFD Recommendations",
"url": "https://assets.bbhub.io/...",
"type": "report",
"source": "TCFD"
}
],
"pagination": { "total": 244, "limit": 5, "offset": 0 }
}/api/v1/searchFull-text keyword search across all pages and resources. Use this for simple search queries.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| q | string | Required | Search query (required) |
| limit | number | Optional | Results to return (default: 10) |
| source | string | Optional | Filter: 'all', 'pages', or 'resources' |
Request Example
curl -s "https://esg-hub.ascent.partners/api/v1/search?q=carbon+emissions&limit=5"Response
{
"query": "carbon emissions",
"mode": "keyword",
"data": [
{ "title": "Carbon Emissions", "permalink": "/environmental/carbon-emissions/", "score": 0.95 }
],
"total": 12
}/api/v1/searchSemantic vector search using pre-computed embeddings. Send a 384-dimensional embedding vector to find conceptually related content.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| embedding | number[384] | Required | 384-dimensional embedding vector |
| k | number | Optional | Number of results (default: 10, max: 50) |
| source | string | Optional | Filter: 'all', 'pages', or 'resources' |
Request Example
curl -X POST "https://esg-hub.ascent.partners/api/v1/search" \
-H "Content-Type: application/json" \
-d '{"embedding": [0.012, -0.034, 0.056, ...], "k": 5}'Response
{
"query": "[vector]",
"mode": "semantic",
"data": [
{
"title": "Climate Risk Assessment",
"permalink": "/environmental/climate-risk/",
"similarity": 0.748
}
],
"total": 5
}Error Handling
The API returns standard HTTP status codes and error messages.
{
"error": "Missing required parameter: q"
}| Status | Meaning |
|---|---|
| 400 | 400 Bad Request |
| 404 | 404 Not Found |
| 500 | 500 Server Error |