# How to Get Projects https://api-docs.lumar.io/docs/graphql/get-projects ### When you don't know Project ID If you don't know the ID of your project you can fetch a list of projects that you have access to through the accounts. **Get projects from accounts you have access to** ```graphql query MyProjects { me { id username accounts(first: 1) { totalCount nodes { id name projects(first: 2) { totalCount nodes { id name } } } } } } ``` **Response:** ```json { "data": { "me": { "id": "TjAwNFVzZXI4NjE", "username": "Your User Name", "accounts": { "totalCount": 1, "nodes": [ { "id": "TjAwN0FjY291bnQ3MTU", "name": "Your Account Name", "projects": { "totalCount": 10, "nodes": [ { "id": "TjAwN1Byb2plY3Q2MTMy", "name": "www.example.com Project" }, { "id": "TjAwN1Byb2plY3Q5OTA2", "name": "www.example.co.uk Project" } ] } } ] } } } } ``` ### When you know your Project ID If project ID is known (for example from URL) you can fetch the project directly. **Get a specific project by ID** ```graphql query MyProjectById { getProject(id: "TjAwN1Byb2plY3Q2MTMy") { id name primaryDomain } } ``` **Response:** ```json { "data": { "getProject": { "id": "TjAwN1Byb2plY3Q2MTMy", "name": "www.example.com Project", "primaryDomain": "https://www.example.com/" } } } ```