Add basic segment APIs

Only handles simple has-tag criteria.