Skip to content
scrapeatlas.Dashboard

Contents

Try in Playground

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. Use view=readme for the repository README as text, or view=profile-readme with a handle or profile URL for a profile README.

GET/v1/github/repo/contentsx-api-key
x-api-keystringrequiredheader

Your ScrapeAtlas customer key. Create one on /account/ and set SCRAPEATLAS_API_KEY.

Query parameters
5
urlstringquery

Canonical HTTPS github.com URL of the user, repository or issue required by this route.

max 2048 chars

Examplehttps://github.com/example/repo
pathstringquery

Repository-relative directory or file path.

max 1024 chars

refstringquery

Branch name, tag or commit reference.

min 1 chars · max 200 chars

handlestringquery

GitHub handle, optionally beginning with @; 1–39 characters excluding @.

viewenumquery

contents (default), readme or profile-readme. path and ref apply to contents; profile-readme takes handle or a profile url.

one of: contents, readme, profile-readme

Response fields
45
platformstringoptional

Optional.

endpointstringoptional

Optional.

successboolean

Whether retrieval returned usable data.

statusenum

success, partial, failed or challenged.

one of: success, partial

requestIdstring

Request correlation UUID.

sourceUrlstring

Public source URL.

absolute HTTPS URL

fetchedAtstring

UTC fetch time.

Completeness of this bounded response, not complete account enumeration.

coverage.sourceenum

Always included.

one of: public_api, public_html

coverage.completeboolean

Always included.

coverage.warningsstring[]

Always included.

Combined upstream attempts, decoded bytes and elapsed milliseconds.

accounting.upstreamRequestsinteger

Always included.

≥ 0

accounting.responseBytesinteger

Always included.

≥ 0

accounting.durationMsnumber

Always included.

≥ 0

Route-specific compatibility payload. See endpoint description and research coverage notes.

data.typeenum

Always included.

one of: directory, file

Always included.

data.items.namestring

Always included.

data.items.pathstring

Always included.

data.items.shastring

Always included.

data.items.sizeinteger

Always included.

≥ 0

data.items.typeenum

Always included.

one of: file, dir, symlink, submodule

data.items.html_urlstringnullable

Always included.

absolute HTTPS URL

data.items.download_urlstringnullable

Always included.

absolute HTTPS URL

data.items.git_urlstringnullable

Always included.

absolute HTTPS URL

data.items.encodingstringoptional

Optional.

data.items.contentstringoptional

Optional.

data.items.targetstringoptional

Optional.

data.items.submodule_git_urlstringoptional

Optional.

Always included.

data.file.namestring

Always included.

data.file.pathstring

Always included.

data.file.shastring

Always included.

data.file.sizeinteger

Always included.

≥ 0

data.file.typeenum

Always included.

one of: file, dir, symlink, submodule

data.file.html_urlstringnullable

Always included.

absolute HTTPS URL

data.file.download_urlstringnullable

Always included.

absolute HTTPS URL

data.file.git_urlstringnullable

Always included.

absolute HTTPS URL

data.file.encodingstringoptional

Optional.

data.file.contentstringoptional

Optional.

data.file.targetstringoptional

Optional.

data.file.submodule_git_urlstringoptional

Optional.

data.returnedCountinteger

Always included.

≥ 0

data.truncatedboolean

Always included.

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.

Error codes
8
HTTPfailure.codeMeaning
400invalid_requestInvalid, duplicate or unsupported parameters.
401unauthorizedInvalid worker key.
404not_foundPublic source record unavailable; SocialFetch aliases return data.lookupStatus=not_found with HTTP 200.
429upstream_rate_limitedGitHub throttled retrieval.
502upstream_error upstream_challenged unsupported_pageSource retrieval failed or the source contract changed.
502unsafe_redirect response_too_large payload_too_complex request_limitA fixed safety or resource boundary was reached.
503busyAll worker slots and the waiting queue are occupied.
504timeoutTotal deadline expired.