<p>Not quite the webservice, but there is a JavaScript library Orb2.js with examples including X-Y(-Z) in ecliptic coordinates. So maybe you can compute it directly, not relying on some external service:</p>

<p><a href="http://www.lizard-tail.com/isana/lab/orbjs/" rel="nofollow noreferrer">http://www.lizard-tail.com/isana/lab/orbjs/</a></p>

<p>As far as I do not use it actively, it just a pointer to site to explore, not a definitive solution for you.</p>

CC BY-SA 3.0
2017-09-08T19:53:29.687Z
2017-09-08T19:53:29.687Z
David Komanek
<p>I would like to be able to connect to a web-service and retrieve JSON data containing information on current (as of today or so) orbits of planets, comets, asteroids, and dwarf planets in our solar system. (Even just planets would be fine but better if I can get info about asteroids, comets, and dwarf planets as well).
I would like to draw planets and their orbits accurately in a 2D animation of our solar system in an Android app in the X-Y coordinate plane as observed from the top of the Z axis.</p>

<p>Where can I find such public web service and how can I access it and get that data?</p>

<p><strong>UPDATE</strong>
I tried using HORIZONS Web-Interface but out of all variables I need, I can see only "Semi-Annual Axis" information.  I need following information:</p>

<ul>
<li><p>orbital ellipse angle in X-Y coordinate system (i.e 1.5rad or degrees or so)</p></li>
<li><p>motion direction (pro-grade or retrograde)</p></li>
<li><p>current position of planet/comet/asteroids on that ellipsis in degrees or radians, say 60deg from x (horizontal) axis</p></li>
<li><p>time it takes plant to go around the sun (I believe this is called orbital period)</p></li>
<li><p>eccentricity of ellipse (orbit)</p></li>
<li><p>semi-annual axis</p></li>
</ul>

<p>These are the values that give me enough information to draw orbit (ellipsis) and correctly position planet on that ellipsis, and to calculate speed at which it moves around the sun in my 2D model.</p>

<p>So, I am not interested in inclination or any parameters that would be useful for a 3D model.  </p>

<p>I can find this data online but it takes lots of searching since I have not been able to find a central place for it.  HORIZONS seems to be such place but out of variables I need (as described above), I can find there only semi-annual axis in HORIZONS.  I am surprised that I cannot fine a public web-service offering this info (REST or SOAP, or whatever, does not matter as long as I can fetch that data and process it for my needs from my application).</p>

<p>I apologize if my explanation is somewhat unclear, I am not an astronomer.</p>

<p>Hope that explains.</p>

