Updated Jul 14, 2026

Discovery

Crawl a web app for endpoints, including JavaScript and a headless mode

katana is a next-generation crawling and spidering framework from ProjectDiscovery that discovers endpoints in web applications with standard and headless-browser crawling and JavaScript parsing, output in pipe-friendly form for downstream pipelines.

installgo install github.com/projectdiscovery/katana/cmd/katana@latestdocker pull projectdiscovery/katana:latest

Go · MIT license

Agent

overview

What katana does

katana walks a web application from a seed URL, follows every link and form it reaches, and collects the endpoints it finds into a structured list. It crawls fast enough to cover wide scopes and controls scope tightly enough that the output feeds the next stage without manual cleanup.

Two things set it apart from a plain crawler. It parses JavaScript files for endpoints that never appear in static HTML, which is how it recovers API routes in single-page apps where the navigation lives in bundled script. A -headless hybrid mode drives a real Chrome instance for pages that only render under a browser, and -known-files pulls robots.txt and sitemap.xml for paths the crawl would otherwise skip.

In a Trickest workflow katana sits between discovery and testing. Point it at the hosts from a subdomain pass, emit -jsonl so every endpoint becomes one queryable record, and hand the results to httpx and a scanner so probing runs only against URLs that exist.

source github.com/projectdiscovery/katana

use cases

Where katana fits

Map an application's full endpoint surface

Crawl a target to depth and emit JSONL so every reachable path, parameter, and form is captured as structured data the rest of the workflow can query.

Pull endpoints out of JavaScript bundles

Enable JS crawling on single-page apps to recover API routes and links that static crawlers miss because the navigation is defined in script, not HTML.

Feed a prober and scanner pipeline

Run katana after subdomain discovery, then pass its output to httpx and a vulnerability scanner so probing and testing run only against real, reachable URLs.

Harvest known files and seed wordlists

Pull robots.txt and sitemap.xml entries, then use the discovered paths to seed content-discovery and parameter-fuzzing stages downstream.

reference

katana inputs and flags

64 inputs
NameTypeFlagDescription
urlSTRING-uTarget URL to crawl.
listFILE-listFile of target URLs, for crawling many hosts at once.
depthSTRING-depthMaximum depth to crawl (default 3).
js-crawlBOOLEAN-js-crawlParse JavaScript files for endpoints (short flag -jc).
headlessBOOLEAN-headlessEnable headless hybrid crawling for rendered pages (experimental).
jsonlBOOLEAN-jsonlWrite output in JSONL format, one record per line.
field-scopeSTRING-field-scopePre-defined scope field (dn, rdn, fqdn) or custom regex (default rdn).
known-filesSTRING-known-filesCrawl known files (all, robotstxt, sitemapxml).

Showing key inputs. katana exposes 64 inputs in total.

