API Documentation
Access our comprehensive database of llms.txt files through our RESTful API
Getting Started
Our API provides programmatic access to the world's largest database of llms.txt files. All endpoints return JSON responses and support pagination for efficient data retrieval.
Quick Start
curl "https://llms-text.ai/api/search-llms?q=openai&limit=5"
Base URL
https://llms-text.ai/api/
All API endpoints are accessed relative to this base URL.
Rate Limits
No authentication required for public endpoints.
Search LLMS.txt Files
Search and filter through our comprehensive database
/api/search-llms
Query Parameters
q
Required Search term to query against domain, URL, title, summary, and metadata fields including topics and purpose rankings.
fileType
Optional Filter by source file type. Options: 'llms.txt'
, 'llms-full.txt'
, 'both'
Default: 'both'
page
Optional Page number for pagination
Default: 1
limit
Optional Results per page (max 50)
Default: 10
Example Request
GET /api/search-llms?q=openai&fileType=llms.txt&page=1&limit=5
Example Response
{
"totalResults": 15,
"page": 1,
"limit": 5,
"results": [
{
"url": "https://openai.com/llms.txt",
"domain": "openai.com",
"content_hash": "a1b2c3d4e5f6...",
"last_checked_utc": "2025-01-06T14:32:10Z",
"title": "OpenAI LLM Guidelines",
"summary": "Official guidelines for AI interaction",
"quality": "High",
"metadata": {
"source_domain": "openai.com",
"url_purpose_ranking": ["AI Guidelines"],
"url_topic_ranking": [
["AI/ML", 456],
["Research", 234]
],
"domain_purpose_ranking": ["AI Research"],
"domain_topic_ranking": [
["AI/ML", 89],
["Research", 45]
],
"url_token_count": 1234
},
"first_added": "2025-01-01T12:00:00Z",
"last_updated": "2025-01-06T14:32:10Z"
}
]
}
Get All Records
Retrieve the complete dataset without search filtering
/api/search-llms-all
This endpoint returns the entire dataset (~50K records). Use with caution as responses may be large.
Example Request
GET /api/search-llms-all
Error Responses
400 Bad Request
{
"error": "Missing or empty search query parameter 'q'."
}
400 Bad Request
{
"error": "Invalid page parameter. Must be a positive integer."
}
Code Examples
JavaScript/Node.js
const response = await fetch(
'https://llms-text.ai/api/search-llms?q=openai&limit=10'
);
const data = await response.json();
console.log(`Found ${data.totalResults} results`);
data.results.forEach(item => {
console.log(`${item.domain}: ${item.title}`);
});
Python
import requests
url = "https://llms-text.ai/api/search-llms"
params = {"q": "openai", "limit": 10}
response = requests.get(url, params=params)
data = response.json()
print(f"Found {data['totalResults']} results")
for item in data['results']:
print(f"{item['domain']}: {item['title']}")
Need Help?
If you encounter any issues or have questions about our API, we're here to help you get the most out of our llms.txt database.