Extract API Endpoints from an iOS App
The endpoint scan reads the strings of every binary and the content of every text resource inside an IPA or app bundle. It separates the first-party hosts from the third-party hosts, scores each path literal, and reports the authentication scheme, the WebSocket URLs, the GraphQL operations, the certificate pinning, and the hardcoded secrets.
Run the scan
bash scripts/find-api-calls.sh app.ipa
The target can be an IPA file, an app bundle, a teardown output folder, or a single Mach-O file.
Targeted scans
--urls the hardcoded URLs, with the first-party hosts first
--paths the endpoint-shaped path literals, with a confidence score
--ws the WebSocket URLs
--graphql the GraphQL endpoints and the operations
--clients the network client calls
--auth the authentication patterns and the token storage
--secrets the secret candidates and the provider keys
--pins the certificate pinning evidence
--ats the App Transport Security posture
The first-party host list
The most valuable output is the first-party host list. It names the backend of the app. The scan separates the hosts using a denylist of the analytics SDKs, the payment SDKs, the storage services, the certificate authorities, and the local hosts.
--- First party hosts (frequency sorted) ---
17 apphousekitchen.com
1 aldente-api-556236424045.europe-west1.run.app
4 cdn.paddle.com
The confidence score for path literals
A binary holds many strings that look like a path. The scan scores each one so the real API paths come first.
| Score | Reason | Example |
|---|---|---|
| +4 | A segment is a known API root word | /v1/users |
| +3 | The path starts with a version segment | /3.2/license |
| +2 | Every segment uses the lower case form | /license/activate |
| +1 | The path has two or more segments | /a/b |
A score of 4 or more is a high-confidence API path.
--- High confidence paths (score 4 or more) ---
8 /3.2/product/data
4 /3.2/license/deactivate
4 /3.2/license/activations
4 /3.2/license/activate
The library patterns
| Library | The call shape to search for |
|---|---|
| URLSession | URLSession.shared.dataTask(with:, data(for:, uploadTask(with:from:) |
| Alamofire | AF.request(, Session(configuration:, HTTPHeaders, RequestInterceptor |
| Moya | MoyaProvider, TargetType, the endpoint enum |
| RxSwift | Single<, Observable<, flatMap, subscribe(onSuccess: |
| Apollo | ApolloClient, serverURL(, GraphQLOperation |
| gRPC | GRPCClient, NioTransport |
The interceptor of an Alamofire app holds the authentication logic and the base URL. The endpoint enum of a Moya app holds every endpoint of the app.
The authentication and the token storage
Authorization: Bearer <token>
x-api-key: <key>
SecItem / kSecClass → Keychain
UserDefaults.standard → a token in the clear
A token that the app stores in UserDefaults is a finding. The file holds the token in the clear.
The secret candidates
| Pattern | Provider |
|---|---|
sk_live_..., pk_live_... | Stripe |
AIza... | Google, Firebase |
AKIA... | Amazon Web Services |
SG.... | SendGrid |
xoxb-..., xoxp-... | Slack |
-----BEGIN PRIVATE KEY----- | Any private key |
eyJ.... | A JSON web token |
A secret that ships inside a binary is a finding. The binary is public, so the secret must change.
Document the result
The skill produces the inventory in two tiers. The Tier 1 table holds every endpoint. The Tier 2 detail holds the authentication flow, the payment flow, and the endpoints that you name.
| Host | Method | Path | Auth | Source |
|---|---|---|---|---|
api.example.com | GET | /v1/users/profile | Bearer | Network+UserService.swift |
api.example.com | POST | /v1/auth/login | none | Network+AuthService.swift |
Cross-platform apps
The endpoints of a Flutter, React Native, or Unity app live in the resource file. Point the scan at that file.
bash scripts/find-api-calls.sh app/main.jsbundle
bash scripts/find-api-calls.sh app/Frameworks/App.framework/App
bash scripts/find-api-calls.sh app/global-metadata.dat