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

    Indexing many URLs: batch files, stdin, and sitemaps
    Cartoon fox with a compass as glowing document and terminal icons stream data into a machine that outputs green checkmarks

    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
    • Google Search APIs overview
    • Service account OAuth (Google Identity)
    • About service accounts (Google Cloud IAM)
    • Verify site ownership
    • 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

    Stop Windows from Installing Apps Without Permission
    Jan 1, 197010 min read

    Stop Windows from Installing Apps Without Permission

    LG and Dell monitors silently push apps via Windows Update. Learn how to stop Windows from installing apps without permission and detect what's on your PC.

    AAbhay Khant
    Big runs without getting throttled: -delay, -q, and -dry-run
    Jan 1, 19702 min read

    Big runs without getting throttled: -delay, -q, and -dry-run

    Run gsc-indexer over thousands of URLs without Google throttling you: raise -delay, use -q for clean progress, and survive 429/5xx backoff.

    AAbhay Khant
    gsc-indexer FAQ
    Jan 1, 19703 min read

    gsc-indexer FAQ

    gsc-indexer FAQ: does it index instantly, why www vs non-www matters, API key vs service account, 403 causes, and how many URLs you can process.

    AAbhay Khant