ToolSura Blog
ArticlesAboutContact
Search

Stay in the loop

Join thousands of developers getting weekly insights into modern web development, AI tools, and productivity.

© 2026 ToolSura Blog
AboutContactPrivacy PolicyTerms of ServiceRSS

    Table of Contents

    1. Batch file (`-batch`)pages to refresh2. Stdin pipe3. Positional arguments4. Sitemaps (`.xml`)All sources compose and dedupeThe URL capNextSources
    HomeToolsura BlogArticle

    Indexing many URLs: batch files, stdin, and sitemaps

    A

    Abhay khant

    Jan 1, 1970 • 2 min read

    One URL at a time is fine for a quick check, but the tool is built for lists. Here are the three ways to feed it many URLs. and they all compose.

    1. Batch file (-batch)

    Put one URL per line. Lines starting with # are ignored, as are blank lines.

    urls.txt:

    ## pages to refresh
    https://www.toolsura.com/post-a/
    https://www.toolsura.com/post-b/
    https://www.toolsura.com/post-c/
    
    ./gsc-indexer -creds sa.json -batch urls.txt
    

    2. Stdin pipe

    Pipe a list straight in. handy in scripts:

    cat urls.txt | ./gsc-indexer -creds sa.json
    

    The tool auto-detects a piped stdin and reads from it (it only reads stdin when input isn't coming from an interactive terminal, so your keyboard won't block it).

    3. Positional arguments

    Multiple URLs as plain arguments also work:

    ./gsc-indexer -creds sa.json "https://www.toolsura.com/a/" "https://www.toolsura.com/b/"
    

    4. Sitemaps (.xml)

    Hand it a sitemap URL and it fetches the file and expands it into every <loc> entry:

    ./gsc-indexer -creds sa.json "https://www.toolsura.com/sitemap.xml" -report ./report
    
    • Sitemap indexes are followed recursively. a sitemap that lists child sitemaps (<sitemap><loc>) is expanded all the way down.
    • This is the easiest way to (re-)request indexing for an entire site.

    All sources compose and dedupe

    Mix them freely. the tool merges batch + args + sitemap + stdin, removes duplicates, and runs the unique set together:

    ./gsc-indexer -creds sa.json -batch urls.txt "https://www.toolsura.com/extra/" "https://www.toolsura.com/sitemap.xml"
    

    The URL cap

    Expansion is capped at 50,000 URLs to protect against a runaway sitemap hanging the run. If you somehow exceed it you'll get a clear error telling you so. For context, a normal blog sitemap is a few hundred URLs.

    Next

    • Track progress across runs: -report and -diff.
    • Big sitemap run stalling? Throttling and quiet mode.

    Sources

    • Google Search Console
    • URL Inspection API documentation
    • Google Search APIs overview
    • Service account OAuth (Google Identity)
    • About service accounts (Google Cloud IAM)
    • Verify site ownership
    • Property types: URL-prefix vs Domain
    • URL Inspection tool help
    • Indexing API (JobPosting/BroadcastEvent only)
    • Request indexing / inspect a URL

    Frequently Asked Questions

    developer-tools
    cli-tools
    automation
    website-analysis
    A

    About Abhay khant

    A passionate tech enthusiast and professional developer specializing in AI, automation, and modern web development. Sharing insights and guides to help others build better software faster.

    View full profile →

    Join the Newsletter

    Get articles like this delivered to your inbox every Thursday.

    What to read next

    Jan 1, 19709 min read

    What Is OpenCode? The 2026 Open-Source AI Coding Agent

    OpenCode topped LogRocket's July 2026 ranking with 160K+ GitHub stars and 7.5M+ monthly devs. A MIT-licensed, model-agnostic AI coding agent.

    AAbhay khant
    Jan 1, 19709 min read

    What Is the Model Context Protocol? A Plain-English Guide

    Model Context Protocol (MCP) is the open standard connecting AI to your tools and data. Learn how it works, how it differs from APIs, and why it matters.

    AAbhay khant
    Jan 1, 197010 min read

    What Are Passkeys? The Passwordless Login Standard Explained

    Passkeys are the passwordless, phishing-resistant login standard replacing passwords. Learn how they work and how they compare to 2FA.

    AAbhay khant