How to programmatically export your Gatsby data
This is ideal for developers and brands who have custom integration needs or want to streamline their export / import process into any on-prem systems.
To programmatically export your Gatsby data, please follow the steps below.
Step 1: Create your Gatsby API Key
-
Log into Gatsby >> Integrations tab >> scroll to the bottom and click "Create Private API Key"

2. You will now see your API Key. Please click the pencil icon to give it a label so you know what it's being used for. For example, if you are using this API Key to eventually send your data to your ESP, label this API Key something like "Export to ESP"

Step 2: Call the API
API URL: https://gatsby.tech/export
API Type: POST
Request parameters:
{
"api_key" : "string", // required
"capture_date" : "MM-DD-YYYY" // optional
"capture_end_date" : "MM-DD-YYYY" // optional
}
Step 3: Parse JSON Response
- The response will include all people and media data from your Gatsby account.
- If you used "capture_date" in your request, then the response will include specifically your data on the people associated with handles that were captured after that date. It will also include your media data for people who were captured after that date.
- For example: If you call the API with a capture date of 1-1-2021, then the JSON response will include all people and all media associated with users who were captured after 1-1-2021. Time zone GMT.
Example Response:
Response:
{
"peopleData": [{
"image": "https://dev-gatsby.s3-us-west-1.amazonaws.com/instagramUserImages/test.jpg",
"handle": "abc",
"follower": "100",
"follows": "192",
"post": "3732",
"gscore": "B",
"email": "test@gmail.com",
"Bio": "",
"captureDate": "11-19-2020",
"mentionDate": "11-19-2020"
}],
"mediaData": [{
"mediaUrl": "https://scontent-sjc3-1.cdninstagram.com/v/t51.2885-15/75616356_481158675942187_483889121969631076_n.jpg?_nc_cat=105&ccb=2&_nc_sid=8ae9d6&_nc_ohc=WCd7txfXkYUAX9eUEOq&_nc_ht=scontent-sjc3-1.cdninstagram.com&oh=01a27feddc268cee049f96aa381ae017&oe=6031C92E",
"caption": "Who is looking for more power? #Cycle #pelotoncycle #Socks4balance gatsby.ai",
"like": 1,
"comment": 0,
"followers": 333,
"engagement": "0.3%",
"handle": "test",
"date": "11-06-2019",
"time": "5:52 PM"
}]
}

Example with optional End Date parameter:

That's it! If you have any questions, please don't hesitate to open a support ticket with us and we'll get back to you as quickly as possible. Thanks!