Education
Khan Academy logo

Khan Academy API

khanacademy.org

Khan Academy - topic trees, content metadata, video transcripts, and exercises.

Actions
5
Category
Education
Login
Not required
Output
JSON

Call the Khan Academy API

Submit a task, then poll the job until it settles. This example runs act_khanacademy_content_metadata.

curl -X POST https://api.anakin.io/v1/wire/task \
  -H "X-API-Key: $ANAKIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_id": "act_khanacademy_content_metadata",
    "params": {
      "content_id": "xc31f2c840e7a1393",
      "content_kind": "Video"
    }
  }'

5 actions on khanacademy.org

Read

  • Content Metadata

    act_khanacademy_content_metadataread1 credit / call

    Returns title, description, duration, slug, and YouTube ID for a content item.

    content_id
    string · required
    content_kind
    string · required
  • Course Topic Tree

    act_khanacademy_course_topic_treeread1 credit / call

    Returns the full course hierarchy of units, lessons, and content for a course path.

    course_path
    string · required
    country_code
    string
  • Topic Navigation Menu

    act_khanacademy_topic_navigation_menuread1 credit / call

    Returns the Explore menu with subject and course links for a region.

    region
    string · required
  • Video Transcript

    act_khanacademy_video_transcriptread1 credit / call

    Returns timed transcript subtitle lines with timestamps for a video by YouTube ID.

    youtube_id
    string · required
    ka_locale
    string

Write

Write actions change state on khanacademy.org and run as the account you connect.

  • Exercise Task

    act_khanacademy_exercise_task_createwrite2 credits / call

    Starts or resumes a practice exercise, returning task IDs and assessment items.

    exercise_id
    string
    exercise_slug
    string

Khan Academy API questions

Is there an API for Khan Academy?
Khan Academy does not offer a public data API for this, but Anakin Wire provides 5 maintained endpoints for khanacademy.org. You call Anakin's REST API with an action ID and parameters and get structured JSON back; Anakin handles the browser, proxies, anti-bot, and parsing.
How do I scrape Khan Academy data?
POST to https://api.anakin.io/v1/wire/task with your API key, the action ID, and its parameters, then poll GET /v1/wire/jobs/{id} until the job settles. There is nothing to install and no scraper to maintain — when khanacademy.org changes its markup, Anakin updates the action.
Do I need a Khan Academy account?
No. Every Khan Academy action listed here runs anonymously — no account and no credentials required.
What does the Khan Academy API cost?
Usage-based credits, charged per call and refunded automatically when a job fails. New accounts start with 300 free credits and no card. See anakin.io/pricing for the current rates.

More Education APIs

All Education sites