CC BY-SA 3.0
2015-10-12T11:51:57.257Z
Possible duplicate of [Planets and moons positions in cartesian coordinates?](http://astronomy.stackexchange.com/questions/11272/planets-and-moons-positions-in-cartesian-coordinates)
FJC
CC BY-SA 3.0
2015-10-12T21:30:15.727Z
@FJC Thanks for the answer but that was not exactly what I am looking for.  I need to access a web service from my application and retrieve following data: eccentricity, semi-major axis, orbital period around sun, position of the body on that day in X-Y coordinate system as observed from top of Z coordinate (2D), preferably, orbiting ellipsis orientation in X-Y coordinates, retrograde or prograde motion.  As far as I can see, the above will provide only semi-major axis but not as web service (restfull web service).  I have updated my question above.  Much appreciated.
user9457
CC BY-SA 3.0
2015-10-13T22:00:30.830Z
Is the data somewhere?  This has been on my mind, too, and if the data is somewhere I'd be happy to see about putting a JSON API front-end on it.
dudemonkey
CC BY-SA 3.0
2015-10-14T13:56:47.937Z
@user9457 I don't think "how can I access it" is on topic here.
called2voyage
CC BY-SA 3.0
2015-10-14T18:20:55.753Z
@TildalWave  Thank you for the info.  I have looked at HORIZONS before and I could not find the info I need (I followed your steps, too).  I have posted update in my question to explain what I am looking for exactly.  HORIZONS seem to provide me only with semi-annual axis out of other parameters I need (as explained in the update).  I might be wrong though as I am not an astronomer but I do not see what I need in HORIZONS data.
user9457
CC BY-SA 3.0
2015-10-14T19:37:03.850Z
@TildalWave I see.  I thought that it probably is there but I could not figure it out.  I will do some readings on my side to try to figure out how to build these parameters based on what I get from HORIZONS.  Thanks for your answer.
user9457
<orbit><planet>
Is there a web service providing orbital data of solar bodies (planets, comets, asteroids, dwarf planets)?
user9457
# Is there a web service providing orbital data of solar bodies (planets, comets, asteroids, dwarf planets)?

(Asked by: username_0 on 2015-10-12)

I would like to be able to connect to a web-service and retrieve JSON data containing information on current (as of today or so) orbits of planets, comets, asteroids, and dwarf planets in our solar system. (Even just planets would be fine but better if I can get info about asteroids, comets, and dwarf planets as well).
I would like to draw planets and their orbits accurately in a 2D animation of our solar system in an Android app in the X-Y coordinate plane as observed from the top of the Z axis.

Where can I find such public web service and how can I access it and get that data?

**UPDATE**
I tried using HORIZONS Web-Interface but out of all variables I need, I can see only "Semi-Annual Axis" information. I need following information:

* orbital ellipse angle in X-Y coordinate system (i.e 1.5rad or degrees or so)
* motion direction (pro-grade or retrograde)
* current position of planet/comet/asteroids on that ellipsis in degrees or radians, say 60deg from x (horizontal) axis
* time it takes plant to go around the sun (I believe this is called orbital period)
* eccentricity of ellipse (orbit)
* semi-annual axis

These are the values that give me enough information to draw orbit (ellipsis) and correctly position planet on that ellipsis, and to calculate speed at which it moves around the sun in my 2D model.

So, I am not interested in inclination or any parameters that would be useful for a 3D model.

I can find this data online but it takes lots of searching since I have not been able to find a central place for it. HORIZONS seems to be such place but out of variables I need (as described above), I can find there only semi-annual axis in HORIZONS. I am surprised that I cannot fine a public web-service offering this info (REST or SOAP, or whatever, does not matter as long as I can fetch that data and process it for my needs from my application).

I apologize if my explanation is somewhat unclear, I am not an astronomer.

Hope that explains.

**Tags:** orbit, planet
> **Comments:**
> **username_1**: Possible duplicate of [Planets and moons positions in cartesian coordinates?](http://astronomy.stackexchange.com/questions/11272/planets-and-moons-positions-in-cartesian-coordinates)  
> **username_0**: @FJC Thanks for the answer but that was not exactly what I am looking for.  I need to access a web service from my application and retrieve following data: eccentricity, semi-major axis, orbital period around sun, position of the body on that day in X-Y coordinate system as observed from top of Z coordinate (2D), preferably, orbiting ellipsis orientation in X-Y coordinates, retrograde or prograde motion.  As far as I can see, the above will provide only semi-major axis but not as web service (restfull web service).  I have updated my question above.  Much appreciated.  
> **username_2**: Is the data somewhere?  This has been on my mind, too, and if the data is somewhere I'd be happy to see about putting a JSON API front-end on it.  
> **username_3**: @user9457 I don't think "how can I access it" is on topic here.  
> **username_0**: @TildalWave  Thank you for the info.  I have looked at HORIZONS before and I could not find the info I need (I followed your steps, too).  I have posted update in my question to explain what I am looking for exactly.  HORIZONS seem to provide me only with semi-annual axis out of other parameters I need (as explained in the update).  I might be wrong though as I am not an astronomer but I do not see what I need in HORIZONS data.  
> **username_0**: @TildalWave I see.  I thought that it probably is there but I could not figure it out.  I will do some readings on my side to try to figure out how to build these parameters based on what I get from HORIZONS.  Thanks for your answer.  

---

## 1 answers

### Answer by username_4 on 2017-09-08. Score: 3

Not quite the webservice, but there is a JavaScript library Orb2.js with examples including X-Y(-Z) in ecliptic coordinates. So maybe you can compute it directly, not relying on some external service:

<http://www.lizard-tail.com/isana/lab/orbjs/>

As far as I do not use it actively, it just a pointer to site to explore, not a definitive solution for you.


---

