1

I have a list of node_slug values of Khan Academy articles like:

  • a/square-roots-of-perfect-squares-art
  • a/number-of-solutions-to-a-system-of-equations
  • a/distance-formula

Unfortunately, as far as I know, there is no way from this piece of data to get the API JSON. For that, you need an id like "xe504dd90". This is different from exercises and videos, which both have a dedicated API.

What it's possible is to get the page from the main website, which has all the data I need and much more, but it's more difficult to parse. What I need are the main metadata of the page (title, author, image_url, etc.).

Aubrey
  • 507
  • 4
  • 20
  • (I understand this is not exactly a programming question, unfortunately I tried everything and SO is the best place to get an answer...) – Aubrey Jul 04 '16 at 21:43
  • 1
    Not sure what your question is. To get the KA-id for arts like the one you mention (ie, correlate slugs to those ids), there is an undocumented v2 API, mentioned in one of the last comments [here](http://stackoverflow.com/questions/34231475/get-ka-exercise-hierarchy) ... but unfortunately it is currently broken. – MaxD Jul 09 '16 at 02:25
  • FYI the v2 API is reported broken; you may want to follow-up [here](https://github.com/Khan/khan-api/issues/114) – MaxD Jul 21 '16 at 19:59

1 Answers1

0

I can't reply to your comments, but the aforementioned v2 API endpoint which gets all KA content works now. It's a pretty large payload, almost 7MB at this time, and takes a little while to respond.

http://www.khanacademy.org/api/v2/topics/topictree

You could search through the articles array with your node_slugs, find its respective ID, and go from there.

I know this is an old question, but I figured my answer might help someone else one day. Vote up if this helps you out!

Jett
  • 17
  • 6