{"uid":"cap_EIc-23oUDip3hmSdyRhtR","slug":"number-theory-factorization-072dbead","name":"Number Theory Factorization","description":"Prime-factorize a positive integer (≤ 10^15 so the computation is always fast). Returns the prime factors with exponents, the divisor count, and whether n is prime.","url":"https://numtheory.openverbs.com/v1/factorize","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["n"],"properties":{"n":{"type":"string","pattern":"^\\d+$","description":"Positive integer ≤ 10^15 as a decimal string."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-UMmoUlSfdm-PQMH1MI0M","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Factorizes a positive integer (up to 10^15) into its prime factors","exampleAgentPrompt":"Can you factorize 987654321098765 into its prime factors?","exampleUseCases":[{"title":"Prime factorization for cryptographic analysis","prompt":"I need to know the prime factors of 999999999999937 — can you factorize it for me?"},{"title":"Checking if a number is prime","prompt":"Factorize 104729 and tell me if it has any prime factors other than itself — I want to know if it's prime."},{"title":"Math homework prime decomposition","prompt":"What is the prime factorization of 720720? Break it down into all its prime components."}],"resultDescription":"Returns the prime factorization of the submitted integer, identifying all prime factors (and their multiplicities) that multiply together to produce the input number.","failureModes":["Input number exceeds 10^15 — rejected with validation error","Non-numeric or non-integer string passed in the 'n' field — schema validation failure","Empty or missing 'n' field — required field error","Payment not provided or insufficient — x402 payment required response","Network timeout for very large semiprime inputs near the upper bound"],"whenToPreferThis":"Choose this endpoint when you need reliable, paid-API-quality prime factorization for integers up to 10^15. It's suitable for programmatic use cases in mathematics, cryptography education, number theory research, and automated pipelines that require factorization as a computation step. Prefer it over rolling your own factorization when accuracy and speed for numbers up to a quadrillion are needed without maintaining local number-theory code.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:42:15.173Z","isFirstParty":false}