protected function addNextSearchLinks( $request, $response ) {

		$max_pages = (int) ceil( $this->totalBooks / (int) $request['per_page'] );

		$response->header( 'X-WP-Total', (int) $this->totalBooks );
		$response->header( 'X-WP-TotalPages', $max_pages );

		if ( $this->lastKnownBookId ) {
			unset( $request['page'] );
			$request_params = $request->get_query_params();
			$base = add_query_arg( $request_params, rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ) );
			$next_link = add_query_arg( 'next', $this->lastKnownBookId, $base );
			$response->link_header( 'next', $next_link );
		}
	}