Your first API request.
Make your first Weavers API request with cURL, JavaScript or Python. Retrieve public market niches without an API key and learn how to handle the response.
1. Request a small list
Run this command in a terminal with cURL installed. No account, key or Weavers SDK is required.
curl --fail-with-body 'https://api.weavers.app/api/niches?limit=5'2. Read the JSON response
A successful response has a niches array. It can be empty. When entries exist, displayName describes the niche and a non-null nicheKey identifies its detail endpoint.
{
"niches": [
{
"nicheId": 1,
"nicheKey": "example-niche",
"displayName": "Example research niche",
"source": "platform",
"visibility": "public",
"membershipKind": "static",
"targetRegime": null,
"assetType": "ETF",
"countryCode": "US",
"exchange": null,
"certifiedCount": 0,
"liveCount": 0,
"medianDailyDollarVolume": null,
"realizedVolatility": null,
"crossSectionalDispersion": null,
"historyDepthDays": null,
"pricedConstituentCount": null,
"metricsAsOfDate": null
}
]
}These are example values, not live market data. Null metrics are unavailable, not zero.
3. Inspect one niche
Copy a real nicheKey from your response into GET /api/niches/{nicheKey}. The response contains the research context, certified set, evidence and limitations. See the niche detail reference for sort options.
Use your preferred language
The JavaScript example uses modern Node.js with built-in fetch. The Python example uses the standard library; HTTP errors raise an exception.
curl --fail-with-body 'https://api.weavers.app/api/niches?limit=5'const response = await fetch("https://api.weavers.app/api/niches?limit=5", {
signal: AbortSignal.timeout(15000),
});
if (!response.ok) {
throw new Error(`Weavers API returned ${response.status}`);
}
const data = await response.json();
console.log(data);import json
from urllib.request import urlopen
with urlopen("https://api.weavers.app/api/niches?limit=5", timeout=15) as response:
data = json.load(response)
print(data)Before integrating
- Set request timeouts and bounded retries.
- Handle empty lists, null values and non-success status codes.
- Keep the API hostname
api.weavers.appin your client configuration. - Read the request limits and error guidance.
Next: discover published strategies or read stored price channels.