| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This subject folder contains the code for the Article API endpoints:
Related: The /llms.txt endpoint (middleware in src/frame/middleware/llms-txt.ts) provides AI-friendly content discovery using these APIs.
Article API endpoints allow consumers to query GitHub Docs for listings of current articles, and for specific article information.
The /api/article/meta endpoint powers hovercards, which provide a preview for internal links on <docs.github.com>.
The /api/article endpoints return information about a page by pathname.
api/article/meta is highly cached, in JSON format.
For internal folks ask in the Docs Engineering slack channel.
For open source folks, please open a discussion in the public repository.
Get article metadata and content in a single object. Equivalent to calling /article/meta concatenated with /article/body.
Parameters:
Returns: (object) - JSON object with article metadata and content (meta and body keys)
Throws:
Example:
❯ curl -s "https://docs.github.com/api/article?pathname=/en/get-started/start-your-journey/about-github-and-git"
{
"meta": {
"title": "About GitHub and Git",
"intro": "You can use GitHub and Git to collaborate on work.",
"product": "Get started"
},
"body": "## About GitHub\n\nGitHub is a cloud-based platform where you can store, share, and work together with others to write code.\n\nStoring your code in a \"repository\" on GitHub allows you to:\n\n* **Showcase or share** your work.\n [...]"
}
Get the contents of an article's body.
Parameters:
Returns: (string) - Article body content in markdown format.
Throws:
Example:
❯ curl -s https://docs.github.com/api/article/body\?pathname=/en/get-started/start-your-journey/about-github-and-git ## About GitHub GitHub is a cloud-based platform where you can store, share, and work together with others to write code. Storing your code in a "repository" on GitHub allows you to: [...]
Get metadata about an article.
Parameters:
Returns: (object) - JSON object containing article metadata with title, intro, and product information.
Throws:
Example:
❯ curl -s "https://docs.github.com/api/article/meta?pathname=/en/get-started/start-your-journey/about-github-and-git"
{
"title": "About GitHub and Git",
"intro": "You can use GitHub and Git to collaborate on work.",
"product": "Get started",
"breadcrumbs": [
{
"href": "/en/get-started",
"title": "Get started"
},
{
"href": "/en/get-started/start-your-journey",
"title": "Start your journey"
},
{
"href": "/en/get-started/start-your-journey/about-github-and-git",
"title": "About GitHub and Git"
}
]
}
A list of pages available for a fully qualified path containing the target language and product version.
Parameters:
Returns: (string) - List of paths matching the language and version
Throws:
Example:
❯ curl -s https://docs.github.com/api/pagelist/en/free-pro-team@latest /en /en/search /en/get-started /en/get-started/start-your-journey /en/get-started/start-your-journey/about-github-and-git [...]
| Back | FazBrowse Home | New Git URL |