Full flag reference (64 inputs)
NameTypeFlagDescription
urlSTRING-utarget url
listFILE-listtarget url list
debugBOOLEAN-debugdisplay debug output
delaySTRING-delayrequest delay between each request in seconds
depthSTRING-depthmaximum depth to crawl (default 3)
fieldSTRING-fieldfield to display in output (url,path,fqdn,rdn,rurl,qurl,qpath,file,ufile,key,value,kv,dir,udir) (Deprecated: use -output-template instead)
jsonlBOOLEAN-jsonlwrite output in JSONL(ines) format
proxySTRING-proxyhttp/socks5 proxy to use
retrySTRING-retrynumber of times to retry the request (default 1)
configFILE-configpath to the katana configuration file
resumeFILE-resumeresume scan using resume.cfg
silentBOOLEAN-silentdisplay output only
excludeSTRING-excludeexclude host matching specified filter ('cdn', 'private-ips', cidr, ip, regex)
headersSTRING-headerscustom header/cookie to include in request
jsluiceBOOLEAN-jsluiceenable jsluice parsing in javascript file (memory intensive)
timeoutSTRING-timeouttime to wait for request in seconds (default 10)
verboseBOOLEAN-verbosedisplay verbose output
headlessBOOLEAN-headlessenable headless hybrid crawling (experimental)
js-crawlBOOLEAN-js-crawlenable endpoint parsing / crawling in javascript file
no-scopeBOOLEAN-no-scopedisables host based default scope
omit-rawBOOLEAN-omit-rawomit raw requests/responses from jsonl output
strategySTRING-strategyVisit strategy (depth-first, breadth-first) (default "depth-first")
omit-bodyBOOLEAN-omit-bodyomit response body from jsonl output
resolversSTRING-resolverslist of custom resolver (file or comma separated)
no-sandboxBOOLEAN-no-sandboxstart headless chrome in --no-sandbox mode
path-climbBOOLEAN-path-climbenable path climb (auto crawl parent paths)
rate-limitSTRING-rate-limitmaximum requests to send per second (default 150)
concurrencySTRING-concurrencynumber of concurrent fetchers to use (default 10)
crawl-scopeSTRING-crawl-scopein scope url regex to be followed by crawler
field-scopeSTRING-field-scopepre-defined scope field (dn,rdn,fqdn) or custom regex (e.g., '(company-staging.io|company.com)') (default "rdn")
form-configFILE-form-configpath to custom form configuration file
known-filesSTRING-known-filesenable crawling of known files (all,robotstxt,sitemapxml)
match-regexSTRING-match-regexregex to match on output url
parallelismSTRING-parallelismnumber of concurrent inputs to process (default 10)
store-fieldSTRING-store-fieldfield to store in per-host output (url,path,fqdn,rdn,rurl,qurl,qpath,file,ufile,key,value,kv,dir,udir)
tech-detectBOOLEAN-tech-detectenable technology detection (works with jsonl output)
field-configFILE-field-configpath to custom field configuration file
filter-regexSTRING-filter-regexregex to filter on output url
headers-fileFILE-headerscustom header/cookie to include in request
health-checkBOOLEAN-health-checkrun diagnostic check up
no-incognitoBOOLEAN-no-incognitostart headless chrome without incognito mode
crawl-durationSTRING-crawl-durationmaximum duration to crawl the target for (s, m, h, d) (default s)
xhr-extractionBOOLEAN-xhr-extractionextract xhr request url,method in jsonl output
chrome-data-dirFOLDER-chrome-data-dirpath to store chrome browser data
crawl-out-scopeSTRING-crawl-out-scopeout of scope url regex to be excluded by crawler
extension-matchSTRING-extension-matchmatch output for given extension (eg, -em php,html,js)
form-extractionBOOLEAN-form-extractionextract form, input, textarea & select elements in jsonl output
match-conditionSTRING-match-conditionmatch response with dsl based condition
output-templateSTRING-output-templatecustom output template
tls-impersonateBOOLEAN-tls-impersonateenable experimental client hello (ja3) tls randomization
crawl-scope-fileFILE-crawl-scopein scope url regex to be followed by crawler
extension-filterSTRING-extension-filterfilter output for given extension (eg, -ef png,css)
filter-conditionSTRING-filter-conditionfilter response with dsl based condition
headless-optionsSTRING-headless-optionsstart headless chrome with additional options
match-regex-fileFILE-match-regexlist of regex to match on output url
disable-redirectsBOOLEAN-disable-redirectsdisable following redirects (default false)
display-out-scopeBOOLEAN-display-out-scopedisplay external endpoint from scoped crawling
filter-regex-fileFILE-filter-regexlist of regex to filter on output url
max-response-sizeSTRING-max-response-sizemaximum response size to read (default 9223372036854775807)
rate-limit-minuteSTRING-rate-limit-minutemaximum number of requests to send per minute
automatic-form-fillBOOLEAN-automatic-form-fillenable automatic form filling (experimental)
ignore-query-paramsBOOLEAN-ignore-query-paramsIgnore crawling same path with different query-param values
crawl-out-scope-fileFILE-crawl-out-scopeout of scope url regex to be excluded by crawler
disable-unique-filterBOOLEAN-disable-unique-filterdisable duplicate content filtering

example

Run katana

katana · command
# crawl to depth 3, parse JavaScript, include known files, write JSONL
katana -u https://example.com -depth 3 -js-crawl -known-files all -jsonl -o endpoints.jsonl
sample output
https://example.com/
https://example.com/about
https://example.com/login
https://example.com/api/v1/users
https://example.com/api/v1/products?id=1
https://example.com/assets/app.min.js
https://example.com/robots.txt
https://example.com/sitemap.xml
https://example.com/dashboard/settings

guidance

Choosing katana

Reach for katana when you need depth and JavaScript awareness, not just a flat URL dump. For passive, archive-sourced URLs with no requests, use gau. For a lighter, simpler crawl, hakrawler or gospider are quicker to wire but see less.

gau

Passive URLs from archives like Wayback and Common Crawl. No live requests, complements an active katana crawl.

hakrawler

Lightweight active crawler. Faster to run, less coverage, no JS rendering.

gospider

Fast Go spider. Good for quick link discovery, fewer scoping controls than katana.

faq

katana questions

Yes. Enable -js-crawl and it parses script files for endpoints, recovering API routes that static crawlers miss because the navigation lives in bundled JavaScript. For pages that only render under a browser, -headless drives a real Chrome instance in a hybrid crawl.

They solve different halves of the problem. fallparams is built to discover request parameters, including hidden ones a crawl never links to. katana instead surfaces the parameters that already appear in the links and JavaScript it crawls; use -field qurl or -field key,value to pull them out of the output. Run katana to map the endpoint and parameter surface, then a dedicated parameter tool for deeper coverage.

Crawl with katana, classify the endpoints with httpx, then test the live ones with nuclei. Wire katana -> httpx -> nuclei so the scanner only runs against URLs that answer. Emitting -jsonl from katana keeps each endpoint a structured record the downstream nodes can read.

Use -field-scope to restrict crawling to a domain, root domain, or FQDN, and -depth to bound how far it walks from the seed. For finer control, -crawl-scope and -crawl-out-scope take regexes, and -known-files can widen coverage to robots.txt and sitemap.xml.

-field picks which part of each URL to print, such as url, path, qurl, or key,value, which is handy when you only want parameters or directories. katana now marks it deprecated in favor of -output-template, so prefer that flag for new workflows while -field keeps working.

Run katana yourself

A target feeds katana, which crawls it and passes the endpoints to httpx for live probing before they land as a queryable output.

Facts on this page come from the live Trickest tool library.