This site is supported by donations to The OEIS Foundation.

JSON Format, Compressed Files

From OeisWiki
Jump to: navigation, search

JSON Format

  • We are often asked if the OEIS entries are available in machine-readable format, for use in mobile phones, etc.
  • The answer is Yes, you can retrieve OEIS entries in JSON (JavaScript Object Notation) format.
  • Just like you have always been able to add &fmt=text as a URL query parameter to get text output, now you can add &fmt=json to get JSON.
  • For example, to search for 1,2,3,6,11,23,47,106,235, use the URL
https://oeis.org/search?q=1,2,3,6,11,23,47,106,235&fmt=json
  • To retrieve all sequences containing the A-number A​001011 in JSON format, use
https://oeis.org/search?q=A​001011&fmt=json which yields https://oeis.org/search?q=A001011&fmt=json   (yields 8 sequences)
  • To retrieve the sequence with A-number A​001011 in JSON format, use (note the id: prefix)
https://oeis.org/search?q=id:A​001011&fmt=json which yields https://oeis.org/search?q=id:A001011&fmt=json

Compressed Versions

  • There is a gzipped file containing just the sequences and their A-numbers (about 61 megs unzipped)
  • There is also a gzipped file containing just the names of the sequences and their A-numbers (about 31 megs unzipped)