diff --git a/openstack/identity/v3/projects/requests.go b/openstack/identity/v3/projects/requests.go
new file mode 100644
index 0000000..213db9c
--- /dev/null
+++ b/openstack/identity/v3/projects/requests.go
@@ -0,0 +1,52 @@
+package projects
+
+import (
+	"github.com/gophercloud/gophercloud"
+	"github.com/gophercloud/gophercloud/pagination"
+)
+
+// ListOptsBuilder allows extensions to add additional parameters to
+// the List request
+type ListOptsBuilder interface {
+	ToProjectListQuery() (string, error)
+}
+
+// ListOpts allows you to query the List method.
+type ListOpts struct {
+	// DomainID filters the response by a domain ID.
+	DomainID string `q:"domain_id"`
+
+	// Enabled filters the response by enabled projects.
+	Enabled *bool `q:"enabled"`
+
+	// IsDomain filters the response by projects that are domains.
+	// Setting this to true is effectively listing domains.
+	IsDomain *bool `q:"is_domain"`
+
+	// Name filters the response by project name.
+	Name string `q:"name"`
+
+	// ParentID filters the response by projects of a given parent project.
+	ParentID string `q:"parent_id"`
+}
+
+// ToProjectListQuery formats a ListOpts into a query string.
+func (opts ListOpts) ToProjectListQuery() (string, error) {
+	q, err := gophercloud.BuildQueryString(opts)
+	return q.String(), err
+}
+
+// List enumerats the Projects to which the current token has access.
+func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager {
+	url := listURL(client)
+	if opts != nil {
+		query, err := opts.ToProjectListQuery()
+		if err != nil {
+			return pagination.Pager{Err: err}
+		}
+		url += query
+	}
+	return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page {
+		return ProjectPage{pagination.LinkedPageBase{PageResult: r}}
+	})
+}
diff --git a/openstack/identity/v3/projects/results.go b/openstack/identity/v3/projects/results.go
new file mode 100644
index 0000000..33c70e1
--- /dev/null
+++ b/openstack/identity/v3/projects/results.go
@@ -0,0 +1,64 @@
+package projects
+
+import (
+	"github.com/gophercloud/gophercloud/pagination"
+)
+
+// Project is a base unit of ownership.
+type Project struct {
+	// IsDomain indicates whether the project is a domain.
+	IsDomain bool `json:"is_domain"`
+
+	// Description is the description of the project.
+	Description string `json:"description"`
+
+	// DomainID is the domain ID the project belongs to.
+	DomainID string `json:"domain_id"`
+
+	// Enabled is whether or not the project is enabled.
+	Enabled bool `json:"enabled"`
+
+	// ID is the unique ID of the project.
+	ID string `json:"id"`
+
+	// Name is the name of the project.
+	Name string `json:"name"`
+
+	// ParentID is the parent_id of the project.
+	ParentID string `json:"parent_id"`
+}
+
+// ProjectPage is a single page of Project results.
+type ProjectPage struct {
+	pagination.LinkedPageBase
+}
+
+// IsEmpty determines whether or not a page of Projects contains any results.
+func (r ProjectPage) IsEmpty() (bool, error) {
+	projects, err := ExtractProjects(r)
+	return len(projects) == 0, err
+}
+
+// NextPageURL extracts the "next" link from the links section of the result.
+func (r ProjectPage) NextPageURL() (string, error) {
+	var s struct {
+		Links struct {
+			Next     string `json:"next"`
+			Previous string `json:"previous"`
+		} `json:"links"`
+	}
+	err := r.ExtractInto(&s)
+	if err != nil {
+		return "", err
+	}
+	return s.Links.Next, err
+}
+
+// ExtractProjects returns a slice of Projects contained in a single page of results.
+func ExtractProjects(r pagination.Page) ([]Project, error) {
+	var s struct {
+		Projects []Project `json:"projects"`
+	}
+	err := (r.(ProjectPage)).ExtractInto(&s)
+	return s.Projects, err
+}
diff --git a/openstack/identity/v3/projects/testing/fixtures.go b/openstack/identity/v3/projects/testing/fixtures.go
new file mode 100644
index 0000000..c4d9c03
--- /dev/null
+++ b/openstack/identity/v3/projects/testing/fixtures.go
@@ -0,0 +1,80 @@
+package testing
+
+import (
+	"fmt"
+	"net/http"
+	"testing"
+
+	"github.com/gophercloud/gophercloud/openstack/identity/v3/projects"
+	th "github.com/gophercloud/gophercloud/testhelper"
+	"github.com/gophercloud/gophercloud/testhelper/client"
+)
+
+// ListOutput provides a single page of Project results.
+const ListOutput = `
+{
+  "projects": [
+    {
+      "is_domain": false,
+      "description": "The team that is red",
+      "domain_id": "default",
+      "enabled": true,
+      "id": "1234",
+      "name": "Red Team",
+      "parent_id": null
+    },
+    {
+      "is_domain": false,
+      "description": "The team that is blue",
+      "domain_id": "default",
+      "enabled": true,
+      "id": "9876",
+      "name": "Blue Team",
+      "parent_id": null
+    }
+  ],
+  "links": {
+    "next": null,
+    "previous": null
+  }
+}
+`
+
+// RedTeam is a Project fixture.
+var RedTeam = projects.Project{
+	IsDomain:    false,
+	Description: "The team that is red",
+	DomainID:    "default",
+	Enabled:     true,
+	ID:          "1234",
+	Name:        "Red Team",
+	ParentID:    "",
+}
+
+// BlueTeam is a Project fixture.
+var BlueTeam = projects.Project{
+	IsDomain:    false,
+	Description: "The team that is blue",
+	DomainID:    "default",
+	Enabled:     true,
+	ID:          "9876",
+	Name:        "Blue Team",
+	ParentID:    "",
+}
+
+// ExpectedProjectSlice is the slice of projects expected to be returned from ListOutput.
+var ExpectedProjectSlice = []projects.Project{RedTeam, BlueTeam}
+
+// HandleListProjectSuccessfully creates an HTTP handler at `/projects` on the
+// test handler mux that responds with a list of two tenants.
+func HandleListProjectsSuccessfully(t *testing.T) {
+	th.Mux.HandleFunc("/projects", func(w http.ResponseWriter, r *http.Request) {
+		th.TestMethod(t, r, "GET")
+		th.TestHeader(t, r, "Accept", "application/json")
+		th.TestHeader(t, r, "X-Auth-Token", client.TokenID)
+
+		w.Header().Set("Content-Type", "application/json")
+		w.WriteHeader(http.StatusOK)
+		fmt.Fprintf(w, ListOutput)
+	})
+}
diff --git a/openstack/identity/v3/projects/testing/requests_test.go b/openstack/identity/v3/projects/testing/requests_test.go
new file mode 100644
index 0000000..31730f9
--- /dev/null
+++ b/openstack/identity/v3/projects/testing/requests_test.go
@@ -0,0 +1,30 @@
+package testing
+
+import (
+	"testing"
+
+	"github.com/gophercloud/gophercloud/openstack/identity/v3/projects"
+	"github.com/gophercloud/gophercloud/pagination"
+	th "github.com/gophercloud/gophercloud/testhelper"
+	"github.com/gophercloud/gophercloud/testhelper/client"
+)
+
+func TestListProjects(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+	HandleListProjectsSuccessfully(t)
+
+	count := 0
+	err := projects.List(client.ServiceClient(), nil).EachPage(func(page pagination.Page) (bool, error) {
+		count++
+
+		actual, err := projects.ExtractProjects(page)
+		th.AssertNoErr(t, err)
+
+		th.CheckDeepEquals(t, ExpectedProjectSlice, actual)
+
+		return true, nil
+	})
+	th.AssertNoErr(t, err)
+	th.CheckEquals(t, count, 1)
+}
diff --git a/openstack/identity/v3/projects/urls.go b/openstack/identity/v3/projects/urls.go
new file mode 100644
index 0000000..e80a395
--- /dev/null
+++ b/openstack/identity/v3/projects/urls.go
@@ -0,0 +1,7 @@
+package projects
+
+import "github.com/gophercloud/gophercloud"
+
+func listURL(client *gophercloud.ServiceClient) string {
+	return client.ServiceURL("projects")
+}
