CocoaPods Trunk API
Query the CocoaPods Trunk API for a pod's published versions and release timestamps with no key. Includes the non-ISO date format and version-ordering gotchas.
Endpoint tested and returned HTTP 200 on 21 Aug 2026
What is the CocoaPods Trunk API?
CocoaPods Trunk exposes a small public API. `GET https://trunk.cocoapods.org/api/v1/pods/{name}` returns every published version of a pod with the timestamp it was pushed. No API key is required for reads.
Trunk is the CocoaPods publishing service, and its read endpoints are the only structured source of pod release history that does not involve cloning the enormous Specs repository. For a dependency dashboard covering iOS projects, that difference is the whole point: one HTTP request against a several-gigabyte git clone.
The response has two rough edges. Versions come back ordered lexicographically by version string, so `0.10.0` precedes `0.5.1` and the newest release is not reliably at either end of the array. And `created_at` is not ISO 8601: it is formatted as `2014-05-19 21:43:24 UTC`, with a space separator and a trailing timezone name, which most date parsers reject. Parse it explicitly and sort with a semantic version comparator rather than trusting the order you were given.
Quick facts
- Base URL
https://trunk.cocoapods.org/api/v1- Authentication
- Read endpoints are public. Publishing a pod requires a Trunk session token, which is unrelated to the lookups documented here.
- Rate limit
- Not published. Release history changes rarely, so cache per pod for hours.
- Pricing
- Free.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the CocoaPods Trunk API
Every request below was executed against the live API on 21 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. List every published version of a pod
GET https://trunk.cocoapods.org/api/v1/pods/AFNetworking
curl 'https://trunk.cocoapods.org/api/v1/pods/AFNetworking'const res = await fetch("https://trunk.cocoapods.org/api/v1/pods/AFNetworking");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://trunk.cocoapods.org/api/v1/pods/AFNetworking", timeout=20)
res.raise_for_status()
print(res.json()){
"versions": [
{
"name": "0.10.0",
"created_at": "2014-05-19 21:43:24 UTC"
},
{
"name": "0.10.1",
"created_at": "2014-05-19 21:44:16 UTC"
},
{
"name": "0.5.1",
"created_at": "2014-05-19 21:38:17 UTC"
},
{
"name": "0.7.0",
"created_at": "2014-05-19 21:38:20 UTC"
},
{
"name": "0.9.0",
"created_at": "2014-05-19 21:38:28 UTC"
},
{
"name": "0.9.1",
"created_at": "2014-05-19 21:39:04 UTC"
},
{
"name": "0.9.2",
"created_at": "2014-05-19 21:40:28 UTC"
},
{
"name": "1.0",
"created_at": "2014-05-19 21:44:17 UTC"
},
{
"name": "1.0.1",
"created_at": "2014-05-19 21:44:49 UTC"
},
{
"name": "1.0RC1",
"created_at": "2014-05-19 21:40:28 UTC"
},
{
"name": "1.0RC2",
"created_at": "2014-05-19 21:44:16 UTC"
},
{
"name": "1.0RC3",
"created_at": "2014-05-19 21:44:25 UTC"
},
{
"name": "1.1.0",
"created_at": "2014-05-19 21:45:33 UTC"
},
{
"name": "1.1.1",
"created_at": "2014-05-19 21:47:14 UTC"
},
{
"name": "1.2.0",
"created_at": "2014-05-19 21:49:10 UTC"
},
{
"name": "1.2.1",
"created_at": "2014-05-19 21:49:52 UTC"
},
{
"name": "1.3.0",
"created_at": "2014-05-19 21:51:58 UTC"
},
{
"name": "1.3.1",
"created_at": "2014-05-19 21:52:22 UTC"
},
{
"name": "1.3.2",
"created_at": "2014-05-19 21:54:16 UTC"
},
{
"name": "Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
{pod} | path | Required | The exact pod name, which is case-sensitive. AFNetworking |
/api/v1/pods/{pod}/specs/{version} | path | Optional | Redirects to the full podspec JSON for one specific version. Follow the 302. AFNetworking/4.0.1 |
Response fields
versionsarray- Every published version. Ordered lexicographically by name, so neither the first nor the last element is reliably the newest release.
versions[].namestring- The version string as published. CocoaPods does not enforce strict semver, so values like `1.0RC1` appear alongside `1.0.1`.
versions[].created_atstring- Publication time formatted as `YYYY-MM-DD HH:MM:SS UTC`. This is not ISO 8601 and will fail a strict parser; convert it before use.
What you can build with the CocoaPods Trunk API
- Check whether an iOS dependency has shipped a newer version
- Build a release timeline for a pod without cloning the Specs repository
- Detect abandoned pods by finding the most recent `created_at`
- Resolve a version string to its exact podspec for a supply-chain audit
- Feed pod release data into a dependency dashboard alongside npm and Maven
Common errors and how to fix them
404
The pod name is wrong, including its capitalisation.
Fix: Pod names are case-sensitive: `AFNetworking`, not `afnetworking`. Search on cocoapods.org to confirm.
Date parse failure
`created_at` uses a space separator and a trailing `UTC` label.
Fix: Parse with an explicit format string such as `%Y-%m-%d %H:%M:%S %Z`, or replace the space with `T` and strip the suffix first.
Wrong latest version
The array is sorted lexicographically, not semantically.
Fix: Sort with a semver-aware comparator, and be prepared for non-semver strings like `1.0RC1` that comparators reject.
CocoaPods Trunk API — frequently asked questions
Does the CocoaPods API need authentication?
Not for reads. Anyone can look up a pod's versions and specs. Publishing requires a Trunk session, which is a separate flow entirely.
How do I find the newest version of a pod?
Sort the `versions` array yourself with a semantic version comparator, or sort by parsed `created_at`. The array order in the response is lexicographic and cannot be trusted.
Can I fetch the full podspec?
Yes, via `/api/v1/pods/{pod}/specs/{version}`. It answers with a 302 to the stored podspec JSON, so make sure your HTTP client follows redirects.
Is this the same data as the Specs repository?
It is the same source of truth, served over HTTP instead of git. The Specs repository is a mirror of what Trunk holds, so the API is the lighter way to read it.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Timestamp Converter
Convert timestamps to human-readable dates and dates back to timestamps. Auto-detects seconds vs milliseconds, shows local, UTC and ISO 8601 formats.
JSON Viewer
View JSON as a collapsible interactive tree online. Expand and collapse nodes, search keys and values, and copy the JSONPath of any node privately.
Alternatives to CocoaPods Trunk API
If CocoaPods Trunk does not fit, these developer & testing apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| GitHub REST API | GitHub REST API with no key for public data: repository details, users, issues, releases and commits. 60 req/hour unauthenticated, 5,000 with a token. | No key | Yes | 19 Aug 2026 |
| JSONPlaceholder | Free fake REST API for testing and prototyping. Posts, comments, users and todos with full GET, POST, PUT and DELETE support. No key. Real curl examples. | No key | Yes | 19 Aug 2026 |
| Postman Echo | Postman Echo reflects your HTTP request back as JSON: headers, body, query params and auth. Free, no key, ideal for debugging clients. Real POST example. | No key | No | 19 Aug 2026 |
| DummyJSON | Free fake REST API with realistic products, users, carts, recipes and auth. Supports search, pagination, sorting and POST. No key. Tested GET and POST examples. | No key | Yes | 19 Aug 2026 |
| Codeberg (Forgejo) | Free Codeberg API with no key for public data: repository search, issues, releases and users on the non-profit Git host. Same API as Gitea and Forgejo. Tested. | No key | No | 20 Aug 2026 |
| CRAN DB | Read any CRAN package's DESCRIPTION file as JSON: version, licence, dependencies, maintainer and full history. No key required. Verified example and field notes. | No key | No | 21 Aug 2026 |
CocoaPods Trunk is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 21 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.