Data can be sent to Amplitude in different ways: via SDKs, Amplitude's integrations with third-party apps, integrations with cloud solutions, etc. However, one of the most popular ways of sending data is by using Amplitude APIs. Two of the most popular APIs are the HTTP V2 API and Batch API.
This article covers some frequently asked questions about which API you should choose for ingestion.
The HTTP V2 API sends the data directly from your server to the HTTP V2 endpoint.
Who should use the HTTP V2 API?
Additionally, events sent with the HTTP V2 API (for the same device_id) are processed in the exact same order in which they are received. This doesn’t always matter for your analysis, but it can have a critical impact in case your analysis is time-sensitive (ex. in specific Funnel charts). If the same user is sending data on multiple devices, there is no ordering guarantee between those events. The downside of using the HTTP V2 API is that Amplitude throttles requests for users and devices that exceed our limit of 30 events per second (measured as an average over a recent time window). This means that if you exceed the limit, you will get an error, and you will have to pause sending events for that user or device for a period of 30 seconds before retrying it until you no longer receive an error response. The HTTP V2 API would be a poor choice if you have high volumes of data or are concerned with scale.
What are the pros and cons of using the HTTP V2 API?
Note
What are examples of HTTP V2 API use cases?
The Batch Event Upload API lets you upload large amounts of event data at once. One of the most important aspects of sending data to Amplitude is dealing with the concept of throttling (which you might run into when using the HTTP V2 API). Due to how the data processing pipeline works, it can be challenging to process a high volume of events for a single device or user and that’s when the concept of throttling arises. We consider a rate of 10 events/second (EPS) for a single user/device (EPUS/EPDS) to be high and 30 EPS to be spammy, so we throttle these requests, as humans don’t typically produce events at such high rates, and it’s often indicative of something being broken or of spam data coming in. However, there are still a few use cases that justify sending such big volumes of data, mostly around batch uploads. For example, some customers will not upload event data until the day ended (so they can add extra information, for example). So, if a user produced 10,000 events that day and you try to send them all together in a single minute, you’ll average more 100 EPUS (which the HTTP API V2 would not be able to handle). To help absorb these types of bursts, we created the Batch Event Upload API, which has much higher limits. It also buffers data for a longer time than the HTTP V2 API.
Who should use the Batch Event Upload API?
What are some Batch Event Upload API use cases?
We also offer a range of Software Development Kits (SDKs), that makes it easy for websites, mobile apps, and desktop applications to get data to Amplitude. And there is also an option to use one of our Cloud Storage solutions or integrate your Amplitude instance with a third-party app of your choice. You can see our growing list of sources that let you import data into Amplitude (including third-party platforms) here: Sources Overview.
What are other options?
Thanks for your feedback!
November 21st, 2024
Need help? Contact Support
Visit Amplitude.com
Have a look at the Amplitude Blog
Learn more at Amplitude Academy
© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.