Skip to content

(feat): Add raw text endpoint for AI agent consumption without character limits #560

@hamzakat

Description

@hamzakat

Feature summary

Provide a direct URL endpoint that returns full repository digests as plain text without the 300k character limitation currently present in the API's content field, optimized for consumption by AI agents and LLM tools.

Problem / motivation

The current API endpoint (/api/username/reponame) returns JSON with a content field limited to 300k characters. Returning the content solely in a neat format may solve the issue for very small repos due to the characters limits This creates issues when:

  1. Large repositories get truncated: Any repo exceeding 300k characters becomes partially unusable for LLM analysis
  2. AI agents can't directly consume content: Tools like ChatGPT, Perplexity, and Claude benefit from direct URL access to plain text, but the current web UI at gitingest.com/username/reponame returns HTML with interactive elements rather than raw digestible text. When using the /api/ endpoint, the returned content isn't and not complete in case of ingests > 300k characters.
  3. Workflow friction: Users must either use CLI tools or manually copy from the web interface, defeating the purpose of the URL-based convenience that makes Gitingest elegant

Proposed solution

Add a URL modifier or dedicated endpoint that returns the complete digest as plain text:

Option 1: Query parameter

Option 2: Dedicated path

Implementation considerations:

  • Return Content-Type: text/plain
  • Implement size limits based on file size rather than character count (e.g., 50MB limit)
  • For oversized repos, return error with suggested filters/subdirectory approach
  • Make it crawlable by AI agents while preventing abuse (rate limiting)

Alternatives considered

No response

Which interface would this affect?

Web UI

How important is this to you?

Important

Would you like to work on this feature yourself?

Maybe, if I get some guidance

Would you need support from the maintainers (if you're implementing it yourself)?

Yes, I'd need some guidance

Additional context, screenshots, or examples

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions