Search code examples
rdfsocrata

How to fully download a dataset in RDF via Socrata on data.nasa.gov?


I need to download all the dataset in RDF of "Meteorite Landings" via data.nasa.gov. But when I try to download, the file has only 500 instances.

How to fully download this dataset in RDF ?

Have you an example of script (with wget or curl) ?


Solution

  • Ok I found that I have to use the parameters limit/offset with a token. The token is generated when I declared the app in the portal of the nasa. So I resume :
    GET https://data.nasa.gov/resource/y77d-th95.rdf?$offset=1&$limit=1
    And add in the header http :
    X-App-Token: YOUR_APP_TOKEN

    And so with curl, I can upload all the files with this solution :

    curl --header "X-App-Token: YOUR_APP_TOKEN" \
    -X GET 'https://data.nasa.gov/resource/y77d-th95.rdf?$offset=[1-46000:500]&$limit=500' \
    -o 'nasa.Meteorites.#1.rdf'