@free-api-list/catalog 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +18 -0
- package/apis/abibliadigital.json +40 -0
- package/apis/administrative-divisions-db.json +22 -0
- package/apis/amiibo.json +18 -0
- package/apis/art-institute-chicago.json +35 -0
- package/apis/balldontlie.json +22 -0
- package/apis/bible-api.json +32 -0
- package/apis/cat-facts-ninja.json +16 -0
- package/apis/cataas.json +39 -0
- package/apis/cheapshark.json +22 -0
- package/apis/chuck-norris.json +25 -0
- package/apis/citybikes.json +18 -0
- package/apis/cloudflare-trace.json +22 -0
- package/apis/corp-buzzwords.json +18 -0
- package/apis/country-is.json +22 -0
- package/apis/daily-cat-facts.json +18 -0
- package/apis/dog-api.json +30 -0
- package/apis/dog-ceo.json +37 -0
- package/apis/emojihub.json +29 -0
- package/apis/free-dictionary.json +22 -0
- package/apis/geojs.json +28 -0
- package/apis/get-the-data.json +22 -0
- package/apis/gutendex.json +25 -0
- package/apis/jcquotes.json +16 -0
- package/apis/longevity-world-cup.json +27 -0
- package/apis/makeup-api.json +22 -0
- package/apis/market-trends-glimpse.json +47 -0
- package/apis/meow-facts.json +21 -0
- package/apis/met-museum.json +44 -0
- package/apis/nekos-best.json +22 -0
- package/apis/poetrydb.json +16 -0
- package/apis/quran-cloud.json +22 -0
- package/apis/random-dog.json +18 -0
- package/apis/shibe-online.json +22 -0
- package/apis/studio-ghibli.json +22 -0
- package/apis/techy.json +22 -0
- package/apis/uk-carbon-intensity.json +22 -0
- package/apis/world-cup-2026-tour.json +37 -0
- package/categories.json +53 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/load.d.ts +18 -0
- package/dist/load.js +92 -0
- package/dist/schema.d.ts +115 -0
- package/dist/schema.js +44 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/package.json +62 -9
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "jcquotes",
|
|
3
|
+
"name": "JCQuotes",
|
|
4
|
+
"description": "An ever-growing list of quotes pulled from James Clear's 3-2-1 newsletter. Random or paginated lookup.",
|
|
5
|
+
"category": "personality",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://www.jcquotes.com/api/quotes",
|
|
8
|
+
"documentationUrl": "https://github.com/MauricioRobayo/jcquotes",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [{ "path": "/random", "method": "GET", "description": "Return a random quote" }],
|
|
11
|
+
"tags": ["quotes", "inspiration"],
|
|
12
|
+
"cors": "unknown",
|
|
13
|
+
"https": true,
|
|
14
|
+
"pricing": "free",
|
|
15
|
+
"addedAt": "2023-06-01"
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "longevity-world-cup",
|
|
3
|
+
"name": "Longevity World Cup",
|
|
4
|
+
"description": "Public JSON data API for a longevity sport platform, including athlete profiles, biological-age rankings, field metadata, and rank-preview data.",
|
|
5
|
+
"category": "health",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://longevityworldcup.com",
|
|
8
|
+
"documentationUrl": "https://longevityworldcup.com/swagger",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{
|
|
12
|
+
"path": "/api/data/athletes",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"description": "Return public athlete profiles and submitted longevity competition results"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "/api/data/fields",
|
|
18
|
+
"method": "GET",
|
|
19
|
+
"description": "Return public field, league, and ranking metadata"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"tags": ["longevity", "health", "open-data", "biological-age"],
|
|
23
|
+
"cors": "yes",
|
|
24
|
+
"https": true,
|
|
25
|
+
"pricing": "free",
|
|
26
|
+
"addedAt": "2026-05-30"
|
|
27
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "makeup-api",
|
|
3
|
+
"name": "Makeup API",
|
|
4
|
+
"description": "Search and retrieve makeup product data: brand, name, price, ingredients, and product images.",
|
|
5
|
+
"category": "health",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "http://makeup-api.herokuapp.com/api/v1",
|
|
8
|
+
"documentationUrl": "http://makeup-api.herokuapp.com/",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{
|
|
12
|
+
"path": "/products.json",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"description": "Search makeup products with optional filters"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"tags": ["beauty", "products", "shopping"],
|
|
18
|
+
"cors": "unknown",
|
|
19
|
+
"https": false,
|
|
20
|
+
"pricing": "free",
|
|
21
|
+
"addedAt": "2023-06-01"
|
|
22
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "market-trends-glimpse",
|
|
3
|
+
"name": "Market Trends & Business Signals (Glimpse)",
|
|
4
|
+
"description": "Unlock business opportunities with the MarketTrends API from Glimpse. Surface hyper-growth niches, compare topics, and forecast trajectories.",
|
|
5
|
+
"category": "business",
|
|
6
|
+
"difficulty": "intermediate",
|
|
7
|
+
"baseUrl": "https://api.meetglimpse.com/v1",
|
|
8
|
+
"documentationUrl": "https://meetglimpse.com/api/",
|
|
9
|
+
"auth": {
|
|
10
|
+
"required": true,
|
|
11
|
+
"type": "api_key",
|
|
12
|
+
"notes": "API key required. See vendor site for pricing and signup."
|
|
13
|
+
},
|
|
14
|
+
"endpoints": [
|
|
15
|
+
{
|
|
16
|
+
"path": "/trends/exploding",
|
|
17
|
+
"method": "GET",
|
|
18
|
+
"description": "Current hyper-growth business niches and insights"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "/trends/:category",
|
|
22
|
+
"method": "GET",
|
|
23
|
+
"description": "Filter trends by industry (e.g. saas, health, sustainability)"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "/trends/forecast/:topic",
|
|
27
|
+
"method": "GET",
|
|
28
|
+
"description": "12-month trend forecast for a topic"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "/trends/compare?topics=topic1,topic2",
|
|
32
|
+
"method": "GET",
|
|
33
|
+
"description": "Compare growth trajectories across topics"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "/signals/emerging?min_growth=:percentage",
|
|
37
|
+
"method": "GET",
|
|
38
|
+
"description": "Identify under-the-radar opportunities by minimum growth threshold"
|
|
39
|
+
},
|
|
40
|
+
{ "path": "/metadata/tags", "method": "GET", "description": "List all available industry tags" }
|
|
41
|
+
],
|
|
42
|
+
"tags": ["business", "trends", "market-research"],
|
|
43
|
+
"cors": "unknown",
|
|
44
|
+
"https": true,
|
|
45
|
+
"pricing": "freemium",
|
|
46
|
+
"addedAt": "2025-11-21"
|
|
47
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "meow-facts",
|
|
3
|
+
"name": "Meow Facts",
|
|
4
|
+
"description": "A simple API that returns a random fact about cats on a GET request. Supports multiple languages and counts.",
|
|
5
|
+
"category": "animals",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://meowfacts.herokuapp.com",
|
|
8
|
+
"documentationUrl": "https://github.com/wh-iterabb-it/meowfacts",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{ "path": "/", "method": "GET", "description": "Retrieve a random cat fact" },
|
|
12
|
+
{ "path": "/?count=3", "method": "GET", "description": "Retrieve multiple cat facts" },
|
|
13
|
+
{ "path": "/?id=3", "method": "GET", "description": "Retrieve a specific cat fact by ID" },
|
|
14
|
+
{ "path": "/?lang=ukr", "method": "GET", "description": "Retrieve a cat fact in Ukrainian" }
|
|
15
|
+
],
|
|
16
|
+
"tags": ["cats", "facts"],
|
|
17
|
+
"cors": "yes",
|
|
18
|
+
"https": true,
|
|
19
|
+
"pricing": "free",
|
|
20
|
+
"addedAt": "2023-06-01"
|
|
21
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "met-museum",
|
|
3
|
+
"name": "The Metropolitan Museum of Art Collection",
|
|
4
|
+
"description": "Open access to metadata on more than 470,000 artworks in the Met's collection. Unrestricted commercial and noncommercial use.",
|
|
5
|
+
"category": "art-design",
|
|
6
|
+
"difficulty": "intermediate",
|
|
7
|
+
"baseUrl": "https://collectionapi.metmuseum.org/public/collection/v1",
|
|
8
|
+
"documentationUrl": "https://metmuseum.github.io/",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{
|
|
12
|
+
"path": "/objects?departmentIds=1",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"description": "List object IDs filtered by department"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "/objects?departmentIds=3|9|12",
|
|
18
|
+
"method": "GET",
|
|
19
|
+
"description": "List object IDs across multiple departments"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"path": "/objects?metadataDate=2018-10-22",
|
|
23
|
+
"method": "GET",
|
|
24
|
+
"description": "List object IDs updated since a date (yyyy-mm-dd)"
|
|
25
|
+
},
|
|
26
|
+
{ "path": "/objects/437133", "method": "GET", "description": "Get a single object by id" },
|
|
27
|
+
{ "path": "/departments", "method": "GET", "description": "List all departments" },
|
|
28
|
+
{
|
|
29
|
+
"path": "/search?isOnView=true&q=sunflower",
|
|
30
|
+
"method": "GET",
|
|
31
|
+
"description": "Search on-view objects by keyword"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "/search?q=sunflowers",
|
|
35
|
+
"method": "GET",
|
|
36
|
+
"description": "Search all objects by keyword"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"tags": ["art", "museum", "images", "open-access"],
|
|
40
|
+
"cors": "yes",
|
|
41
|
+
"https": true,
|
|
42
|
+
"pricing": "free",
|
|
43
|
+
"addedAt": "2023-06-01"
|
|
44
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "nekos-best",
|
|
3
|
+
"name": "nekos.best",
|
|
4
|
+
"description": "A RESTful API serving fully SFW, high-quality anime images and GIFs with metadata.",
|
|
5
|
+
"category": "anime",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://nekos.best/api/v2",
|
|
8
|
+
"documentationUrl": "https://docs.nekos.best/",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{
|
|
12
|
+
"path": "/neko",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"description": "Get a random image or GIF along with metadata"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"tags": ["anime", "images", "gifs"],
|
|
18
|
+
"cors": "yes",
|
|
19
|
+
"https": true,
|
|
20
|
+
"pricing": "free",
|
|
21
|
+
"addedAt": "2023-06-01"
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "poetrydb",
|
|
3
|
+
"name": "PoetryDB",
|
|
4
|
+
"description": "An API for internet poets. Query by author, title, lines, or line count and combine filters as needed.",
|
|
5
|
+
"category": "books",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://poetrydb.org",
|
|
8
|
+
"documentationUrl": "https://github.com/thundercomb/poetrydb/blob/master/README.md",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [{ "path": "/author", "method": "GET", "description": "List all authors" }],
|
|
11
|
+
"tags": ["poetry", "literature"],
|
|
12
|
+
"cors": "yes",
|
|
13
|
+
"https": true,
|
|
14
|
+
"pricing": "free",
|
|
15
|
+
"addedAt": "2023-06-01"
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "quran-cloud",
|
|
3
|
+
"name": "Al Quran Cloud",
|
|
4
|
+
"description": "A free API for fetching the Quran by Juz, Surah, or Ayah with translations and recitations.",
|
|
5
|
+
"category": "books",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://api.alquran.cloud/v1",
|
|
8
|
+
"documentationUrl": "https://alquran.cloud/api",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{
|
|
12
|
+
"path": "/quran/en.asad",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"description": "Full Quran in the Asad English translation"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"tags": ["quran", "religion", "books"],
|
|
18
|
+
"cors": "yes",
|
|
19
|
+
"https": true,
|
|
20
|
+
"pricing": "free",
|
|
21
|
+
"addedAt": "2023-06-01"
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "random-dog",
|
|
3
|
+
"name": "Random Dog",
|
|
4
|
+
"description": "A simple API that returns a random dog picture URL. Useful for placeholder images and fun projects.",
|
|
5
|
+
"category": "animals",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://random.dog",
|
|
8
|
+
"documentationUrl": "https://random.dog/",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{ "path": "/woof.json", "method": "GET", "description": "Retrieve a random dog picture URL" }
|
|
12
|
+
],
|
|
13
|
+
"tags": ["dogs", "images"],
|
|
14
|
+
"cors": "yes",
|
|
15
|
+
"https": true,
|
|
16
|
+
"pricing": "free",
|
|
17
|
+
"addedAt": "2023-06-01"
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "shibe-online",
|
|
3
|
+
"name": "shibe.online",
|
|
4
|
+
"description": "Shibes as a service. Returns random shibe (and optionally cat or bird) image URLs over HTTPS.",
|
|
5
|
+
"category": "animals",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://shibe.online",
|
|
8
|
+
"documentationUrl": "https://shibe.online/",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{
|
|
12
|
+
"path": "/api/shibes?count=1&urls=true&httpsUrls=true",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"description": "Retrieve a random shibe image"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"tags": ["dogs", "shibes", "images"],
|
|
18
|
+
"cors": "yes",
|
|
19
|
+
"https": true,
|
|
20
|
+
"pricing": "free",
|
|
21
|
+
"addedAt": "2023-06-01"
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "studio-ghibli",
|
|
3
|
+
"name": "Studio Ghibli",
|
|
4
|
+
"description": "Catalog of people, places, and things that populate Studio Ghibli films. Hosted on Vercel.",
|
|
5
|
+
"category": "anime",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://ghibliapi.vercel.app",
|
|
8
|
+
"documentationUrl": "https://ghibliapi.vercel.app/",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{
|
|
12
|
+
"path": "/films",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"description": "Information about all of the Studio Ghibli films"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"tags": ["anime", "films", "studio-ghibli"],
|
|
18
|
+
"cors": "yes",
|
|
19
|
+
"https": true,
|
|
20
|
+
"pricing": "free",
|
|
21
|
+
"addedAt": "2023-06-01"
|
|
22
|
+
}
|
package/apis/techy.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "techy",
|
|
3
|
+
"name": "Techy",
|
|
4
|
+
"description": "Generates cool tech-savvy sounding phrases. Useful for placeholder text in tech demos and presentations.",
|
|
5
|
+
"category": "entertainment",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://techy-api.vercel.app/api",
|
|
8
|
+
"documentationUrl": "https://techy-api.vercel.app/",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{
|
|
12
|
+
"path": "/json",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"description": "Return a random tech-sounding phrase as JSON"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"tags": ["jokes", "fun", "text"],
|
|
18
|
+
"cors": "yes",
|
|
19
|
+
"https": true,
|
|
20
|
+
"pricing": "free",
|
|
21
|
+
"addedAt": "2023-06-01"
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "uk-carbon-intensity",
|
|
3
|
+
"name": "UK Carbon Intensity",
|
|
4
|
+
"description": "The official Carbon Intensity API for Great Britain, developed by National Grid. Half-hourly data.",
|
|
5
|
+
"category": "environment",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://api.carbonintensity.org.uk",
|
|
8
|
+
"documentationUrl": "https://api.carbonintensity.org.uk/",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{
|
|
12
|
+
"path": "/intensity",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"description": "Carbon intensity data for the current half hour"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"tags": ["energy", "carbon", "climate"],
|
|
18
|
+
"cors": "yes",
|
|
19
|
+
"https": true,
|
|
20
|
+
"pricing": "free",
|
|
21
|
+
"addedAt": "2023-06-01"
|
|
22
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "world-cup-2026-tour",
|
|
3
|
+
"name": "World Cup 2026 Tour",
|
|
4
|
+
"description": "Free no-auth API for all 104 World Cup 2026 fixtures, local kickoff time conversion, match links, CSV, JSONL, RSS, calendar feeds, and OpenAPI docs.",
|
|
5
|
+
"category": "sports-fitness",
|
|
6
|
+
"difficulty": "beginner",
|
|
7
|
+
"baseUrl": "https://ay-worldcup2026.zeabur.app/api/public/v1",
|
|
8
|
+
"documentationUrl": "https://ay-worldcup2026.zeabur.app/developers",
|
|
9
|
+
"auth": { "required": false, "type": "none" },
|
|
10
|
+
"endpoints": [
|
|
11
|
+
{
|
|
12
|
+
"path": "/metadata",
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"description": "Return API metadata, dataset links, OpenAPI URL, and public feed links"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "/matches?timezone=America/New_York",
|
|
18
|
+
"method": "GET",
|
|
19
|
+
"description": "List all fixtures with kickoff times converted to a requested IANA time zone"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"path": "/matches/{id}",
|
|
23
|
+
"method": "GET",
|
|
24
|
+
"description": "Return one World Cup 2026 match by id"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "/next?timezone=Europe/London",
|
|
28
|
+
"method": "GET",
|
|
29
|
+
"description": "Return the next upcoming fixture for a requested time zone"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"tags": ["world-cup", "football", "soccer", "fixtures", "calendar", "openapi"],
|
|
33
|
+
"cors": "yes",
|
|
34
|
+
"https": true,
|
|
35
|
+
"pricing": "free",
|
|
36
|
+
"addedAt": "2026-06-13"
|
|
37
|
+
}
|
package/categories.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[
|
|
2
|
+
{ "id": "animals", "label": "Animals" },
|
|
3
|
+
{ "id": "anime", "label": "Anime" },
|
|
4
|
+
{ "id": "anti-malware", "label": "Anti-Malware" },
|
|
5
|
+
{ "id": "art-design", "label": "Art & Design" },
|
|
6
|
+
{ "id": "authentication", "label": "Authentication" },
|
|
7
|
+
{ "id": "blockchain", "label": "Blockchain" },
|
|
8
|
+
{ "id": "books", "label": "Books" },
|
|
9
|
+
{ "id": "business", "label": "Business" },
|
|
10
|
+
{ "id": "calendar", "label": "Calendar" },
|
|
11
|
+
{ "id": "cloud", "label": "Cloud" },
|
|
12
|
+
{ "id": "continuous-integration", "label": "Continuous Integration" },
|
|
13
|
+
{ "id": "cryptocurrency", "label": "Cryptocurrency" },
|
|
14
|
+
{ "id": "currency-exchange", "label": "Currency Exchange" },
|
|
15
|
+
{ "id": "data-validation", "label": "Data Validation" },
|
|
16
|
+
{ "id": "development", "label": "Development" },
|
|
17
|
+
{ "id": "dictionary", "label": "Dictionary" },
|
|
18
|
+
{ "id": "documentation", "label": "Documentation & Productivity" },
|
|
19
|
+
{ "id": "email", "label": "Email" },
|
|
20
|
+
{ "id": "entertainment", "label": "Entertainment" },
|
|
21
|
+
{ "id": "environment", "label": "Environment" },
|
|
22
|
+
{ "id": "events", "label": "Events" },
|
|
23
|
+
{ "id": "finance", "label": "Finance" },
|
|
24
|
+
{ "id": "food-drink", "label": "Food & Drink" },
|
|
25
|
+
{ "id": "games-comics", "label": "Games & Comics" },
|
|
26
|
+
{ "id": "geocoding", "label": "Geocoding" },
|
|
27
|
+
{ "id": "government", "label": "Government" },
|
|
28
|
+
{ "id": "health", "label": "Health" },
|
|
29
|
+
{ "id": "jobs", "label": "Jobs" },
|
|
30
|
+
{ "id": "machine-learning", "label": "Machine Learning" },
|
|
31
|
+
{ "id": "music", "label": "Music" },
|
|
32
|
+
{ "id": "news", "label": "News" },
|
|
33
|
+
{ "id": "open-data", "label": "Open Data" },
|
|
34
|
+
{ "id": "open-source", "label": "Open Source" },
|
|
35
|
+
{ "id": "patent", "label": "Patent" },
|
|
36
|
+
{ "id": "personality", "label": "Personality" },
|
|
37
|
+
{ "id": "phone", "label": "Phone" },
|
|
38
|
+
{ "id": "photography", "label": "Photography" },
|
|
39
|
+
{ "id": "programming", "label": "Programming" },
|
|
40
|
+
{ "id": "science-math", "label": "Science & Math" },
|
|
41
|
+
{ "id": "security", "label": "Security" },
|
|
42
|
+
{ "id": "shopping", "label": "Shopping" },
|
|
43
|
+
{ "id": "social", "label": "Social" },
|
|
44
|
+
{ "id": "sports-fitness", "label": "Sports & Fitness" },
|
|
45
|
+
{ "id": "test-data", "label": "Test Data" },
|
|
46
|
+
{ "id": "text-analysis", "label": "Text Analysis" },
|
|
47
|
+
{ "id": "tracking", "label": "Tracking" },
|
|
48
|
+
{ "id": "transportation", "label": "Transportation" },
|
|
49
|
+
{ "id": "url-shortener", "label": "URL Shortener" },
|
|
50
|
+
{ "id": "vehicle", "label": "Vehicle" },
|
|
51
|
+
{ "id": "video", "label": "Video" },
|
|
52
|
+
{ "id": "weather", "label": "Weather" }
|
|
53
|
+
]
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./schema.js";
|
package/dist/load.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ApiEntry, type Category } from "./schema.js";
|
|
2
|
+
export declare const APIS_DIR: string;
|
|
3
|
+
export declare const CATEGORIES_FILE: string;
|
|
4
|
+
export declare class CatalogValidationError extends Error {
|
|
5
|
+
readonly fileName: string;
|
|
6
|
+
readonly issues: string[];
|
|
7
|
+
constructor(fileName: string, issues: string[]);
|
|
8
|
+
}
|
|
9
|
+
export interface LoadCatalogOptions {
|
|
10
|
+
apisDir?: string;
|
|
11
|
+
categoriesFile?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface LoadedCatalog {
|
|
14
|
+
apis: ApiEntry[];
|
|
15
|
+
categories: Category[];
|
|
16
|
+
}
|
|
17
|
+
export declare function loadCatalog(options?: LoadCatalogOptions): LoadedCatalog;
|
|
18
|
+
export declare function loadCategories(categoriesFile?: string): Category[];
|
package/dist/load.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { readdirSync, readFileSync } from "node:fs";
|
|
2
|
+
import { basename, dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { ApiEntrySchema, CategoriesFileSchema } from "./schema.js";
|
|
5
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const PACKAGE_ROOT = join(HERE, "..");
|
|
7
|
+
export const APIS_DIR = join(PACKAGE_ROOT, "apis");
|
|
8
|
+
export const CATEGORIES_FILE = join(PACKAGE_ROOT, "categories.json");
|
|
9
|
+
export class CatalogValidationError extends Error {
|
|
10
|
+
fileName;
|
|
11
|
+
issues;
|
|
12
|
+
constructor(fileName, issues) {
|
|
13
|
+
super(`${fileName}: ${issues.join("; ")}`);
|
|
14
|
+
this.name = "CatalogValidationError";
|
|
15
|
+
this.fileName = fileName;
|
|
16
|
+
this.issues = issues;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function formatZodIssues(error) {
|
|
20
|
+
return error.issues.map((issue) => {
|
|
21
|
+
const path = issue.path.length === 0 ? "<root>" : issue.path.join(".");
|
|
22
|
+
return `field \`${path}\` ${issue.message.toLowerCase()}`;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export function loadCatalog(options = {}) {
|
|
26
|
+
const apisDir = options.apisDir ?? APIS_DIR;
|
|
27
|
+
const categoriesFile = options.categoriesFile ?? CATEGORIES_FILE;
|
|
28
|
+
const categories = loadCategories(categoriesFile);
|
|
29
|
+
const categoryIds = new Set(categories.map((c) => c.id));
|
|
30
|
+
const files = readdirSync(apisDir)
|
|
31
|
+
.filter((f) => f.endsWith(".json"))
|
|
32
|
+
.sort();
|
|
33
|
+
const apis = [];
|
|
34
|
+
const seenIds = new Set();
|
|
35
|
+
for (const file of files) {
|
|
36
|
+
const fullPath = join(apisDir, file);
|
|
37
|
+
const raw = readFileSync(fullPath, "utf8");
|
|
38
|
+
let parsed;
|
|
39
|
+
try {
|
|
40
|
+
parsed = JSON.parse(raw);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
44
|
+
throw new CatalogValidationError(`apis/${file}`, [`is not valid JSON (${message})`]);
|
|
45
|
+
}
|
|
46
|
+
const result = ApiEntrySchema.safeParse(parsed);
|
|
47
|
+
if (!result.success) {
|
|
48
|
+
throw new CatalogValidationError(`apis/${file}`, formatZodIssues(result.error));
|
|
49
|
+
}
|
|
50
|
+
const entry = result.data;
|
|
51
|
+
const expectedId = basename(file, ".json");
|
|
52
|
+
if (entry.id !== expectedId) {
|
|
53
|
+
throw new CatalogValidationError(`apis/${file}`, [
|
|
54
|
+
`field \`id\` is "${entry.id}" but filename implies "${expectedId}"`,
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
if (seenIds.has(entry.id)) {
|
|
58
|
+
throw new CatalogValidationError(`apis/${file}`, [`duplicate id "${entry.id}"`]);
|
|
59
|
+
}
|
|
60
|
+
seenIds.add(entry.id);
|
|
61
|
+
if (!categoryIds.has(entry.category)) {
|
|
62
|
+
throw new CatalogValidationError(`apis/${file}`, [
|
|
63
|
+
`field \`category\` "${entry.category}" is not in categories.json`,
|
|
64
|
+
]);
|
|
65
|
+
}
|
|
66
|
+
apis.push(entry);
|
|
67
|
+
}
|
|
68
|
+
return { apis, categories };
|
|
69
|
+
}
|
|
70
|
+
export function loadCategories(categoriesFile = CATEGORIES_FILE) {
|
|
71
|
+
const raw = readFileSync(categoriesFile, "utf8");
|
|
72
|
+
let parsed;
|
|
73
|
+
try {
|
|
74
|
+
parsed = JSON.parse(raw);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
78
|
+
throw new CatalogValidationError("categories.json", [`is not valid JSON (${message})`]);
|
|
79
|
+
}
|
|
80
|
+
const result = CategoriesFileSchema.safeParse(parsed);
|
|
81
|
+
if (!result.success) {
|
|
82
|
+
throw new CatalogValidationError("categories.json", formatZodIssues(result.error));
|
|
83
|
+
}
|
|
84
|
+
const seen = new Set();
|
|
85
|
+
for (const cat of result.data) {
|
|
86
|
+
if (seen.has(cat.id)) {
|
|
87
|
+
throw new CatalogValidationError("categories.json", [`duplicate id "${cat.id}"`]);
|
|
88
|
+
}
|
|
89
|
+
seen.add(cat.id);
|
|
90
|
+
}
|
|
91
|
+
return result.data;
|
|
92
|
+
}
|