Question about graphql api. I'm running a _search_ query and it looks like it only includes the node and not the connection object where i could get something like _total count_

i have a question about the graphql api. i think im missing something… im running a search query and it looks like it only includes the node and not the connection object where i could get something like totalCount .


This topic was automatically generated from Slack. You can find the original thread here.

Hey ! Thanks for reaching out. Unfortunately, the API is a little outside my wheelhouse. However, I’m happy to loop our API expert, Michael Taylor, into this conversation. As it is the weekend, we likely won’t be able to get you an answer until the start of the week. In the meantime, I’ll drop all of our Places API documentation here. You can also watch a short demo we had on the Places API here. Thanks for your patience!

Hey , it seems like you’ve found them but the arguments are first and after for paginating through. They are only count based at the moment (e.g. first 50, after 50, etc). We’re working on a last_seen_placekey that would be something like the cursor based support you mentioned to expedite pagination. And currently, you are correct that the only way in the API to get all of the places is to iterate through the full list until you reach the end. Once the total_row_count response is less than the first value in the query, you have reached the end of the list. Our python client assists in this exercise. Alternatively, for the moment, if you just want a quick count, you can take a look in the SafeGraph Shop, where we do provide a record count pre purchase.

Thanks ! Hey - if there’s no further questions, I’ll go ahead and close this thread out. If you have any more questions or follow-up questions, we’re always here to help! Just be sure to make a new post to help, as we aren’t monitoring old threads at this time. Thanks!