{"uid":"cap_QJv-4AEsG2n-27xHEIQlb","slug":"classic-ciphers-and-encodings-frequency-analysis-25ce7af8","name":"Classic Ciphers and Encodings: Frequency Analysis","description":"Letter frequencies, index of coincidence and the most likely Caesar shift of a ciphertext using English statistics.","url":"https://text-ciphers.x402tookit.com/frequency-analysis?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Text to analyse (up to 5000 characters; 40 or more letters for a shift guess)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"letters":{"type":["null","number"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"randomIC":{"type":["null","number"]},"englishIC":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"mostCommon":{"type":["array","null"],"items":{"type":"string"}},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"frequencies":{"type":["array","null"],"items":{"type":"object","properties":{"count":{"type":["null","number"]},"letter":{"type":["null","string"]},"percent":{"type":["null","number"]},"englishPercent":{"type":["null","number"]}}}},"likelyShift":{"type":["null","number"]},"runnerUpShift":{"type":["null","number"]},"interpretation":{"type":["null","string"]},"candidatePlaintext":{"type":["null","string"]},"indexOfCoincidence":{"type":["null","number"]},"shiftConfidenceRatio":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8FkHZnsqwu3jcwp0ZVW3-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes ciphertext to compute letter frequencies, index of coincidence, and most likely Caesar shift using English language statistics.","exampleAgentPrompt":"Can you run frequency analysis on this ciphertext and tell me the most likely Caesar shift and what the decrypted text would look like: 'KHOOR ZRUOG, WKLV LV D WHVW PHVVDJH WR DQDOBVH'?","exampleUseCases":[{"title":"Breaking an unknown Caesar cipher","prompt":"I found this encrypted message and I think it's a Caesar cipher — can you analyze the letter frequencies and tell me the most likely shift and what the plaintext might be? Here it is: 'WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ'"},{"title":"Verifying ciphertext language statistics","prompt":"Can you check whether this ciphertext has an index of coincidence consistent with English text or whether it looks more like random noise? The text is: 'BEEAKFUZIKAVKBMFEVBMEBKFBUAKR'"},{"title":"Puzzle solving with frequency clues","prompt":"I'm doing a cryptogram puzzle and need help — can you analyze the frequency distribution of letters in this ciphertext and show me which letters appear most often compared to normal English: 'AOPZ PZ H ZLYJLA TLZZHNL HWWSF AOL ZOPMA'?"}],"resultDescription":"Returns a breakdown of letter frequencies (count, percent, and English reference percent for each letter), the index of coincidence (with random and English baselines for comparison), the most likely Caesar shift, a runner-up shift, a confidence ratio between the top two shifts, the candidate plaintext after applying the likely shift, and a human-readable summary and interpretation of the results.","failureModes":["Text too short (fewer than 40 letters) — shift guess may be unreliable or absent","Input exceeds 5000 characters — request may be rejected or truncated","Non-alphabetic input with no letters — frequencies will be empty and no shift can be estimated","Text is not English — English-based statistics will produce misleading shift guesses","Network or payment failure — HTTP 402 or 5xx error returned"],"whenToPreferThis":"Use this endpoint when you need to cryptanalyze a suspected Caesar-shifted ciphertext using English letter frequency statistics, especially when you want both the raw frequency data and an automated shift recommendation. Prefer this over manual inspection when the ciphertext is at least 40 letters long and you suspect single-letter substitution. It is not suited for polyalphabetic ciphers (use the Vigenere sibling endpoint for those) or for modern encryption schemes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-24T05:39:13.582Z","isFirstParty":false,"canonicalSlug":"classic-ciphers-and-encodings-frequency-analysis-25ce7af8"}