You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fermi: LATDataQuery.cgi is being replaced by a REST API — module update available #3646
I work on the Fermi LAT data-server infrastructure at NASA/GSFC. The LATDataQuery.cgi endpoint that astroquery.fermi submits queries to is
being replaced by a JSON REST API, now live at:
Base URL: https://fermi.gsfc.nasa.gov/ssc/data/access/lat/query/api/v1
New API in brief
POST /query -> {"query_id": ...} (JSON payload)
GET /query/{id}/status -> {"state": ...}
GET /query/{id}/results -> {"files": [{"name": ...}, ...]}
Files are staged on the HEASARC FTP area as before. Most request field names
were deliberately kept compatible with the CGI form fields
(coordfield, coordsystem, shapefield, timefield, timetype, energyfield, photonOrExtendedOrNone, spacecraft), and a
new optional zenithangle parameter was added. coordfield accepts either "RA,Dec" or a target name, coordsystem accepts J2000, B1950 or Galactic, and all-sky queries are supported with a radius > 60 degrees and
an observation window of <= 24 hours.
What this means for astroquery
I have a rewritten astroquery/fermi module ready as a PR:
FermiLAT.query_object() keeps its existing signature — end-user
scripts should not need to change.
All HTML scraping is removed; the module speaks JSON only.
query_object_async() now returns the server's query_id instead of a
results-page URL.
New capabilities exposed: get_status(), list_results(), wait_for_completion(), get_file_urls(), plus zenithangle and all-sky queries.
GetFermilatDatafile / get_fermilat_datafile retained as deprecated
shims.
Unit tests rewritten against mocked JSON responses; remote tests verified
end-to-end against the live API (all passing as of 2026-08-14).
I'll open the PR shortly and link it here. Feedback welcome on the approach —
in particular on the deprecation handling and on whether the module's
"Experimental" import warning should be dropped as part of this change (the
PR currently drops it).
Activity
PazSheimy commentedon Aug 18, 2026
PR opened: #3647