{"id":13992009,"url":"https://github.com/aunyks/newton-api","last_synced_at":"2025-04-05T17:09:25.576Z","repository":{"id":40591432,"uuid":"77094820","full_name":"aunyks/newton-api","owner":"aunyks","description":"➗ A really micro micro-service for advanced math.","archived":false,"fork":false,"pushed_at":"2023-01-06T14:54:05.000Z","size":2844,"stargazers_count":505,"open_issues_count":18,"forks_count":47,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-29T16:11:10.749Z","etag":null,"topics":["algebra","api","calculus","javascript","json","math","math-expressions","newton","trigonometry"],"latest_commit_sha":null,"homepage":"https://newton.now.sh","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aunyks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-21T23:54:34.000Z","updated_at":"2025-03-11T07:26:15.000Z","dependencies_parsed_at":"2023-02-06T05:31:37.708Z","dependency_job_id":null,"html_url":"https://github.com/aunyks/newton-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aunyks%2Fnewton-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aunyks%2Fnewton-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aunyks%2Fnewton-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aunyks%2Fnewton-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aunyks","download_url":"https://codeload.github.com/aunyks/newton-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369953,"owners_count":20927928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algebra","api","calculus","javascript","json","math","math-expressions","newton","trigonometry"],"created_at":"2024-08-09T14:01:44.194Z","updated_at":"2025-04-05T17:09:25.554Z","avatar_url":"https://github.com/aunyks.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# newton\n## A really micro micro-service for advanced math.\nNewton does anything from numerical calculation to symbolic math parsing.\n\n### How does it work?\n1. Send a GET request to newton with a url-encoded math expression and your preferred operation.\n2. Get back a JSON response with your problem solved.\n\n\n### Show me\nLet's find the derivative of x^2.\nSo, we send a request to the newton url saying just that:\n\n-\u003e `https://newton.now.sh/api/v2/derive/x%5E2` (Note the url-encoded `^`)\n\nNow, we get the following response:\n```\n{\n  \"operation\":\"derive\",\n  \"expression\":\"x^2\",\n  \"result\":\"2 x\"\n}\n```\nIt's that simple!\n\n### Get Started\n1. Send a GET request to newton.\n```\nhttps://newton.now.sh/api/v2/:operation/:expression\n```\nNote: `:operation` is the math operation that you want to perform. `:expression` is the *url-encoded* math expression on which you want to operate. **View available operation endpoints below!**\n\n2. That's it! You'll be returned a JSON object with the operation you requested, the expression you provided, and the result of the operation performed on the expression.\n\n### View available endpoints:\n| Operation |    API Endpoint   |       Result      |\n|:---------:|:-----------------:|:-----------------:|\n| Simplify  | /simplify/2^2+2(2)| 8                 |\n| Factor    | /factor/x^2 + 2x  | x (x + 2)         |\n| Derive    | /derive/x^2+2x    | 2 x + 2           |\n| Integrate | /integrate/x^2+2x | 1/3 x^3 + x^2 + C |\n| Find 0's  | /zeroes/x^2+2x    | [-2, 0]           |\n| Find Tangent| /tangent/2lx^3  | 12 x + -16        |\n| Area Under Curve| /area/2:4lx^3| 60               |\n| Cosine    | /cos/pi            | -1                 |\n| Sine      | /sin/0            | 0                 |\n| Tangent   | /tan/0            | 0                 |\n| Inverse Cosine    | /arccos/1            | 0                 |\n| Inverse Sine    | /arcsin/0            | 0                 |\n| Inverse Tangent    | /arctan/0            | 0                 |\n| Absolute Value    | /abs/-1            | 1                 |  \n| Logarithm | /log/2l8           | 3               |\n\n*Keep in mind:*\nTo find the tangent line of a function at a certain x value,\nsend the request as c|f(x) where c is the given x value and f(x) is the function expression, the separator is a vertical bar '|'. See the table above for an example request.\n\nTo find the area under a function, send the request as c:d|f(x) where c is the starting x value, d is the ending x value, and f(x) is the function under which you want the curve between the two x values.  \n\nTo compute fractions, enter expressions as numerator(over)denominator. For example, to process 2/4 you must send in your expression as 2(over)4. The result expression will be in standard math notation (1/2, 3/4).  \n\n### What have people made?\nSome cool apps and libraries made with Newton include the following:\n- [Newton Bot](https://twitter.com/aunyks/status/813127765646082050) (Coming soon!)\n- [Newton Python Wrapper](https://github.com/ilevn/aionewton)\n- [Newton Clay Microservice](https://clay.run/services/nicoslepicos/newton-api)\n- [PyNewtonMath](https://github.com/benpryke/PyNewtonMath) (Python 3 Wrapper)\n- [NewtonMath.js](https://github.com/benpryke/NewtonMath.js) (Native Node.js Wrapper)\n- [goNewton](https://github.com/Jay9596/goNewton) (GoLang Wrapper)\n- [newtonmath](https://github.com/anaskhan96/newtonmath) (Rust Wrapper)\n- [Newton Telegram Bot](https://t.me/sir_newton_bot)\n- [Ming Newton](https://ming-newton.herokuapp.com)\n- Hopefully more to come!\n\n-----------------------------------------------------------------\nBuilt using [metadelta](https://github.com/metadelta/metadelta-core).\n## Want to support Newton development?\nShop [MEZCLA](https://mezcla.xyz)!  \n\nLicensed under the GNU GPLv3 license.  \n\n    Copyright (C) 2016-2020  Gerald Nash\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faunyks%2Fnewton-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faunyks%2Fnewton-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faunyks%2Fnewton-api/lists"}