Skip to main content

Enterprise와 X API v2 비교

공통점
  • Granularity
  • 페이지네이션
  • 시간대
차이점
  • 엔드포인트 URL
  • App 및 Project 요구사항
  • 사용 가능한 기간
  • 응답 데이터 형식
  • HTTP 메서드
  • 요청 시간 형식
  • 요청 파라미터
  • 필터링 연산자

공통점

Granularity 반환 데이터의 granularity를 선택하는 파라미터 이름은 다르지만(enterprise 버전은 bucket, v2 버전은 granularity), 해당 파라미터에 전달할 수 있는 값과 기본 동작은 동일합니다:
  • day
  • hour (기본값)
  • minute
페이지네이션 v2에는 추가 페이지네이션 기능(since_iduntil_id를 사용해 Post ID로 탐색할 수 있는 새 페이지네이션 파라미터)이 있지만, enterprise와 v2 모두 시간으로 페이지네이션할 수 있습니다(enterprise는 fromDatetoDate, v2는 start_timeend_time). Enterprise 버전을 사용하는 경우 next 파라미터로 페이지네이션하며, next 토큰 필드는 next라고 하고 응답의 루트에 위치합니다. v2를 사용하는 경우 next_token 또는 pagination_token 파라미터를 사용해 페이지네이션할 수 있으며, next 토큰은 응답의 meta.next_token에 위치합니다. 시간대 페이지네이션 섹션에서 언급했듯이, enterprise와 v2 모두 시간을 사용해 서로 다른 데이터 페이지를 탐색할 수 있습니다. 두 경우 모두 이러한 파라미터를 사용할 때 UTC를 시간대로 사용합니다.

차이점

엔드포인트 URL
  • Enterprise 엔드포인트:
    • 30일 - http://gnip-api.x.com/search/30day/accounts/:account_name/:label/counts.json
    • Full-archive - http://gnip-api.x.com/search/fullarchive/accounts/:account_name/:label/counts.json
  • X API v2 엔드포인트 *