# Search Count

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Search Count"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/v1/workspaces/{workspace_name}/search_count"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Returns the number of search requests per time bucket.
Supports daily or hourly granularity, optional pipeline filtering, and configurable time range.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Type the name of the workspace.","in":"path","name":"workspace_name","required":true,"schema":{"description":"Type the name of the workspace.","title":"Workspace Name","type":"string"}},{"description":"Filter by pipeline name.","in":"query","name":"pipeline_name","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by pipeline name.","title":"Pipeline Name"}},{"description":"Granularity: 'day' or 'hour'.","in":"query","name":"mode","required":false,"schema":{"default":"day","description":"Granularity: 'day' or 'hour'.","enum":["day","hour"],"title":"SearchCountMode","type":"string"}},{"description":"Number of days to look back (1-90).","in":"query","name":"days","required":false,"schema":{"default":10,"description":"Number of days to look back (1-90).","maximum":90,"minimum":1,"title":"Days","type":"integer"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"count":{"description":"Number of queries that were sent.","title":"Query Count","type":"integer"},"date":{"description":"Date of the counted search queries.","title":"Search Count Dates","type":"string"}},"required":["date","count"],"title":"SearchCount","type":"object"},"title":"Data","type":"array"},"has_more":{"description":"Indicates if there are more results to show.","title":"Has more results","type":"boolean"},"total":{"description":"The total number of results matching your query.","title":"Total number of results","type":"integer"}},"required":["data","has_more","total"],"title":"PaginatedResult[SearchCount]","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
