# Import JSON file in ElasticSearch for visualization in Kibana

**URL:** <https://discuss.elastic.co/t/import-json-file-in-elasticsearch-for-visualization-in-kibana/125512>\
**Category:** Elasticsearch\
**Created:** [March 25, 2018, 8:23pm UTC](https://discuss.elastic.co/t/import-json-file-in-elasticsearch-for-visualization-in-kibana/125512 "2018-03-25T20:23:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpescador](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bpescador](https://discuss.elastic.co/u/bpescador)\
**Post date:** [March 25, 2018, 8:23pm UTC](https://discuss.elastic.co/t/import-json-file-in-elasticsearch-for-visualization-in-kibana/125512/1 "2018-03-25T20:23:10Z")

</div>

Can someone suggest a strategy for importing json results into ElasticSearch from the [AntWeb.org](http://AntWeb.org) API: [https://www.antweb.org/api.do](https://www.antweb.org/api.do)

example json (of 630,000 records):  
"specimens": [  
{  
"antwebTaxonName": "myrmicinaetetramorium densopilosum",  
"basisOfRecord": "preserved specimen",  
"biogeographicregion": "Palearctic",  
"bioregion": "Palearctic",  
"caste": "queen",  
"classVal": "insecta",  
"code": "antweb1008964",  
"collectedby": "A. Radchenko",  
"collectionCode": "ANTWEB",  
"country": "Armenia",  
"dateCollected": "1986-06-14",  
"dateIdentified": null,  
"dctermsModified": "Thu, 22 Mar 2018 13:03:33 GMT",  
"decimalLatitude": null,  
"decimalLongitude": null,  
"family": "formicidae",  
"fieldNotes": null,  
"fieldNumber": "ANTC43083",  
"fossil": false,  
"genus": "Tetramorium",  
"georeferenceRemarks": null,  
"habitat": null,  
"habitats": null,  
"higherClassification": "animalia;arthropoda;insecta;hymenoptera;hymenoptera;formicidae;myrmicinae",  
"identifiedBy": null,  
"institutionCode": "CAS",  
"intraspecificEpithet": null,  
"kingdom": "animalia",  
"locality": "Khosrov reserve",  
"locatedat": "SIZK",  
"locationRemark": null,  
"microhabitat": null,  
"minimumEleationInMeters": null,  
"museum": null,  
"nomenclaturalCode": "ICZN",  
"occurrenceId": "CAS:ANTWEB:antweb1008964",  
"occurrenceRemarks": "237-86",  
"order": "hymenoptera",  
"ownedby": "SIZK, Kiev, Ukraine",  
"ownerInstitutionCode": "SIZK, Kiev, Ukraine",  
"phylum": "arthropoda",  
"preparations": "pin",  
"recordedBy": "A. Radchenko",  
"samplingProtocol": null,  
"scientificName": "tetramorium densopilosum",  
"sex": "1 dealate queen",  
"specificEpithet": "densopilosum",  
"stateProvince": null,  
"status": "valid",  
"subfamily": "myrmicinae",  
"subgenus": null,  
"type": "paratype of Tetramorium densopilosum",  
"verbatimEventDate": "14 Jun 1986"  
},

Note the api results are not in ndjson format. Should I first format with jq then use curl or would you suggest using a python script. I also realize I need to map the index and not sure how that should be part of the workflow from api to elasticsearch.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 22, 2018, 8:23pm UTC](https://discuss.elastic.co/t/import-json-file-in-elasticsearch-for-visualization-in-kibana/125512/2 "2018-04-22T20:23:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
