Contents
Read repository directory entries or a file with its path, type, size, SHA, encoded content and source links. Select a branch, tag or commit with ref.
/v1/github/repo/contentsx-api-keyHeaders
Get your API keyYour ScrapeAtlas customer key. Create one on /account/ and set SCRAPEATLAS_API_KEY.
Canonical HTTPS github.com URL of the user, repository or issue required by this route.
max 2048 chars
https://github.com/example/repoRepository-relative directory or file path.
max 1024 chars
Branch name, tag or commit reference.
min 1 chars · max 200 chars
Optional.
Optional.
Whether retrieval returned usable data.
success, partial, failed or challenged.
one of: success, partial
Request correlation UUID.
Public source URL.
absolute HTTPS URL
UTC fetch time.
Completeness of this bounded response, not complete account enumeration.
Always included.
one of: public_api, public_html
Always included.
Always included.
Combined upstream attempts, decoded bytes and elapsed milliseconds.
Always included.
≥ 0
Always included.
≥ 0
Always included.
≥ 0
Route-specific compatibility payload. See endpoint description and research coverage notes.
Always included.
one of: directory, file
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
≥ 0
Always included.
one of: file, dir, symlink, submodule
Always included.
Always included.
Always included.
Optional.
Optional.
Optional.
Optional.
Always included.
≥ 0
Always included.
No fields match.
HTTP 200 returns the success variant. Check status: partial means usable data with warnings, and failed or challenged requests carry a failure object described in Errors & responses.
| HTTP | failure.code | Meaning |
|---|---|---|
| 400 | invalid_request | Invalid, duplicate or unsupported parameters. |
| 401 | unauthorized | Invalid worker key. |
| 404 | not_found | Public source record unavailable; SocialFetch aliases return data.lookupStatus=not_found with HTTP 200. |
| 429 | upstream_rate_limited | GitHub throttled retrieval. |
| 502 | upstream_error upstream_challenged unsupported_page | Source retrieval failed or the source contract changed. |
| 502 | unsafe_redirect response_too_large payload_too_complex request_limit | A fixed safety or resource boundary was reached. |
| 503 | busy | All worker slots are occupied. |
| 504 | timeout | Total deadline expired. |